summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--glpong3d.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/glpong3d.c b/glpong3d.c
index c4c4112..d64faf9 100644
--- a/glpong3d.c
+++ b/glpong3d.c
@@ -253,17 +253,6 @@ void GLPong_Move(void) {
void GLPong_Draw(void) {
float count;
- glLoadIdentity();
- glColor3f(0.0f, 0.0f, 0.0f);
- glTranslatef(0.0f, 0.0f, GLPONG_BACK_Z);
- glBegin(GL_QUADS);
- glTexCoord2f(0.875f, 0.0f); glVertex2f( 1.5f, 1.0f); /* Upper Right */
- glTexCoord2f(0.125f, 0.0f); glVertex2f(-1.5f, 1.0f); /* Upper Left */
- glTexCoord2f(0.125f, 1.0f); glVertex2f(-1.5f, -1.0f); /* Lower Left */
- glTexCoord2f(0.875f, 1.0f); glVertex2f( 1.5f, -1.0f); /* Lower Right */
- glEnd();
- glDisable(GL_TEXTURE_2D);
-
glColor3f(0.0f, 1.0f, 0.0f);
for (count = GLPONG_FRONT_Z; count >= GLPONG_BACK_Z; count -= 1.0f) {
glLoadIdentity();
@@ -390,9 +379,8 @@ static void
SDL_GL_GetMouseState(Paddle_t * paddle) {
int x, y;
float temp_x, temp_y;
- Uint8 * key;
- key = SDL_GetKeyState(NULL);
+ SDL_PumpEvents();
SDL_GetMouseState(&x, &y);
temp_x = ((float) x / GLPONG_WIDTH) * 3.3f - 1.65f;