#ifndef GLPONG3D_H #define GLPONG3D_H #include "SDL.h" #include "SDL_opengl.h" #define GLPONG_WIDTH 800.0f #define GLPONG_HEIGHT 600.0f #define GLPONG_FRONT_Z -3.0f #define GLPONG_BACK_Z -9.0f #define GLPONG_NOACTION 0 #define GLPONG_EXIT 1 #if SDL_BYTEORDER == SDL_BIG_ENDIAN #define RMASK 0xff000000 #define GMASK 0x00ff0000 #define BMASK 0x0000ff00 #define AMASK 0x000000ff #else #define RMASK 0x000000ff #define GMASK 0x0000ff00 #define BMASK 0x00ff0000 #define AMASK 0xff000000 #endif GLuint paddle_texture; GLuint paddle_texture_hit; GLuint box; typedef struct { GLfloat x, y, z; } Coord_t; typedef struct { Coord_t coord; GLfloat w, h; GLfloat r, g, b; } Paddle_t; typedef struct { Paddle_t Front; Paddle_t Back; } GLPong_t; GLPong_t GLPong; #endif