Initial commit
This commit is contained in:
142
application/demos/example.opengl/engine/opengl.h
Normal file
142
application/demos/example.opengl/engine/opengl.h
Normal file
@@ -0,0 +1,142 @@
|
||||
#ifndef _opengl
|
||||
|
||||
#define _opengl
|
||||
|
||||
|
||||
// Macros
|
||||
|
||||
#define GL_GLEXT_PROTOTYPES
|
||||
|
||||
|
||||
|
||||
|
||||
#include "stdlib.h"
|
||||
|
||||
extern char * __ClassNames[];
|
||||
|
||||
|
||||
// Includes
|
||||
|
||||
#include <zlib.h>
|
||||
|
||||
#include <time.h>
|
||||
|
||||
#include <GL/glx.h>
|
||||
|
||||
#include <GL/gl.h>
|
||||
|
||||
#include <GL/glext.h>
|
||||
|
||||
#include <X11/keysym.h>
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#include <math.h>
|
||||
|
||||
#include "./event.h"
|
||||
|
||||
#include "./windowManager.h"
|
||||
|
||||
#include "./resourceManager.h"
|
||||
|
||||
#include "./renderPasses/renderPassTesselation.h"
|
||||
|
||||
#include "./renderPasses/renderPassCompute2.h"
|
||||
|
||||
#include "./renderPasses/renderPassCompute.h"
|
||||
|
||||
#include "./renderPasses/renderPassFont.h"
|
||||
|
||||
#include "./renderPasses/renderPassQuads.h"
|
||||
|
||||
#include "./pipeline.h"
|
||||
|
||||
#include "./eventManager.h"
|
||||
|
||||
#include "./unsignedIntegerArray.h"
|
||||
|
||||
#include "./floatArray.h"
|
||||
|
||||
#include "./texture2D.h"
|
||||
|
||||
#include "./sampler2D.h"
|
||||
|
||||
#include "./shader.h"
|
||||
|
||||
#include "./mesh.h"
|
||||
|
||||
|
||||
typedef struct opengl{
|
||||
|
||||
Display * mainDisplay;
|
||||
|
||||
Window mainWindow;
|
||||
|
||||
int MainScreen;
|
||||
|
||||
Window RootWindow;
|
||||
|
||||
int lastTime;
|
||||
|
||||
struct timespec startTime;
|
||||
|
||||
int frameCount;
|
||||
|
||||
sampler2D * testSampler;
|
||||
|
||||
struct windowManager * windowManager;
|
||||
|
||||
struct eventManger * eventManger;
|
||||
|
||||
struct pipeline * pipeline;
|
||||
|
||||
|
||||
} opengl;
|
||||
|
||||
void opengl_initialize( opengl * this );
|
||||
|
||||
void opengl_showExtensions( opengl * this );
|
||||
|
||||
void opengl_showVersion( opengl * this );
|
||||
|
||||
void opengl_setupTime( opengl * this );
|
||||
|
||||
void opengl_setupManagers( opengl * this );
|
||||
|
||||
void opengl_setupWindow( opengl * this );
|
||||
|
||||
void opengl_setupRenderLoop( opengl * this );
|
||||
|
||||
void opengl_setupPipeline( opengl * this );
|
||||
|
||||
double opengl_clockToMilliseconds( opengl * this, clock_t ticks );
|
||||
|
||||
void opengl_render( opengl * this );
|
||||
|
||||
void opengl_displayFPS( opengl * this );
|
||||
|
||||
void opengl_clear( opengl * this, GLbitfield mask );
|
||||
|
||||
void opengl_clearColor( opengl * this, float r, float g, float b, float a );
|
||||
|
||||
void opengl_swapBuffers( opengl * this );
|
||||
|
||||
resourceManager * resources;
|
||||
|
||||
event * globalEvent;
|
||||
|
||||
opengl opengl_new( );
|
||||
|
||||
opengl * opengl_newPointer( );
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
typedef struct opengl opengl;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user