summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephane Marchesin <stephane.marchesin@gmail.com>2010-04-22 16:22:12 -0700
committerStephane Marchesin <stephane.marchesin@gmail.com>2010-04-22 16:22:12 -0700
commitdac89996fa5b4da8e20d2b0a1475f75c673f78a0 (patch)
tree5e507338e231cd7ca9783d95a7115ba7ab0e0521
parentc0cf0771fea938fa6278aea57088e0a883edafe6 (diff)
GL: use texsubimage instead.gl
-rw-r--r--render-gl.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/render-gl.c b/render-gl.c
index b41a8c8..72e6fda 100644
--- a/render-gl.c
+++ b/render-gl.c
@@ -283,11 +283,7 @@ void render_begin(void)
glClearColor(0, 0, 0, 0);
glClear(GL_COLOR_BUFFER_BIT);
-#ifdef __APPLE__
- glViewport(0, 0, 320 * pix_size, 240 * pix_size);
-#else
glViewport(0, 0, 320, 240);
-#endif
set_render_state(state_nothing);
}
@@ -296,9 +292,8 @@ void render_begin(void)
void render_end(void)
{
-#ifndef __APPLE__
glBindTexture(GL_TEXTURE_RECTANGLE_ARB, render_tex);
- glCopyTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, GL_RGBA, 0, 0, 320, 240, 0);
+ glCopyTexSubImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, 0, 0, 0, 0, 320, 240);
glViewport(0, 0, 320 * pix_size, 240 * pix_size);
@@ -310,7 +305,6 @@ void render_end(void)
glTexCoord2f(320.0, 0.0); glVertex2f(320.0, 240.0);
glTexCoord2f(0.0, 0.0); glVertex2f(0.0, 240.0);
glEnd();
-#endif
}