10#ifndef CORE_GRENDERER_H_
11#define CORE_GRENDERER_H_
15#if defined(WIN32) || defined(LINUX)
21#if defined(EMSCRIPTEN)
23#include <GLES3/gl2ext.h>
24#include <GLES3/gl3platform.h>
28#include <GLES3/gl3ext.h>
29#include <GLES3/gl3platform.h>
32#include <TargetConditionals.h>
37#include <OpenGL/glu.h>
39#if TARGET_OS_IPHONE || TARGET_OS_SIMULATOR
40# include <OpenGLES/ES3/gl.h>
41# include <OpenGLES/ES3/glext.h>
42# include <OpenGLES/gltypes.h>
44#define GLM_ENABLE_EXPERIMENTAL
45#define GLM_FORCE_DEFAULT_ALIGNED_GENTYPES
47#include <glm/gtc/matrix_inverse.hpp>
48#include <glm/gtc/matrix_transform.hpp>
49#include <glm/gtx/quaternion.hpp>
57#ifndef GLIST_MAX_LIGHTS
59#define GLIST_MAX_LIGHTS 8
64#if defined(DEBUG) || defined(ENGINE_OPENGL_CHECKS)
65#define G_CHECK_GL(a) gCheckGLErrorAndPrint("Previously Unhandled ", __PRETTY_FUNCTION__, __LINE__); a; gCheckGLErrorAndPrint("", __PRETTY_FUNCTION__, __LINE__)
66#define G_CHECK_GL2(value, fn) gCheckGLErrorAndPrint("Previously Unhandled ", __PRETTY_FUNCTION__, __LINE__); value = fn; gCheckGLErrorAndPrint("", __PRETTY_FUNCTION__, __LINE__)
68#define G_CHECK_GL(fn) fn
69#define G_CHECK_GL2(value, fn) value = fn
83void gDrawLine(
float x1,
float y1,
float x2,
float y2);
84void gDrawLine(
float x1,
float y1,
float x2,
float y2,
float thickness);
85void gDrawLine(
float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float thickness = 1.0f);
86void gDrawLine(
float x1,
float y1,
float x2,
float y2,
float thickness,
float rotateAngle,
float pivotx,
float pivoty);
88void 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);
89void 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);
90void 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);
91void 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);
92void 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);
93void gDrawRectangle(
float x,
float y,
float w,
float h,
bool isFilled =
false,
float rotateAngle = 0.0f,
float pivotx = 0.5f,
float pivoty = 0.5f);
94void 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);
95void gDrawBox(
float x,
float y,
float z,
float w = 1.0f,
float h = 1.0f,
float d = 1.0f,
bool isFilled =
true);
96void gDrawBox(
float x,
float y,
float z,
float w,
float h,
float d,
float rotateAngle,
float axisX,
float axisY,
float axisZ,
bool isFilled =
true);
97void gDrawBox(glm::mat4 transformationMatrix,
bool isFilled =
true);
98void 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);
99void 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);
100void 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);
101void 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);
102void 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);
103void 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);
104void 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);
105void 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);
106void 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);
107void 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);
108void 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);
109void 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);
110void 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);
273 virtual void drawColored2D(
const glm::vec2* points,
int count,
const glm::vec4& color,
const glm::mat4& mvp,
274 int drawMode = GL_TRIANGLES) {}
277 const glm::mat4& mvp,
278 const glm::vec2& uvOffset = glm::vec2(0.0f),
const glm::vec2& uvScale = glm::vec2(1.0f)) {}
285 const glm::mat4& mvp,
const float* xyuv,
int vertexCount) {}
331 virtual void drawMesh3D(GLuint vertexArrayId,
int vertexCount,
int indexCount,
333 int drawMode = GL_TRIANGLES,
int instanceCount = 1) {}
349 virtual bool drawSkyboxFace(GLuint textureId,
const float* xyzuv,
int vertexCount,
350 const glm::mat4& viewProjection) {
return false; }
365 const glm::vec3& lightPosition,
bool softShadows) {}
548 virtual void bufSubData(GLuint buffer,
int offset,
int size,
const void* data) = 0;
549 virtual void setBufferData(GLuint buffer,
const void* data,
size_t size,
int usage) = 0;
552 virtual void attachUbo(GLuint
id,
int bindingpoint,
const std::string& uboName) = 0;
571 virtual void setVertexAttribPointer(
int index,
int size,
int type,
bool normalized,
int stride,
const void* pointer) = 0;
599 virtual GLuint
loadProgram(
const char* vertexSource,
const char* fragmentSource,
const char* geometrySource) = 0;
611 virtual void setBool(GLuint uniformloc,
bool value) = 0;
612 virtual void setInt(GLuint uniformloc,
int value) = 0;
614 virtual void setFloat(GLuint uniformloc,
float value) = 0;
615 virtual void setVec2(GLuint uniformloc,
const glm::vec2& value) = 0;
616 virtual void setVec2(GLuint uniformloc,
float x,
float y) = 0;
617 virtual void setVec3(GLuint uniformloc,
const glm::vec3& value) = 0;
618 virtual void setVec3(GLuint uniformloc,
float x,
float y,
float z) = 0;
619 virtual void setVec4(GLuint uniformloc,
const glm::vec4& value) = 0;
620 virtual void setVec4(GLuint uniformloc,
float x,
float y,
float z,
float w) = 0;
621 virtual void setMat2(GLuint uniformloc,
const glm::mat2& mat) = 0;
622 virtual void setMat3(GLuint uniformloc,
const glm::mat3& mat) = 0;
623 virtual void setMat4(GLuint uniformloc,
const glm::mat4& mat) = 0;
630 virtual void clearScreen(
bool color =
true,
bool depth =
true) = 0;
648 virtual void texImage2D(GLenum target, GLint internalFormat,
int width,
int height, GLint format, GLint type,
void* data, GLint level = 0) = 0;
650 virtual void setWrapping(GLenum target, GLint wrapS, GLint wrapT) = 0;
651 virtual void setWrapping(GLenum target, GLint wrapS, GLint wrapT, GLint wrapR) = 0;
653 virtual void setFiltering(GLenum target, GLint minFilter, GLint magFilter) = 0;
655 virtual void setWrappingAndFiltering(GLenum target, GLint wrapS, GLint wrapT, GLint wrapR, GLint minFilter, GLint magFilter) = 0;
670 virtual void createQuad(GLuint& inQuadVAO, GLuint& inQuadVBO) = 0;
678 void drawLine(
float x1,
float y1,
float x2,
float y2);
679 void drawLine(
float x1,
float y1,
float x2,
float y2,
float thickness);
680 void drawLine(
float x1,
float y1,
float z1,
float x2,
float y2,
float z2,
float thickness = 1.0f);
681 void drawLine(
float x1,
float y1,
float x2,
float y2,
float thickness,
float rotateAngle,
float pivotx,
float pivoty);
683 void drawTriangle(
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);
684 void drawCircle(
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);
685 void drawCross(
float x,
float y,
float width,
float height,
float thickness,
bool isFilled,
float rotateAngle = 0.0f,
float pivotx = 0.5f,
float pivoty = 0.5f);
686 void drawArc(
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);
687 void drawArrow(
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);
688 void drawRectangle(
float x,
float y,
float w,
float h,
bool isFilled =
false,
float rotateAngle = 0.0f,
float pivotx = 0.5f,
float pivoty = 0.5f);
689 void drawRoundedRectangle(
float x,
float y,
float w,
float h,
int radius,
bool isFilled,
float rotateAngle = 0.0f,
float pivotx = 0.5f,
float pivoty = 0.5f);
690 void drawBox(
float x,
float y,
float z,
float w = 1.0f,
float h = 1.0f,
float d = 1.0f,
bool isFilled =
true);
691 void drawBox(
float x,
float y,
float z,
float w,
float h,
float d,
float rotateAngle,
float axisX,
float axisY,
float axisZ,
bool isFilled =
true);
692 void drawBox(glm::mat4 transformationMatrix,
bool isFilled =
true);
693 void drawSphere(
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);
694 void drawCylinder(
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);
695 void drawCylinderOblique(
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);
696 void drawCylinderTrapezodial(
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);
697 void drawCylinderObliqueTrapezodial(
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);
698 void drawCone(
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);
699 void drawConeOblique(
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);
700 void drawPyramid(
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);
701 void drawPyramidOblique(
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);
702 void drawTube(
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);
703 void drawTubeOblique(
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);
704 void drawTubeTrapezodial(
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);
705 void drawTubeObliqueTrapezodial(
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);
874#ifndef GLIST_ENGINE_BUILD
875#define glClear(mask) gCompatClear(mask)
876#define glBlendFunc(sourceFactor, destinationFactor) gCompatBlendFunc(sourceFactor, destinationFactor)
float r
Definition gColor.h:40
float g
Definition gColor.h:40
float a
Definition gColor.h:40
float b
Definition gColor.h:40
Definition gRectangle.h:6
void drawPyramid(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)
virtual void updateLights()
float getFogGradient() const
void getViewport(int &x, int &y, int &width, int &height) const
static const std::string & getShaderSrcColorVertex()
bool islightingenabled
Definition gRenderer.h:732
gLight * getSceneLight(int lightNo)
void drawRoundedRectangle(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 setGridColorofAxisXZ(int r, int g, int b, int a)
gShader * irradianceshader
Definition gRenderer.h:783
gShader * colorshader
Definition gRenderer.h:775
virtual void disableDepthTest()=0
virtual bool beginFrame()
Definition gRenderer.h:255
virtual void bindTexture(GLuint texId)=0
virtual bool setupDeferredLighting(int width, int height)
Definition gRenderer.h:262
virtual void drawArrays(int drawMode, int count)=0
gFbo * ssaofbo
Definition gRenderer.h:756
static const std::string & getShaderSrcCubemapVertex()
bool isdepthtestenabled
Definition gRenderer.h:738
virtual bool drawSkyboxFace(GLuint textureId, const float *xyzuv, int vertexCount, const glm::mat4 &viewProjection)
Definition gRenderer.h:349
GLuint ssaoprevframebuffer
Definition gRenderer.h:761
int fogmode
Definition gRenderer.h:725
static int height
Definition gRenderer.h:711
void drawLine(float x1, float y1, float x2, float y2, float thickness)
virtual void setVsync(bool enabled)
Definition gRenderer.h:421
virtual bool beginShadowPass()
Definition gRenderer.h:358
static int unscaleY(int y)
virtual void enableDepthTestEqual()=0
virtual void endDeferredLighting()
Definition gRenderer.h:266
static int unitheight
Definition gRenderer.h:712
bool isVulkan() const
Definition gRenderer.h:271
gShader * brdfshader
Definition gRenderer.h:785
static void setCurrentResolution(int screenWidth, int screenHeight)
virtual void setBufferData(GLuint buffer, const void *data, size_t size, int usage)=0
void setSSAOBias(float value)
virtual void setWrapping(GLenum target, GLint wrapS, GLint wrapT)=0
unsigned int fullscreenquadvbo
Definition gRenderer.h:801
virtual void drawVbo(const gVbo &vbo, const glm::mat4 &model, const gMeshSurface &surface)=0
virtual int getCullingDirection() const
Definition gRenderer.h:453
virtual GLuint createVAO()=0
virtual void setVec3(GLuint uniformloc, const glm::vec3 &value)=0
gShader * equirectangularshader
Definition gRenderer.h:782
gColor * getLightingColor()
gShader * textureshader
Definition gRenderer.h:776
static void setUnitResolution(int resolution)
int blendmode
Definition gRenderer.h:745
bool isssaodebug
Definition gRenderer.h:755
void setLightingColor(gColor *color)
Definition gRenderer.h:375
virtual void setMultiSampling(int samples)
Definition gRenderer.h:434
void setGridColorofAxisYZ(int r, int g, int b, int a)
static const std::string & getShaderSrcSSAOBlurFragment()
gColor globalambientcolor
Definition gRenderer.h:735
void setGridColorofAxisXY(gColor *color)
static const std::string & getShaderSrcEquirectangularFragment()
virtual void unbindTexture()=0
gColor * getGlobalAmbientColor()
virtual GLuint loadProgram(const char *vertexSource, const char *fragmentSource, const char *geometrySource)=0
int viewportheight
Definition gRenderer.h:748
gUbo< gSceneLights > * lightsubo
Definition gRenderer.h:730
void drawArrow(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)
virtual void deleteBuffer(GLuint &buffer)=0
float ssaobias
Definition gRenderer.h:751
glm::vec3 lightingposition
Definition gRenderer.h:733
void setLightingColor(int r, int g, int b, int a=255)
virtual void setVertexAttribDivisor(int index, int divisor)=0
void setGridColorofAxisWireFrameXY(int r, int g, int b, int a)
bool isssaorendering
Definition gRenderer.h:763
virtual void enableCubeMap()=0
int viewportwidth
Definition gRenderer.h:748
const gCamera * getCamera() const
void enableGammaCorrection()
bool isalphablendingenabled
Definition gRenderer.h:744
void setSSAODebug(bool enabled)
void drawBox(float x, float y, float z, float w=1.0f, float h=1.0f, float d=1.0f, bool isFilled=true)
void setGridColorofAxisYZ(gColor *color)
void setGlobalAmbientColor(gColor color)
Definition gRenderer.h:381
virtual void releaseShadowMap()
Definition gRenderer.h:353
gShader * pbrshader
Definition gRenderer.h:781
virtual void disableVertexAttrib(int index)=0
void drawRectangle(float x, float y, float w, float h, bool isFilled=false, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)
static const std::string & getShaderSrcPbrFragment()
void setGridColorofAxisWireFrameYZ(gColor *color)
virtual int getDepthTestType()=0
static const int SCREENSCALING_NONE
Definition gRenderer.h:134
virtual void generateMipMap()=0
int depthtesttype
Definition gRenderer.h:739
virtual void setViewport(int x, int y, int width, int height)=0
gFbo * ssaoresultfbo
Definition gRenderer.h:757
gShader * ssaoshader
Definition gRenderer.h:758
void setCameraPosition(glm::vec3 cameraPosition)
static const std::string & getShaderSrcSkyboxFragment()
virtual void setBool(GLuint uniformloc, bool value)=0
virtual void unbindSkyTexture()=0
int viewporty
Definition gRenderer.h:748
virtual void setCullingDirection(int direction)
Definition gRenderer.h:452
int renderenginetype
Definition gRenderer.h:718
static int currentresolution
Definition gRenderer.h:714
virtual void texImage2D(GLenum target, GLint internalFormat, int width, int height, GLint format, GLint type, void *data, GLint level=0)=0
gShader * getImageShader()
gShader * getFontShader()
virtual void popMatrix()=0
GLuint boundframebuffer
Definition gRenderer.h:747
gShader * getEquirectangularShader()
virtual void bindVAO(GLuint vao)=0
gShader * fboshader
Definition gRenderer.h:786
int cullface
Definition gRenderer.h:741
void setGridEnableYZ(bool yz)
virtual void checkCompileErrors(GLuint shader, const std::string &type)=0
virtual void bindQuadVAO()=0
virtual void setProjectionMatrix(glm::mat4 projectionMatrix)
virtual void bindBuffer(GLenum target, GLuint buffer)=0
virtual bool beginDeferredGeometryPass()
Definition gRenderer.h:264
virtual bool isDepthTestEnabled()=0
void drawCircle(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)
virtual void setDepthTestFunc(int depthTestType)=0
void addSceneLight(gLight *light)
gShader * shadowmapshader
Definition gRenderer.h:780
static const std::string & getShaderSrcColorFragment()
virtual GLuint createFramebuffer()=0
void drawCross(float x, float y, float width, float height, float thickness, bool isFilled, float rotateAngle=0.0f, float pivotx=0.5f, float pivoty=0.5f)
static int width
Definition gRenderer.h:711
gShader * getSkyboxShader()
virtual bool isAlphaTestEnabled()=0
bool isGammaCorrectionEnabled()
static const std::string & getShaderSrcBrdfFragment()
virtual void setMat3(GLuint uniformloc, const glm::mat3 &mat)=0
glm::mat4 viewmatrixold
Definition gRenderer.h:793
const glm::mat4 & getProjectionMatrix2d() const
virtual void disableAlphaTest()=0
virtual void setShaderSourcePaths(const std::string &vertexPath, const std::string &fragmentPath)
Definition gRenderer.h:606
gShader * getColorShader()
virtual void releaseDeferredLighting()
Definition gRenderer.h:267
int cullingdirection
Definition gRenderer.h:742
virtual void resetShader(GLuint id, bool loaded) const =0
gShader * getShadowmapShader()
static int unscaleX(int x)
void setGrid(gGrid *newgrid)
gShader * skyboxshader
Definition gRenderer.h:779
virtual void drawColored2D(const glm::vec2 *points, int count, const glm::vec4 &color, const glm::mat4 &mvp, int drawMode=GL_TRIANGLES)
Definition gRenderer.h:273
virtual void setVec2(GLuint uniformloc, const glm::vec2 &value)=0
static const std::string & getShaderSrcShadowmapFragment()
static const std::string & getShaderSrcFontFragment()
virtual void bindFramebuffer(GLuint fbo)=0
void setGridEnableAxis(bool xy, bool yz, bool xz)
static const int DEPTHTESTTYPE_ALWAYS
Definition gRenderer.h:135
std::unique_ptr< gRoundedRectangle > roundedrectanglemesh
Definition gRenderer.h:809
static const std::string & getShaderSrcBrdfVertex()
virtual void bindTexture(GLuint texId, int textureSlotNo)=0
virtual void deleteFullscreenQuad(GLuint &vao, GLuint *vbo)=0
void setFogMode(int fogMode)
glm::vec3 cameraposition
Definition gRenderer.h:794
static void setUnitResolution(int screenWidth, int screenHeight)
virtual void pushMatrix()=0
float foggradient
Definition gRenderer.h:724
virtual void disableCulling()
Definition gRenderer.h:448
void setGridColorofAxisWireFrameXZ(gColor *color)
gColor fogcolor
Definition gRenderer.h:722
virtual int getCullFace() const
Definition gRenderer.h:451
const gColor & getFogColor() const
bool isssaoallocated
Definition gRenderer.h:754
bool isgammacorrectionenabled
Definition gRenderer.h:767
void drawTubeObliqueTrapezodial(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)
virtual void drawFullscreenQuad()=0
virtual void setVec2(GLuint uniformloc, float x, float y)=0
virtual void activateTexture(int textureSlotNo=0)=0
virtual void setInt(GLuint uniformloc, int value)=0
virtual void setRenderbufferStorage(GLenum format, int width, int height)=0
virtual void endShadowPass()
Definition gRenderer.h:359
void drawBox(glm::mat4 transformationMatrix, bool isFilled=true)
void cleanupSSAOResources()
static const int DEPTHTESTTYPE_LESS
Definition gRenderer.h:135
virtual void setMat4(GLuint uniformloc, const glm::mat4 &mat)=0
bool iscullingenabled
Definition gRenderer.h:740
static const std::string & getShaderSrcImageVertex()
void setGridColorofAxisXZ(gColor *color)
int ssaorealdefaultfbo
Definition gRenderer.h:760
void setGridEnableXY(bool xy)
glm::vec3 getLightingPosition()
virtual void enableDepthTest()=0
static int unitwidth
Definition gRenderer.h:712
virtual int getBlendMode() const
Definition gRenderer.h:474
void setGlobalAmbientColor(int r, int g, int b, int a=255)
virtual void endFrame()
Definition gRenderer.h:256
virtual void clearColor(int r, int g, int b, int a=255)=0
void setSSAORadius(float value)
static const std::string & getShaderSrcFboVertex()
void setGridColorofAxisWireFrameXZ(int r, int g, int b, int a)
virtual void setSwizzleMask(GLint swizzleMask[4])=0
static void setScreenScaling(int screenScaling)
void drawPyramidOblique(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)
gShader * getGridShader()
virtual void drawMesh3D(GLuint vertexArrayId, int vertexCount, int indexCount, const glm::mat4 &model, const gMeshSurface &surface, int drawMode=GL_TRIANGLES, int instanceCount=1)
Definition gRenderer.h:331
void drawLine(float x1, float y1, float x2, float y2)
virtual void readTexturePixelsHDR(float *inPixels, GLuint textureId, int width, int height, GLenum format)=0
virtual void enableDepthTest(int depthTestType)=0
virtual void bindDefaultFramebuffer()=0
void setGridColorofAxisWireFrameYZ(int r, int g, int b, int a)
gShader * prefiltershader
Definition gRenderer.h:784
void removeSceneLight(gLight *light)
gUbo< gSceneData > * sceneubo
Definition gRenderer.h:731
void setFogColor(float r, float g, float b)
glm::mat4 projectionmatrix2d
Definition gRenderer.h:791
virtual void setWrappingAndFiltering(GLenum target, GLint wrapS, GLint wrapT, GLint wrapR, GLint minFilter, GLint magFilter)=0
virtual void unbindBuffer(GLenum target)=0
virtual void setVec4(GLuint uniformloc, float x, float y, float z, float w)=0
unsigned int getFullscreenQuadVAO() const
int ssaoprevviewport[4]
Definition gRenderer.h:762
virtual void setFloat(GLuint uniformloc, float value)=0
virtual void unbindSkyTexture(int textureSlotNo)=0
virtual void setVertexBufferData(GLuint vbo, size_t size, const void *data, int usage)=0
virtual void enableVertexAttrib(int index)=0
virtual void createQuad(GLuint &inQuadVAO, GLuint &inQuadVBO)=0
float getFogLinearStart() const
float getFogDensity() const
static int getScreenScaling()
void setGridMaxLength(float length)
static const std::string & getShaderSrcGridVertex()
gGrid * originalgrid
Definition gRenderer.h:798
void drawArc(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 setGridEnableXZ(bool xz)
virtual void setCullFace(int face)
Definition gRenderer.h:450
static const std::string & getShaderSrcFontVertex()
void drawLine(float x1, float y1, float x2, float y2, float thickness, float rotateAngle, float pivotx, float pivoty)
virtual void setDrawBufferNone()=0
virtual void resetTexture()=0
bool isSoftShadowsEnabled()
virtual void takeScreenshot(gImage &img, int x, int y, int width, int height)=0
virtual bool isShadowPassActive() const
Definition gRenderer.h:360
void destroyPrimitiveMeshes()
std::unique_ptr< gCircle > circlemesh
Definition gRenderer.h:805
virtual void setMat2(GLuint uniformloc, const glm::mat2 &mat)=0
int fogno
Definition gRenderer.h:721
friend class gRenderObject
Definition gRenderer.h:708
void setColor(const gColor &color)
virtual GLuint getUniformLocation(GLuint id, const std::string &name)=0
static const int FOGMODE_EXP
Definition gRenderer.h:136
virtual void deleteFramebuffer(GLuint &fbo)=0
gShader * getTextureShader()
glm::mat4 projectionmatrixold
Definition gRenderer.h:790
static const std::string & getShaderSrcPbrVertex()
void setSSAOStrength(float value)
virtual void deleteTexture(GLuint &texId)=0
virtual void flushQueuedDraws()
Definition gRenderer.h:257
bool isssaoenabled
Definition gRenderer.h:750
void disableGammaCorrection()
virtual void bindSkyTexture(GLuint texId)=0
virtual void bufSubData(GLuint buffer, int offset, int size, const void *data)=0
static const std::string & getShaderSrcShadowmapVertex()
virtual void attachUbo(GLuint id, int bindingpoint, const std::string &uboName)=0
int getRenderEngineType() const
Definition gRenderer.h:270
std::unique_ptr< gLine > linemesh3
Definition gRenderer.h:803
virtual void drawElementsInstanced(int drawMode, int count, int instanceCount)=0
static int getResolution(int screenWidth, int screenHeight)
std::unique_ptr< gLine > linemesh
Definition gRenderer.h:803
void setGridColorofAxisXY(int r, int g, int b, int a)
virtual int getMultiSampling() const
Definition gRenderer.h:435
virtual bool isDeferredGeometryPassActive() const
Definition gRenderer.h:268
gShader * getPrefilterShader()
virtual bool resizeDeferredLighting(int width, int height)
Definition gRenderer.h:263
static int screenscaling
Definition gRenderer.h:713
void createPrimitiveMeshes()
std::deque< gLight * > scenelights
Definition gRenderer.h:729
static const std::string & getShaderSrcTextureVertex()
float getGridLineInterval()
void drawTube(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)
static const int FOGMODE_LINEAR
Definition gRenderer.h:136
gShader * getIrradianceShader()
int getCurrentResolution()
void drawCylinderObliqueTrapezodial(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 drawCone(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)
float ssaoradius
Definition gRenderer.h:752
virtual void attachRenderbufferToFramebuffer(GLenum attachment, GLuint rbo)=0
void setLightingPosition(glm::vec3 lightingPosition)
virtual void setWrapping(GLenum target, GLint wrapS, GLint wrapT, GLint wrapR)=0
virtual bool isCullingEnabled() const
Definition gRenderer.h:449
void setFogColor(const gColor &color)
int viewportx
Definition gRenderer.h:748
gShader * gridshader
Definition gRenderer.h:787
std::unique_ptr< gRectangle > rectanglemesh
Definition gRenderer.h:808
virtual void setVec4(GLuint uniformloc, const glm::vec4 &value)=0
bool isglobalambientcolorchanged
Definition gRenderer.h:736
float fogdensity
Definition gRenderer.h:723
gShader * getBrdfShader()
static const int SCREENSCALING_MIPMAP
Definition gRenderer.h:134
void drawTriangle(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)
friend class gAppManager
Definition gRenderer.h:709
virtual GLuint createRenderbuffer()=0
const glm::mat4 & getViewMatrix() const
virtual void takeScreenshot(gImage &img)=0
virtual void enableAlphaBlending()=0
virtual bool allocateShadowMap(int width, int height)
Definition gRenderer.h:352
void removeAllSceneLights()
virtual void clearScreen(bool color=true, bool depth=true)=0
virtual void createFullscreenQuad(GLuint &vao, GLuint &vbo)=0
GLuint getBoundFramebuffer() const
virtual void unbindVAO()=0
void drawCylinderTrapezodial(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 setColor(int r, int g, int b, int a=255)
void setupSSAODepthSampling()
gGrid * grid
Definition gRenderer.h:797
virtual void attachTextureToFramebuffer(GLenum attachment, GLenum textarget, GLuint texId, GLuint level=0)=0
std::unique_ptr< gTriangle > trianglemesh
Definition gRenderer.h:804
virtual void setUnsignedInt(GLuint uniformloc, unsigned int value)=0
static const std::string & getShaderSrcPrefilterFragment()
void setFogGradient(float value)
static void setScreenSize(int screenWidth, int screenHeight)
void drawCylinderOblique(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)
static void setCurrentResolution(int resolution)
virtual void updatePackUnpackAlignment(int i)=0
virtual void setIndexBufferData(GLuint ebo, size_t size, const void *data, int usage)=0
void drawSphere(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)
virtual void deleteVAO(GLuint &vao)=0
unsigned int fullscreenquadvao
Definition gRenderer.h:800
static const std::string & getShaderSrcImageFragment()
void setCamera(gCamera *camera)
gColor lightingcolor
Definition gRenderer.h:734
void setGridLineInterval(float intervalvalue)
gCamera * camera
Definition gRenderer.h:795
virtual void drawElements(int drawMode, int count)=0
static int unitresolution
Definition gRenderer.h:714
bool issoftshadowsenabled
Definition gRenderer.h:769
virtual void clearColor(gColor color)=0
void setColor(gColor *color)
glm::mat4 projectionmatrix
Definition gRenderer.h:789
gColor * rendercolor
Definition gRenderer.h:716
virtual void setReadBufferNone()=0
static const std::string & getShaderSrcFboFragment()
virtual bool isAlphaBlendingEnabled()=0
bool isalphatestenabled
Definition gRenderer.h:744
void drawBox(float x, float y, float z, float w, float h, float d, float rotateAngle, float axisX, float axisY, float axisZ, bool isFilled=true)
void setFogDensity(float value)
bool isfogenabled
Definition gRenderer.h:720
std::unique_ptr< gBox > boxmesh
Definition gRenderer.h:810
virtual void drawArraysInstanced(int drawMode, int count, int instanceCount)=0
std::unique_ptr< gArc > arcmesh
Definition gRenderer.h:807
virtual void deleteRenderbuffer(GLuint &rbo)=0
virtual void bindRenderbuffer(GLuint rbo)=0
float getFogLinearEnd() const
gShader * imageshader
Definition gRenderer.h:778
static const std::string & getShaderSrcTextureFragment()
gShader * fontshader
Definition gRenderer.h:777
virtual void setVec3(GLuint uniformloc, float x, float y, float z)=0
virtual void enableCulling()
Definition gRenderer.h:447
virtual GLuint genBuffers()=0
SceneDataFlags
Definition gRenderer.h:160
@ ENABLE_SOFT_SHADOWS
Definition gRenderer.h:165
@ ENABLE_GAMMA
Definition gRenderer.h:163
@ ENABLE_FOG
Definition gRenderer.h:162
@ ENABLE_SSAO
Definition gRenderer.h:161
@ ENABLE_HDR
Definition gRenderer.h:164
virtual void useShader(GLuint id) const =0
static void updateProjectionMatrix2d()
void setViewMatrix(glm::mat4 viewMatrix)
void setProjectionMatrix2d(glm::mat4 projectionMatrix2d)
float foglinearstart
Definition gRenderer.h:726
void drawCylinder(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)
static const std::string & getShaderSrcGridFragment()
virtual void setTextureMaxLevel(GLenum target, int maxLevel)=0
std::unique_ptr< gCross > crossmesh
Definition gRenderer.h:806
void setGridColorofAxisWireFrameXY(gColor *color)
virtual void setBlendMode(int blendMode)
Definition gRenderer.h:473
virtual void disableAlphaBlending()=0
void setFogLinearEnd(float value)
virtual void setBufferRange(int index, GLuint buffer, int offset, int size)=0
float foglinearend
Definition gRenderer.h:727
void drawLine(float x1, float y1, float z1, float x2, float y2, float z2, float thickness=1.0f)
virtual void checkFramebufferStatus()=0
virtual GLuint createTextures()=0
static const std::string & getShaderSrcIrradianceFragment()
static float getScaleMultiplier()
gShader * ssaoblurshader
Definition gRenderer.h:759
BlendMode
Definition gRenderer.h:469
@ BLENDMODE_ALPHA
Definition gRenderer.h:470
@ BLENDMODE_ADDITIVE
Definition gRenderer.h:471
virtual void drawTexturedRect2D(GLuint textureId, GLuint maskTextureId, const glm::vec4 &tint, const glm::mat4 &mvp, const glm::vec2 &uvOffset=glm::vec2(0.0f), const glm::vec2 &uvScale=glm::vec2(1.0f))
Definition gRenderer.h:276
virtual void readTexturePixels(unsigned char *inPixels, GLuint textureId, int width, int height, GLenum format)=0
float ssaostrength
Definition gRenderer.h:753
void drawTubeOblique(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)
const glm::mat4 & getProjectionMatrix() const
virtual void drawTexturedTriangles2D(GLuint textureId, const glm::vec4 &tint, const glm::mat4 &mvp, const float *xyuv, int vertexCount)
Definition gRenderer.h:284
static const std::string & getShaderSrcSSAOFragment()
virtual void drawVbo(const gVbo &vbo)=0
virtual void setFiltering(GLenum target, GLint minFilter, GLint magFilter)=0
glm::mat4 viewmatrix
Definition gRenderer.h:792
void disableSoftShadows()
const glm::vec3 & getCameraPosition() const
static const int SCREENSCALING_AUTO
Definition gRenderer.h:134
virtual void bindSkyTexture(GLuint texId, int textureSlot)=0
void drawConeOblique(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)
virtual void setWrappingAndFiltering(GLenum target, GLint wrapS, GLint wrapT, GLint minFilter, GLint magFilter)=0
unsigned int depthtesttypeid[2]
Definition gRenderer.h:743
static void setUnitScreenSize(int unitWidth, int unitHeight)
virtual void setVertexAttribPointer(int index, int size, int type, bool normalized, int stride, const void *pointer)=0
static const std::string & getShaderSrcSSAOVertex()
std::unique_ptr< gLine > linemesh2
Definition gRenderer.h:803
virtual void enableAlphaTest()=0
static const std::string & getShaderSrcSkyboxVertex()
virtual bool renderDeferredLightingPass()
Definition gRenderer.h:265
void setFogLinearStart(float value)
virtual void generateSkyMipMap()=0
void drawTubeTrapezodial(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 setColor(float r, float g, float b, float a=1.0f)
virtual void setShadowMapState(bool enabled, const glm::mat4 &lightMatrix, const glm::vec3 &lightPosition, bool softShadows)
Definition gRenderer.h:364
bool ishdrenabled
Definition gRenderer.h:768
Definition gRoundedRectangle.h:13
Definition gTriangle.h:13
float r
Definition gColor.h:22
float a
Definition gColor.h:22
float b
Definition gColor.h:22
float g
Definition gColor.h:22
#define G_RENDERER_VK
Definition gConstants.h:33
#define G_RENDERER_GL
Definition gConstants.h:32
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 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 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 gCompatClear(unsigned int mask)
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 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 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 gSetCullingDirection(int cullingDirection)
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 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 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 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 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 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)
#define GLIST_MAX_LIGHTS
Definition gRenderer.h:59
void gCheckGLErrorAndPrint(const std::string &prefix, const std::string &func, int line)
void gDrawLine(float x1, float y1, float x2, float y2)
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 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 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)
int gGetCullingDirection()
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 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 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 gDrawBox(float x, float y, float z, float w=1.0f, float h=1.0f, float d=1.0f, 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 gCompatBlendFunc(unsigned int sourceFactor, unsigned int destinationFactor)
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 gCullFace(int cullingFace)
Definition gRenderer.h:290
GLuint metallicmapid
Definition gRenderer.h:312
glm::vec2 texturetiling
Definition gRenderer.h:295
glm::vec4 diffuse
Definition gRenderer.h:292
GLuint diffusemapid
Definition gRenderer.h:299
bool ispbr
Definition gRenderer.h:309
float shininess
Definition gRenderer.h:294
GLuint normalmapid
Definition gRenderer.h:303
glm::vec4 ambient
Definition gRenderer.h:291
GLuint pbrnormalmapid
Definition gRenderer.h:311
glm::vec4 specular
Definition gRenderer.h:293
GLuint specularmapid
Definition gRenderer.h:300
GLuint aomapid
Definition gRenderer.h:314
GLuint roughnessmapid
Definition gRenderer.h:313
GLuint albedomapid
Definition gRenderer.h:310
Definition gRenderer.h:176
gSceneFogData fog
Definition gRenderer.h:181
unsigned int flags
Definition gRenderer.h:180
glm::mat4 viewmatrix
Definition gRenderer.h:179
glm::vec3 viewpos
Definition gRenderer.h:178
gColor rendercolor
Definition gRenderer.h:177
Definition gRenderer.h:168
int mode
Definition gRenderer.h:174
float linearStart
Definition gRenderer.h:170
float density
Definition gRenderer.h:172
glm::vec3 color
Definition gRenderer.h:169
float linearEnd
Definition gRenderer.h:171
float gradient
Definition gRenderer.h:173
Definition gRenderer.h:137
int type
Definition gRenderer.h:138
float spotoutercutoffangle
Definition gRenderer.h:150
float spotcutoffangle
Definition gRenderer.h:149
float quadratic
Definition gRenderer.h:147
glm::vec4 specular
Definition gRenderer.h:143
float constant
Definition gRenderer.h:145
glm::vec3 position
Definition gRenderer.h:139
glm::vec4 ambient
Definition gRenderer.h:141
glm::vec4 diffuse
Definition gRenderer.h:142
float linear
Definition gRenderer.h:146
glm::vec3 direction
Definition gRenderer.h:140
Definition gRenderer.h:153
int enabledlights
Definition gRenderer.h:155
gSceneLightData lights[GLIST_MAX_LIGHTS]
Definition gRenderer.h:157
glm::vec4 globalambientcolor
Definition gRenderer.h:156
int lightnum
Definition gRenderer.h:154