summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/main.c b/src/main.c
index a73bf44..3f18052 100644
--- a/src/main.c
+++ b/src/main.c
@@ -77,28 +77,10 @@ int main(void)
if ( ge.sdl_target == NULL ) return 9;
ge.raw_target = malloc(256*256*4);
if ( ge.raw_target == NULL ) return 10;
- ge.gl_ctx = SDL_GL_CreateContext(ge.sdl_win);
- if ( ge.gl_ctx == NULL ) return 11;
-
// Initialize OpenGL
- glShadeModel(GL_SMOOTH);
- glClearDepth(1.0f);
- glEnable(GL_DEPTH_TEST);
- glDepthFunc(GL_LEQUAL);
- glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
- glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
-
- glDisable(GL_TEXTURE_2D);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
- glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
- glEnable(GL_CULL_FACE);
- glCullFace(GL_FRONT);
- glViewport(0, 0, (GLsizei)256, (GLsizei)256);
- glMatrixMode(GL_PROJECTION); glLoadIdentity(); gluPerspective(45.0f, 1.0f, 0.1f, 100.0f); // 1.0f==ratio
- glMatrixMode(GL_MODELVIEW); glLoadIdentity();
+ ge.gl_ctx = SDL_GL_CreateContext(ge.sdl_win);
+ if ( ge.gl_ctx == NULL ) return 11;
// Main libcaca loop for caca window (OpenGL could be used in sceneN_next())
ge.framecount=0;