now opengl and opengl renderer run and compile, but renderer has a segfault, will fix

This commit is contained in:
Bryan Hoyle 2012-08-12 14:29:27 -04:00
parent 859aa0cf14
commit 530e093d8b
3 changed files with 11 additions and 11 deletions

View File

@ -199,14 +199,6 @@ int SDLOpen()
//SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
atexit(SDL_Quit);
#if defined(OGLI)
int status = glewInit();
if(status != GLEW_OK)
{
fprintf(stderr, "Initializing Glew: %d\n", status);
exit(-1);
}
#endif
return 0;
}
@ -351,6 +343,14 @@ int main(int argc, char * argv[])
#ifdef OGLI
SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1);
//glScaled(2.0f, 2.0f, 1.0f);
#endif
#if defined(OGLI)
int status = glewInit();
if(status != GLEW_OK)
{
fprintf(stderr, "Initializing Glew: %d\n", status);
exit(-1);
}
#endif
ui::Engine::Ref().g = new Graphics();
ui::Engine::Ref().Scale = scale;

View File

@ -7,13 +7,12 @@
#ifdef OGLI
static pthread_mutex_t gMutex = PTHREAD_MUTEX_INITIALIZER;
//static pthread_mutex_t TMPMUT = PTHREAD_MUTEX_INITIALIZER;
Graphics::Graphics():
sdl_scale(1)
{
// if(gMutex == PTHREAD_MUTEX_INITIALIZER)
// if(gMutex == TMPMUT)
// pthread_mutex_init (&gMutex, NULL);
printf("PTHREAD_MUTEX_INITIALIZER\n");
Reset();
glEnable(GL_BLEND);

View File

@ -85,6 +85,7 @@ public:
void checkShader(GLuint shader, char * shname);
void checkProgram(GLuint program, char * progname);
void loadShaders();
GLuint vidBuf,textTexture;
#endif
pixel * vid;
pixel * persistentVid;