prosperon/source/engine/openglrender.h

56 lines
1.2 KiB
C
Raw Normal View History

2021-11-30 21:29:18 -06:00
#ifndef OPENGL_RENDER_H
#define OPENGL_RENDER_H
#include "render.h"
2022-01-19 16:43:21 -06:00
#include "window.h"
2021-11-30 21:29:18 -06:00
struct mCamera;
struct mSDLWindow;
extern struct mShader *spriteShader;
extern struct mShader *animSpriteShader;
extern struct mSprite *tsprite;
extern int renderMode;
extern float editorClose;
extern float editorFar;
extern float gridScale;
extern float smallGridUnit;
extern float bigGridUnit;
extern float gridSmallThickness;
extern float gridBigThickness;
extern float gridBigColor[];
extern float gridSmallColor[];
extern float gridOpacity;
extern float editorFOV;
extern float shadowLookahead;
extern float plane_size;
extern float near_plane;
extern float far_plane;
extern char objectName[];
extern uint16_t debugColorPickBO;
extern struct mGameObject *selectedobject;
enum RenderMode {
LIT,
UNLIT,
WIREFRAME,
DIRSHADOWMAP,
OBJECTPICKER
};
2022-01-19 16:43:21 -06:00
void openglInit(struct mSDLWindow *window);
void openglRender(struct mSDLWindow *window, struct mCamera *camera);
2021-11-30 21:29:18 -06:00
void openglInit3d(struct mSDLWindow *window);
void openglRender3d(struct mSDLWindow *window, struct mCamera *camera);
void BindUniformBlock(GLuint shaderID, const char *bufferName,
GLuint bufferBind);
#endif