From: curt Date: Wed, 20 May 1998 20:51:33 +0000 (+0000) Subject: Tweaked smooth shaded texture lighting properties. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=081b63cfbbb02c28777d70990f396077f6243e39;p=flightgear.git Tweaked smooth shaded texture lighting properties. Converted fgLIGHT to a C++ class. --- diff --git a/Main/GLUTmain.cxx b/Main/GLUTmain.cxx index 097ff62de..d49d3269b 100644 --- a/Main/GLUTmain.cxx +++ b/Main/GLUTmain.cxx @@ -35,6 +35,7 @@ #include #include #include +#include #ifdef HAVE_STDLIB_H # include @@ -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. diff --git a/Main/Makefile.in b/Main/Makefile.in index 07339a381..64171d5f9 100644 --- a/Main/Makefile.in +++ b/Main/Makefile.in @@ -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) diff --git a/Main/fg_init.cxx b/Main/fg_init.cxx index ba9429073..ea7fa1632 100644 --- a/Main/fg_init.cxx +++ b/Main/fg_init.cxx @@ -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.