blob: d48b3fe9841416a75f0abaca1c2427bf602a0fe9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
|