Adding texEnv emulation to Immediate mode.
This commit is contained in:
Родитель
6346adec3b
Коммит
6210052164
1420
src/library_gl.js
1420
src/library_gl.js
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
|
@ -74,9 +74,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
glClearColor( 0, 0, 0, 0 );
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
|
||||
#endif
|
||||
glEnable( GL_TEXTURE_2D ); // Needed when we're using the fixed-function pipeline.
|
||||
|
||||
glViewport( 0, 0, 600, 600 );
|
||||
|
||||
|
|
|
@ -51,9 +51,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
glClearColor( 0, 0, 0, 0 );
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
|
||||
#endif
|
||||
glEnable( GL_TEXTURE_2D ); // Needed when we're using the fixed-function pipeline.
|
||||
|
||||
glViewport( 0, 0, 640, 480 );
|
||||
|
||||
|
|
|
@ -68,9 +68,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
glClearColor( 0, 0, 0, 0 );
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
|
||||
#endif
|
||||
glEnable( GL_TEXTURE_2D ); // Needed when we're using the fixed-function pipeline.
|
||||
|
||||
glViewport( 0, 0, 640, 480 );
|
||||
|
||||
|
|
|
@ -68,9 +68,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
glClearColor( 0, 0, 0, 0 );
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
|
||||
#endif
|
||||
glEnable( GL_TEXTURE_2D ); // Needed when we're using the fixed-function pipeline.
|
||||
|
||||
glViewport( 0, 0, 640, 480 );
|
||||
|
||||
|
|
|
@ -52,9 +52,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
glClearColor( 0, 0, 0, 0 );
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
|
||||
#endif
|
||||
glEnable( GL_TEXTURE_2D ); // Needed when we're using the fixed-function pipeline.
|
||||
|
||||
glViewport( 0, 0, 640, 480 );
|
||||
|
||||
|
@ -148,9 +146,7 @@ int main(int argc, char *argv[])
|
|||
glTexCoord2i( 0, 1 ); glVertex3f( 500, 410, 1 );
|
||||
glEnd();
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
#endif
|
||||
|
||||
glColor3ub(90, 255, 255);
|
||||
glBegin( GL_QUADS );
|
||||
|
|
|
@ -52,9 +52,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
glClearColor( 0, 0, 0, 0 );
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
|
||||
#endif
|
||||
glEnable( GL_TEXTURE_2D ); // Needed when we're using the fixed-function pipeline.
|
||||
|
||||
glViewport( 0, 0, 640, 480 );
|
||||
|
||||
|
@ -149,9 +147,7 @@ int main(int argc, char *argv[])
|
|||
glTexCoord2i( 0, 1 ); glVertex3f( 500, 410, 1 );
|
||||
glEnd();
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
#endif
|
||||
|
||||
glColor3ub(90, 255, 255);
|
||||
glBegin( GL_QUADS );
|
||||
|
|
|
@ -52,9 +52,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
glClearColor( 0, 0, 0, 0 );
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
|
||||
#endif
|
||||
glEnable( GL_TEXTURE_2D ); // Needed when we're using the fixed-function pipeline.
|
||||
|
||||
glViewport( 0, 0, 640, 480 );
|
||||
|
||||
|
@ -150,9 +148,7 @@ int main(int argc, char *argv[])
|
|||
glTexCoord2i( 0, 1 ); glVertex3f( 500, 410, 1 );
|
||||
glEnd();
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
#endif
|
||||
|
||||
glColor3ub(90, 255, 255);
|
||||
glBegin( GL_QUADS );
|
||||
|
|
|
@ -52,9 +52,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
glClearColor( 0, 0, 0, 0 );
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
|
||||
#endif
|
||||
glEnable( GL_TEXTURE_2D ); // Needed when we're using the fixed-function pipeline.
|
||||
|
||||
glViewport( 0, 0, 640, 480 );
|
||||
|
||||
|
@ -147,9 +145,7 @@ int main(int argc, char *argv[])
|
|||
glTexCoord2i( 0, 1 ); glVertex3f( 500, 410, -1 );
|
||||
glEnd();
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
#endif
|
||||
|
||||
glColor3ub(90, 255, 255);
|
||||
glBegin( GL_QUADS );
|
||||
|
|
|
@ -52,10 +52,6 @@ int main(int argc, char *argv[])
|
|||
|
||||
glClearColor( 0, 0, 0, 0 );
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
|
||||
#endif
|
||||
|
||||
glViewport( 0, 0, 640, 480 );
|
||||
|
||||
glMatrixMode( GL_PROJECTION );
|
||||
|
@ -67,6 +63,11 @@ int main(int argc, char *argv[])
|
|||
glMatrixMode( GL_MODELVIEW );
|
||||
glLoadIdentity();
|
||||
|
||||
// Delay Enable to after MatrixMode to assure we've activated
|
||||
// immediate mode. Otherwise, we don't properly record that
|
||||
// TEXTURE_2D is enabled for imm mode emulation.
|
||||
glEnable( GL_TEXTURE_2D ); // Needed when we're using the fixed-function pipeline.
|
||||
|
||||
// Load the OpenGL texture
|
||||
|
||||
GLuint texture; // Texture object handle
|
||||
|
@ -147,9 +148,7 @@ int main(int argc, char *argv[])
|
|||
glTexCoord2i( 0, 1 ); glVertex3f( 500, 410, 1 );
|
||||
glEnd();
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
#endif
|
||||
|
||||
glColor3ub(90, 255, 255);
|
||||
glBegin( GL_QUADS );
|
||||
|
|
|
@ -51,9 +51,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
glClearColor( 0, 0, 0, 0 );
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
|
||||
#endif
|
||||
glEnable( GL_TEXTURE_2D ); // Needed when we're using the fixed-function pipeline.
|
||||
|
||||
glViewport( 0, 0, 640, 480 );
|
||||
|
||||
|
@ -140,9 +138,7 @@ int main(int argc, char *argv[])
|
|||
glTexCoord2i( 0, 1 ); glVertex3f( 500, 410, 0 );
|
||||
glEnd();
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
#endif
|
||||
|
||||
glColor3ub(90, 255, 255);
|
||||
glBegin( GL_QUADS );
|
||||
|
|
|
@ -51,9 +51,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
glClearColor( 0, 0, 0, 0 );
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
|
||||
#endif
|
||||
glEnable( GL_TEXTURE_2D ); // Needed when we're using the fixed-function pipeline.
|
||||
|
||||
glViewport( 0, 0, 640, 480 );
|
||||
|
||||
|
@ -141,9 +139,7 @@ int main(int argc, char *argv[])
|
|||
glTexCoord2i( 0, 1 ); glVertex3f( 500, 410, 0 );
|
||||
glEnd();
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glDisable(GL_TEXTURE_2D);
|
||||
#endif
|
||||
|
||||
glColor3ub(90, 255, 255);
|
||||
glBegin( GL_QUADS );
|
||||
|
|
|
@ -51,9 +51,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
glClearColor( 0, 0, 0, 0 );
|
||||
|
||||
#if !EMSCRIPTEN
|
||||
glEnable( GL_TEXTURE_2D ); // Need this to display a texture XXX unnecessary in OpenGL ES 2.0/WebGL
|
||||
#endif
|
||||
glEnable( GL_TEXTURE_2D ); // Needed when we're using the fixed-function pipeline.
|
||||
|
||||
glViewport( 0, 0, 640, 480 );
|
||||
|
||||
|
|
|
@ -16,7 +16,8 @@ datadir = $(prefix)/share
|
|||
infodir = $(datadir)/info
|
||||
mandir = $(datadir)/man
|
||||
sysconfdir = $(prefix)/etc
|
||||
CPPFLAGS = -DDECODER_ONLY=$(DECODER_ONLY)
|
||||
CXX = g++
|
||||
CPPFLAGS =
|
||||
CXXFLAGS = -Wall -W -O2
|
||||
LDFLAGS =
|
||||
|
||||
|
@ -27,16 +28,16 @@ INSTALL_DATA = $(INSTALL) -p -m 644
|
|||
INSTALL_DIR = $(INSTALL) -d -m 755
|
||||
SHELL = /bin/sh
|
||||
|
||||
objs = decoder.o encoder.o fast_encoder.o main.o
|
||||
recobjs = decoder.o lziprecover.o
|
||||
unzobjs = unzcrash.o
|
||||
objs = arg_parser.o decoder.o encoder.o fast_encoder.o main.o
|
||||
recobjs = arg_parser.o decoder.o lziprecover.o
|
||||
unzobjs = arg_parser.o unzcrash.o
|
||||
|
||||
|
||||
.PHONY : all install install-info install-man install-strip \
|
||||
uninstall uninstall-info uninstall-man \
|
||||
doc info man check dist clean distclean
|
||||
|
||||
all : $(progname)
|
||||
all : $(progname) lziprecover
|
||||
|
||||
$(progname) : $(objs)
|
||||
$(CXX) $(LDFLAGS) -o $@ $(objs)
|
||||
|
@ -63,12 +64,13 @@ unzcrash.o : testsuite/unzcrash.cc
|
|||
$(CXX) $(CPPFLAGS) $(CXXFLAGS) -c -o $@ $<
|
||||
|
||||
$(objs) : Makefile
|
||||
arg_parser.o : arg_parser.h
|
||||
decoder.o : lzip.h decoder.h
|
||||
encoder.o : lzip.h encoder.h
|
||||
fast_encoder.o : lzip.h encoder.h fast_encoder.h
|
||||
main.o : lzip.h decoder.h encoder.h fast_encoder.h
|
||||
lziprecover.o : lzip.h decoder.h Makefile
|
||||
unzcrash.o : Makefile
|
||||
main.o : arg_parser.h lzip.h decoder.h encoder.h fast_encoder.h
|
||||
lziprecover.o : arg_parser.h lzip.h decoder.h Makefile
|
||||
unzcrash.o : arg_parser.h Makefile
|
||||
|
||||
|
||||
doc : info man
|
||||
|
|
Загрузка…
Ссылка в новой задаче