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
 

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)   fn
 
#define G_CHECK_GL2(value, fn)   value = fn
 

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, float thickness=1.0f)
 
void gDrawLine (float x1, float y1, float z1, float x2, float y2, float z2, float thickness=1.0f)
 
void gDrawTriangle (float px, float py, float qx, float qy, float rx, float ry, bool is_filled=true)
 
void gDrawCircle (float xCenter, float yCenter, float radius, bool isFilled=false, float numberOfSides=64.0f)
 
void gDrawCross (float x, float y, float width, float height, float thickness, bool isFilled)
 
void gDrawArc (float xCenter, float yCenter, float radius, bool isFilled=true, int numberOfSides=60, float degree=360.0f, float rotate=360.0f)
 
void gDrawArrow (float x1, float y1, float length, float angle, float tipLength, float tipAngle)
 
void gDrawRectangle (float x, float y, float w, float h, bool isFilled=false)
 
void gDrawRoundedRectangle (float x, float y, float w, float h, int radius, bool isFilled)
 
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 (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)
 

Macro Definition Documentation

◆ CORE_GRENDERER_H_

#define CORE_GRENDERER_H_

◆ G_CHECK_GL

#define G_CHECK_GL (   fn)    fn

◆ G_CHECK_GL2

#define G_CHECK_GL2 (   value,
  fn 
)    value = fn

◆ 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 
)

◆ 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 
)

◆ gDrawArrow()

void gDrawArrow ( float  x1,
float  y1,
float  length,
float  angle,
float  tipLength,
float  tipAngle 
)

◆ gDrawBox() [1/2]

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

◆ gDrawBox() [2/2]

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

◆ gDrawCircle()

void gDrawCircle ( float  xCenter,
float  yCenter,
float  radius,
bool  isFilled = false,
float  numberOfSides = 64.0f 
)

◆ 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 
)

◆ 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/2]

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

◆ gDrawLine() [2/2]

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 
)

◆ gDrawRoundedRectangle()

void gDrawRoundedRectangle ( float  x,
float  y,
float  w,
float  h,
int  radius,
bool  isFilled 
)

◆ 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 
)

◆ 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)