diff options
author | Matt Turner <mattst88@gmail.com> | 2006-08-03 22:55:17 +0000 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2006-08-03 22:55:17 +0000 |
commit | d680d25c6a10678f0c999ade1041e363b0df7e91 (patch) | |
tree | e83fdf7d6f9bba468915f237a93dd68041ae11d9 /glpong.h | |
parent | 6038164bf457873d51a825ff48cf50f6080ff818 (diff) |
Code Import
git-svn-id: svn://mattst88.com/svn/glpong/trunk@2 449aeecc-241a-0410-943f-e2f883e2d7a2
Diffstat (limited to 'glpong.h')
-rw-r--r-- | glpong.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/glpong.h b/glpong.h new file mode 100644 index 0000000..d48b3fe --- /dev/null +++ b/glpong.h @@ -0,0 +1,30 @@ +#ifndef GLPONG_H
+#define GLPONG_H
+
+#include "SDL.h"
+#include "SDL_opengl.h"
+
+#include "ball.h"
+#include "paddle.h"
+
+struct {
+ SDL_Event Event;
+ SDL_Surface * Surface;
+ Ball_t * Balls[4];
+ Paddle_t Left, Right;
+ Uint16 w;
+ Uint16 h;
+ Uint16 done;
+} GLPong;
+
+void GLPong_Init();
+void GLPong_HandleEvents();
+void GLPong_Draw();
+void GLPong_CleanUp();
+void GLPong_Move();
+
+GLuint SDL_GL_SurfaceToTexture(SDL_Surface * surface);
+GLuint SDL_GL_NPOTSurfaceToTexture(SDL_Surface * surface, GLfloat * wratio, GLfloat * hratio);
+__inline__ unsigned int NextPow2(unsigned int value);
+
+#endif
|