now opengl and opengl renderer run and compile, but renderer has a segfault, will fix
This commit is contained in:
parent
859aa0cf14
commit
530e093d8b
@ -199,14 +199,6 @@ int SDLOpen()
|
|||||||
//SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
|
//SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, SDL_DEFAULT_REPEAT_INTERVAL);
|
||||||
atexit(SDL_Quit);
|
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;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -351,6 +343,14 @@ int main(int argc, char * argv[])
|
|||||||
#ifdef OGLI
|
#ifdef OGLI
|
||||||
SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1);
|
SDL_GL_SetAttribute (SDL_GL_DOUBLEBUFFER, 1);
|
||||||
//glScaled(2.0f, 2.0f, 1.0f);
|
//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
|
#endif
|
||||||
ui::Engine::Ref().g = new Graphics();
|
ui::Engine::Ref().g = new Graphics();
|
||||||
ui::Engine::Ref().Scale = scale;
|
ui::Engine::Ref().Scale = scale;
|
||||||
|
@ -7,13 +7,12 @@
|
|||||||
#ifdef OGLI
|
#ifdef OGLI
|
||||||
|
|
||||||
static pthread_mutex_t gMutex = PTHREAD_MUTEX_INITIALIZER;
|
static pthread_mutex_t gMutex = PTHREAD_MUTEX_INITIALIZER;
|
||||||
|
//static pthread_mutex_t TMPMUT = PTHREAD_MUTEX_INITIALIZER;
|
||||||
Graphics::Graphics():
|
Graphics::Graphics():
|
||||||
sdl_scale(1)
|
sdl_scale(1)
|
||||||
{
|
{
|
||||||
// if(gMutex == PTHREAD_MUTEX_INITIALIZER)
|
// if(gMutex == TMPMUT)
|
||||||
// pthread_mutex_init (&gMutex, NULL);
|
// pthread_mutex_init (&gMutex, NULL);
|
||||||
printf("PTHREAD_MUTEX_INITIALIZER\n");
|
|
||||||
Reset();
|
Reset();
|
||||||
|
|
||||||
glEnable(GL_BLEND);
|
glEnable(GL_BLEND);
|
||||||
|
@ -85,6 +85,7 @@ public:
|
|||||||
void checkShader(GLuint shader, char * shname);
|
void checkShader(GLuint shader, char * shname);
|
||||||
void checkProgram(GLuint program, char * progname);
|
void checkProgram(GLuint program, char * progname);
|
||||||
void loadShaders();
|
void loadShaders();
|
||||||
|
GLuint vidBuf,textTexture;
|
||||||
#endif
|
#endif
|
||||||
pixel * vid;
|
pixel * vid;
|
||||||
pixel * persistentVid;
|
pixel * persistentVid;
|
||||||
|
Reference in New Issue
Block a user