Fixed up OpenGL code from last round

git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@222 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
mudlord 2007-12-23 20:03:57 +00:00
parent b1fa777574
commit 6418ed33b0
1 changed files with 3 additions and 4 deletions

View File

@ -35,7 +35,6 @@
// OpenGL // OpenGL
#include <gl/GL.h> // main include file #include <gl/GL.h> // main include file
#include <GL/glu.h> #include <GL/glu.h>
#include <GL/glaux.h>
#ifdef HAS_GLEXT #ifdef HAS_GLEXT
#include <gl/glext.h> #include <gl/glext.h>
#endif #endif
@ -56,6 +55,8 @@ PFNGLUNIFORM4FARBPROC glUniform4fARB = NULL;
PFNGLUNIFORM1IARBPROC glUniform1iARB = NULL; PFNGLUNIFORM1IARBPROC glUniform1iARB = NULL;
extern int Init_2xSaI(u32); extern int Init_2xSaI(u32);
extern void winlog(const char *,...); extern void winlog(const char *,...);
extern int systemSpeed; extern int systemSpeed;
@ -86,7 +87,6 @@ private:
GLFONT font; GLFONT font;
int VertexShader,FragmentShader,textureLocation,ShaderProgram,g_location_grayScaleWeights; int VertexShader,FragmentShader,textureLocation,ShaderProgram,g_location_grayScaleWeights;
char *VertexShaderSource,*FragmentShaderSource; char *VertexShaderSource,*FragmentShaderSource;
int ShaderProgram;
void initializeMatrices( int w, int h ); void initializeMatrices( int w, int h );
bool initializeTexture( int w, int h ); bool initializeTexture( int w, int h );
@ -308,7 +308,6 @@ bool OpenGLDisplay::initialize()
glEnable( GL_TEXTURE_2D ); glEnable( GL_TEXTURE_2D );
glEnable(GL_BLEND); glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
glewInit();
initializeMatrices( theApp.surfaceSizeX, theApp.surfaceSizeY ); initializeMatrices( theApp.surfaceSizeX, theApp.surfaceSizeY );
@ -356,7 +355,7 @@ void OpenGLDisplay::render()
} }
else{ else{
glUseProgramObjectARB(NULL); glUseProgramObjectARB(NULL);
DeInitShader(); DeInitGLSLShader();
} }
int pitch = theApp.filterWidth * (systemColorDepth>>3) + 4; int pitch = theApp.filterWidth * (systemColorDepth>>3) + 4;