Tweaked smooth shaded texture lighting properties.
Converted fgLIGHT to a C++ class.
This commit is contained in:
parent
e57fd21bd3
commit
081b63cfbb
3 changed files with 19 additions and 16 deletions
|
@ -35,6 +35,7 @@
|
|||
#include <GL/glut.h>
|
||||
#include <XGL/xgl.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifdef HAVE_STDLIB_H
|
||||
# include <stdlib.h>
|
||||
|
@ -214,6 +215,9 @@ static void fgInitVisuals( void ) {
|
|||
// draw wire frame
|
||||
xglPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
|
||||
}
|
||||
|
||||
// This is the default anyways, but it can't hurt
|
||||
xglFrontFace ( GL_CCW );
|
||||
}
|
||||
|
||||
|
||||
|
@ -335,6 +339,7 @@ static void fgRenderFrame( void ) {
|
|||
double angle;
|
||||
GLfloat black[4] = { 0.0, 0.0, 0.0, 1.0 };
|
||||
GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 };
|
||||
GLfloat gray90[4] = { 0.9, 0.9, 0.9, 1.0 };
|
||||
GLfloat terrain_color[4] = { 0.54, 0.44, 0.29, 1.0 };
|
||||
|
||||
l = &cur_light_params;
|
||||
|
@ -424,7 +429,7 @@ static void fgRenderFrame( void ) {
|
|||
xglTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE ) ;
|
||||
xglHint( GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST ) ;
|
||||
// set base color (I don't think this is doing anything here)
|
||||
xglMaterialfv (GL_FRONT, GL_AMBIENT, white);
|
||||
xglMaterialfv (GL_FRONT, GL_AMBIENT, gray90);
|
||||
xglMaterialfv (GL_FRONT, GL_DIFFUSE, white);
|
||||
} else {
|
||||
xglDisable( GL_TEXTURE_2D );
|
||||
|
@ -773,6 +778,10 @@ extern "C" {
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.16 1998/05/20 20:51:33 curt
|
||||
// Tweaked smooth shaded texture lighting properties.
|
||||
// Converted fgLIGHT to a C++ class.
|
||||
//
|
||||
// Revision 1.15 1998/05/16 13:08:34 curt
|
||||
// C++ - ified views.[ch]xx
|
||||
// Shuffled some additional view parameters into the fgVIEW class.
|
||||
|
|
|
@ -73,7 +73,7 @@ VERSION = @VERSION@
|
|||
|
||||
EXTRA_DIST = runfg.in runfg.bat.in
|
||||
|
||||
bin_PROGRAMS = fg ttest
|
||||
bin_PROGRAMS = fg
|
||||
|
||||
bin_SCRIPTS = runfg runfg.bat
|
||||
|
||||
|
@ -103,8 +103,6 @@ fg_LDADD = \
|
|||
$(top_builddir)/Lib/Bucket/libBucket.la \
|
||||
$(top_builddir)/Lib/Debug/libDebug.la \
|
||||
$(top_builddir)/Lib/zlib/libz.la
|
||||
|
||||
ttest_SOURCES = ttest.cxx
|
||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
||||
CONFIG_HEADER = ../../Include/config.h
|
||||
CONFIG_CLEAN_FILES = runfg runfg.bat
|
||||
|
@ -137,10 +135,6 @@ $(top_builddir)/Lib/Math/libMath.la \
|
|||
$(top_builddir)/Lib/Bucket/libBucket.la \
|
||||
$(top_builddir)/Lib/Debug/libDebug.la $(top_builddir)/Lib/zlib/libz.la
|
||||
fg_LDFLAGS =
|
||||
ttest_OBJECTS = ttest.o
|
||||
ttest_LDADD = $(LDADD)
|
||||
ttest_DEPENDENCIES =
|
||||
ttest_LDFLAGS =
|
||||
SCRIPTS = $(bin_SCRIPTS)
|
||||
|
||||
CXXFLAGS = @CXXFLAGS@
|
||||
|
@ -155,10 +149,10 @@ DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
|||
TAR = tar
|
||||
GZIP = --best
|
||||
DEP_FILES = .deps/GLUTkey.P .deps/GLUTmain.P .deps/airports.P \
|
||||
.deps/fg_init.P .deps/options.P .deps/ttest.P .deps/views.P
|
||||
.deps/fg_init.P .deps/options.P .deps/views.P
|
||||
CXXMKDEP = $(CXX) -M $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CXXFLAGS)
|
||||
SOURCES = $(fg_SOURCES) $(ttest_SOURCES)
|
||||
OBJECTS = $(fg_OBJECTS) $(ttest_OBJECTS)
|
||||
SOURCES = $(fg_SOURCES)
|
||||
OBJECTS = $(fg_OBJECTS)
|
||||
|
||||
all: Makefile $(PROGRAMS) $(SCRIPTS)
|
||||
|
||||
|
@ -237,10 +231,6 @@ fg: $(fg_OBJECTS) $(fg_DEPENDENCIES)
|
|||
@rm -f fg
|
||||
$(CXXLINK) $(fg_LDFLAGS) $(fg_OBJECTS) $(fg_LDADD) $(LIBS)
|
||||
|
||||
ttest: $(ttest_OBJECTS) $(ttest_DEPENDENCIES)
|
||||
@rm -f ttest
|
||||
$(CXXLINK) $(ttest_LDFLAGS) $(ttest_OBJECTS) $(ttest_LDADD) $(LIBS)
|
||||
|
||||
install-binSCRIPTS: $(bin_SCRIPTS)
|
||||
@$(NORMAL_INSTALL)
|
||||
$(mkinstalldirs) $(DESTDIR)$(bindir)
|
||||
|
|
|
@ -300,7 +300,7 @@ int fgInitSubsystems( void ) {
|
|||
fgUpdateSunPos();
|
||||
|
||||
// Initialize Lighting interpolation tables
|
||||
fgLightInit();
|
||||
l->Init();
|
||||
|
||||
// update the lighting parameters (based on sun angle)
|
||||
fgEventRegister( "fgLightUpdate()", fgLightUpdate,
|
||||
|
@ -381,6 +381,10 @@ int fgInitSubsystems( void ) {
|
|||
|
||||
|
||||
// $Log$
|
||||
// Revision 1.14 1998/05/20 20:51:35 curt
|
||||
// Tweaked smooth shaded texture lighting properties.
|
||||
// Converted fgLIGHT to a C++ class.
|
||||
//
|
||||
// Revision 1.13 1998/05/16 13:08:35 curt
|
||||
// C++ - ified views.[ch]xx
|
||||
// Shuffled some additional view parameters into the fgVIEW class.
|
||||
|
|
Loading…
Reference in a new issue