3 * @purpose Wrapper to the SDL and OpenGL libraries, used for N-Body simulator. Declarations.
13 #include <SDL/SDL_opengl.h>
15 #ifndef DIMENSIONS //Check so that DIMENSIONS can be defined elsewhere (ie in "nbody.h")
20 extern void Graphics_Init(const char * caption, int w, int h); //Initialise graphics
21 extern void Graphics_Destroy(); //Destroy graphics
22 extern void Graphics_Update(); //Update view
23 extern void Graphics_Clear(float r, float g, float b); //Clear screen
24 extern void Graphics_Pixel(int x[DIMENSIONS], float r, float g, float b); //Draw single pixel
25 extern void Graphics_Line(int x1[DIMENSIONS], int x2[DIMENSIONS], float r, float g, float b); //Draw straight line
26 extern void Graphics_Circle(int x[2], float radius, float r, float g, float b); //Draw circle
28 extern void Process_Events(); //Handle any events from the SDL system
30 extern void Graphics_DrawPixel(int x[DIMENSIONS], float r, float g, float b);