浏览代码

removed unused code in gl example

Fredrik Hultin 12 年之前
父节点
当前提交
bee85b49e2
共有 1 个文件被更改,包括 0 次插入28 次删除
  1. 0 28
      examples/opengl/gl.c

+ 0 - 28
examples/opengl/gl.c

@@ -70,8 +70,6 @@ void init_gl(gl_ctx* ctx, int w, int h)
 	glLoadIdentity();
 
 	glViewport(0, 0, ctx->screen->w, ctx->screen->h);
-
-	perspective(ctx);
 }
 
 void ortho(gl_ctx* ctx)
@@ -91,32 +89,6 @@ void ortho(gl_ctx* ctx)
 	glDisable(GL_MULTISAMPLE);
 }
 
-void calculate_frustum(double fovy, double aspect, double znear, double zfar)
-{
-	float fh = tan(fovy / 360 * M_PI) * znear;
-	float fw = fh * aspect;
-	glFrustum(-fw, fw, -fh, fh, znear, zfar);
-}
-
-void perspective(gl_ctx* ctx)
-{
-	glViewport(0, 0, ctx->screen->w, ctx->screen->h);
-	
-	glMatrixMode(GL_PROJECTION);
-
-	glLoadIdentity();
-	calculate_frustum(90, ctx->screen->w / ctx->screen->h, .1, 5000);
-
-	glMatrixMode(GL_MODELVIEW);
-	glLoadIdentity();
-
-	glEnable(GL_DEPTH);
-	glEnable(GL_MULTISAMPLE_ARB);
-
-	glDepthFunc(GL_LEQUAL);
-	glEnable(GL_DEPTH_TEST);
-}
-
 void draw_cube()
 {
 	glBegin(GL_QUADS);