GlistEngine
Loading...
Searching...
No Matches
gRenderer.h File Reference
#include "gObject.h"
#include <glm/glm.hpp>
#include <glm/gtc/matrix_inverse.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/quaternion.hpp>
#include "gColor.h"
#include "gConstants.h"
#include <deque>
#include <memory>
#include <vector>
Include dependency graph for gRenderer.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  gRenderer
struct  gRenderer::gSceneLightData
struct  gRenderer::gSceneLights
struct  gRenderer::gSceneFogData
struct  gRenderer::gSceneData
struct  gRenderer::gMeshSurface

Macros

#define CORE_GRENDERER_H_
#define GLM_ENABLE_EXPERIMENTAL
#define GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
#define GLIST_MAX_LIGHTS   8
#define G_CHECK_GL(fn)
#define G_CHECK_GL2(value, fn)
#define glClear(mask)
#define glBlendFunc(sourceFactor, destinationFactor)

Functions

void gCheckGLErrorAndPrint (const std::string &prefix, const std::string &func, int line)
void gEnableCulling ()
void gDisableCulling ()
bool gIsCullingEnabled ()
void gCullFace (int cullingFace)
int gGetCullFace ()
void gSetCullingDirection (int cullingDirection)
int gGetCullingDirection ()
void gDrawLine (float x1, float y1, float x2, float y2)
void gDrawLine (float x1, float y1, float x2, float y2, float thickness)
void gDrawLine (float x1, float y1, float z1, float x2, float y2, float z2, float thickness=1.0f)
void gDrawLine (float x1, float y1, float x2, float y2, float thickness, float rotateAngle, float pivotx, float pivoty)
void gDrawTriangle (float px, float py, float qx, float qy, float rx, float ry, bool is_filled=true, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)
void gDrawCircle (float xCenter, float yCenter, float radius, bool isFilled=false, float numberOfSides=64.0f, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)
void gDrawCross (float x, float y, float width, float height, float thickness, bool isFilled, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)
void gDrawArc (float xCenter, float yCenter, float radius, bool isFilled=true, int numberOfSides=60, float degree=360.0f, float rotate=360.0f, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)
void gDrawArrow (float x1, float y1, float length, float angle, float tipLength, float tipAngle, float thickness=1.0f, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)
void gDrawRectangle (float x, float y, float w, float h, bool isFilled=false, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)
void gDrawRoundedRectangle (float x, float y, float w, float h, int radius, bool isFilled, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)
void gDrawBox (float x, float y, float z, float w=1.0f, float h=1.0f, float d=1.0f, bool isFilled=true)
void gDrawBox (float x, float y, float z, float w, float h, float d, float rotateAngle, float axisX, float axisY, float axisZ, bool isFilled=true)
void gDrawBox (glm::mat4 transformationMatrix, bool isFilled=true)
void gDrawSphere (float xPos, float yPos, float zPos, glm::vec3 scale=glm::vec3(1.0f, 1.0f, 1.0f), int xSegmentNum=64, int ySegmentNum=32, bool isFilled=true)
void gDrawCylinder (float x, float y, float z, int r, int h, glm::vec3 scale=glm::vec3(1.0f, 1.0f, 1.0f), int segmentnum=32, bool isFilled=true)
void gDrawCylinderOblique (float x, float y, float z, int r, int h, glm::vec2 shiftdistance, glm::vec3 scale=glm::vec3(1.0f, 1.0f, 1.0f), int segmentnum=32, bool isFilled=true)
void gDrawCylinderTrapezodial (float x, float y, float z, int r1, int r2, int h, glm::vec3 scale=glm::vec3(1.0f, 1.0f, 1.0f), int segmentnum=32, bool isFilled=true)
void gDrawCylinderObliqueTrapezodial (float x, float y, float z, int r1, int r2, int h, glm::vec2 shiftdistance, glm::vec3 scale=glm::vec3(1.0, 1.0, 1.0), int segmentnum=32, bool isFilled=true)
void gDrawCone (float x, float y, float z, int r, int h, glm::vec3 scale=glm::vec3(1.0f, 1.0f, 1.0f), int segmentnum=32, bool isFilled=true)
void gDrawConeOblique (float x, float y, float z, int r, int h, glm::vec2 shiftdistance, glm::vec3 scale=glm::vec3(1.0f, 1.0f, 1.0f), int segmentnum=32, bool isFilled=true)
void gDrawPyramid (float x, float y, float z, int r, int h, glm::vec3 scale=glm::vec3(1.0f, 1.0f, 1.0f), int numberofsides=4, bool isFilled=true)
void gDrawPyramidOblique (float x, float y, float z, int r, int h, glm::vec2 shiftdistance, glm::vec3 scale=glm::vec3(1.0f, 1.0f, 1.0f), int numberofsides=4, bool isFilled=true)
void gDrawTube (float x, float y, float z, int outerradius, int innerradious, int h, glm::vec3 scale=glm::vec3(1.0f, 1.0f, 1.0f), int segmentnum=32, bool isFilled=true)
void gDrawTubeOblique (float x, float y, float z, int outerradius, int innerradious, int h, glm::vec2 shiftdistance, glm::vec3 scale=glm::vec3(1.0f, 1.0f, 1.0f), int segmentnum=32, bool isFilled=true)
void gDrawTubeTrapezodial (float x, float y, float z, int topouterradius, int topinnerradious, int buttomouterradious, int buttominnerradious, int h, glm::vec3 scale=glm::vec3(1.0f, 1.0f, 1.0f), int segmentnum=32, bool isFilled=true)
void gDrawTubeObliqueTrapezodial (float x, float y, float z, int topouterradius, int topinnerradious, int buttomouterradious, int buttominnerradious, int h, glm::vec2 shiftdistance, glm::vec3 scale=glm::vec3(1.0f, 1.0f, 1.0f), int segmentnum=32, bool isFilled=true)
void gCompatClear (unsigned int mask)
void gCompatBlendFunc (unsigned int sourceFactor, unsigned int destinationFactor)

Macro Definition Documentation

◆ CORE_GRENDERER_H_

#define CORE_GRENDERER_H_

◆ G_CHECK_GL

#define G_CHECK_GL ( fn)
Value:
fn

◆ G_CHECK_GL2

#define G_CHECK_GL2 ( value,
fn )
Value:
value = fn

◆ glBlendFunc

#define glBlendFunc ( sourceFactor,
destinationFactor )
Value:
gCompatBlendFunc(sourceFactor, destinationFactor)
void gCompatBlendFunc(unsigned int sourceFactor, unsigned int destinationFactor)

◆ glClear

#define glClear ( mask)
Value:
void gCompatClear(unsigned int mask)

◆ GLIST_MAX_LIGHTS

#define GLIST_MAX_LIGHTS   8

◆ GLM_ENABLE_EXPERIMENTAL

#define GLM_ENABLE_EXPERIMENTAL

◆ GLM_FORCE_DEFAULT_ALIGNED_GENTYPES

#define GLM_FORCE_DEFAULT_ALIGNED_GENTYPES

Function Documentation

◆ gCheckGLErrorAndPrint()

void gCheckGLErrorAndPrint ( const std::string & prefix,
const std::string & func,
int line )

◆ gCompatBlendFunc()

void gCompatBlendFunc ( unsigned int sourceFactor,
unsigned int destinationFactor )

◆ gCompatClear()

void gCompatClear ( unsigned int mask)

◆ gCullFace()

void gCullFace ( int cullingFace)

◆ gDisableCulling()

void gDisableCulling ( )

◆ gDrawArc()

void gDrawArc ( float xCenter,
float yCenter,
float radius,
bool isFilled = true,
int numberOfSides = 60,
float degree = 360.0f,
float rotate = 360.0f,
float rotateAngle = 0.0f,
float pivotx = 0.5f,
float pivoty = 0.5f )

◆ gDrawArrow()

void gDrawArrow ( float x1,
float y1,
float length,
float angle,
float tipLength,
float tipAngle,
float thickness = 1.0f,
float rotateAngle = 0.0f,
float pivotx = 0.5f,
float pivoty = 0.5f )

◆ gDrawBox() [1/3]

void gDrawBox ( float x,
float y,
float z,
float w,
float h,
float d,
float rotateAngle,
float axisX,
float axisY,
float axisZ,
bool isFilled = true )

◆ gDrawBox() [2/3]

void gDrawBox ( float x,
float y,
float z,
float w = 1.0f,
float h = 1.0f,
float d = 1.0f,
bool isFilled = true )

◆ gDrawBox() [3/3]

void gDrawBox ( glm::mat4 transformationMatrix,
bool isFilled = true )

◆ gDrawCircle()

void gDrawCircle ( float xCenter,
float yCenter,
float radius,
bool isFilled = false,
float numberOfSides = 64.0f,
float rotateAngle = 0.0f,
float pivotx = 0.5f,
float pivoty = 0.5f )

◆ gDrawCone()

void gDrawCone ( float x,
float y,
float z,
int r,
int h,
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f),
int segmentnum = 32,
bool isFilled = true )

◆ gDrawConeOblique()

void gDrawConeOblique ( float x,
float y,
float z,
int r,
int h,
glm::vec2 shiftdistance,
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f),
int segmentnum = 32,
bool isFilled = true )

◆ gDrawCross()

void gDrawCross ( float x,
float y,
float width,
float height,
float thickness,
bool isFilled,
float rotateAngle = 0.0f,
float pivotx = 0.5f,
float pivoty = 0.5f )

◆ gDrawCylinder()

void gDrawCylinder ( float x,
float y,
float z,
int r,
int h,
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f),
int segmentnum = 32,
bool isFilled = true )

◆ gDrawCylinderOblique()

void gDrawCylinderOblique ( float x,
float y,
float z,
int r,
int h,
glm::vec2 shiftdistance,
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f),
int segmentnum = 32,
bool isFilled = true )

◆ gDrawCylinderObliqueTrapezodial()

void gDrawCylinderObliqueTrapezodial ( float x,
float y,
float z,
int r1,
int r2,
int h,
glm::vec2 shiftdistance,
glm::vec3 scale = glm::vec3(1.0, 1.0, 1.0),
int segmentnum = 32,
bool isFilled = true )

◆ gDrawCylinderTrapezodial()

void gDrawCylinderTrapezodial ( float x,
float y,
float z,
int r1,
int r2,
int h,
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f),
int segmentnum = 32,
bool isFilled = true )

◆ gDrawLine() [1/4]

void gDrawLine ( float x1,
float y1,
float x2,
float y2 )

◆ gDrawLine() [2/4]

void gDrawLine ( float x1,
float y1,
float x2,
float y2,
float thickness )

◆ gDrawLine() [3/4]

void gDrawLine ( float x1,
float y1,
float x2,
float y2,
float thickness,
float rotateAngle,
float pivotx,
float pivoty )

◆ gDrawLine() [4/4]

void gDrawLine ( float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float thickness = 1.0f )

◆ gDrawPyramid()

void gDrawPyramid ( float x,
float y,
float z,
int r,
int h,
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f),
int numberofsides = 4,
bool isFilled = true )

◆ gDrawPyramidOblique()

void gDrawPyramidOblique ( float x,
float y,
float z,
int r,
int h,
glm::vec2 shiftdistance,
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f),
int numberofsides = 4,
bool isFilled = true )

◆ gDrawRectangle()

void gDrawRectangle ( float x,
float y,
float w,
float h,
bool isFilled = false,
float rotateAngle = 0.0f,
float pivotx = 0.5f,
float pivoty = 0.5f )

◆ gDrawRoundedRectangle()

void gDrawRoundedRectangle ( float x,
float y,
float w,
float h,
int radius,
bool isFilled,
float rotateAngle = 0.0f,
float pivotx = 0.5f,
float pivoty = 0.5f )

◆ gDrawSphere()

void gDrawSphere ( float xPos,
float yPos,
float zPos,
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f),
int xSegmentNum = 64,
int ySegmentNum = 32,
bool isFilled = true )

◆ gDrawTriangle()

void gDrawTriangle ( float px,
float py,
float qx,
float qy,
float rx,
float ry,
bool is_filled = true,
float rotateAngle = 0.0f,
float pivotx = 0.5f,
float pivoty = 0.5f )

◆ gDrawTube()

void gDrawTube ( float x,
float y,
float z,
int outerradius,
int innerradious,
int h,
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f),
int segmentnum = 32,
bool isFilled = true )

◆ gDrawTubeOblique()

void gDrawTubeOblique ( float x,
float y,
float z,
int outerradius,
int innerradious,
int h,
glm::vec2 shiftdistance,
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f),
int segmentnum = 32,
bool isFilled = true )

◆ gDrawTubeObliqueTrapezodial()

void gDrawTubeObliqueTrapezodial ( float x,
float y,
float z,
int topouterradius,
int topinnerradious,
int buttomouterradious,
int buttominnerradious,
int h,
glm::vec2 shiftdistance,
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f),
int segmentnum = 32,
bool isFilled = true )

◆ gDrawTubeTrapezodial()

void gDrawTubeTrapezodial ( float x,
float y,
float z,
int topouterradius,
int topinnerradious,
int buttomouterradious,
int buttominnerradious,
int h,
glm::vec3 scale = glm::vec3(1.0f, 1.0f, 1.0f),
int segmentnum = 32,
bool isFilled = true )

◆ gEnableCulling()

void gEnableCulling ( )

◆ gGetCullFace()

int gGetCullFace ( )

◆ gGetCullingDirection()

int gGetCullingDirection ( )

◆ gIsCullingEnabled()

bool gIsCullingEnabled ( )

◆ gSetCullingDirection()

void gSetCullingDirection ( int cullingDirection)