Grindstone Game Engine v0.2.0
An open source game engine and toolkit.
Loading...
Searching...
No Matches
GLGraphicsPipeline.hpp
1#pragma once
2
3#include <Common/Graphics/GraphicsPipeline.hpp>
4
5namespace Grindstone::GraphicsAPI::OpenGL {
7 public:
8 GraphicsPipeline(const CreateInfo& createInfo);
9 virtual void Recreate(const CreateInfo& createInfo) override;
10 void Bind();
11 GLuint GetPrimitiveType();
13 private:
14 void CreatePipeline(const CreateInfo& createInfo);
15 GLuint CreateShaderModule(const CreateInfo::ShaderStageData& shaderStageCreateInfo);
16
17 GLuint program;
18
19 GLsizei width, height;
20 GLint scissorX, scissorY;
21 GLsizei scissorWidth, scissorHeight;
22
23 GLboolean colorMaskRed = GL_TRUE;
24 GLboolean colorMaskBlue = GL_TRUE;
25 GLboolean colorMaskGreen = GL_TRUE;
26 GLboolean colorMaskAlpha = GL_TRUE;
27 GLuint primitiveType;
28 GLenum polygonFillMode;
29 GLenum depthCompareOp;
30 bool isDepthTestEnabled = true;
31 GLboolean isDepthWriteEnabled = GL_TRUE;
32 bool isStencilEnabled = false;
33 bool isDepthBiasEnabled = false;
34 bool isDepthClampEnabled = false;
35
36 float depthBiasConstantFactor = 1.25f;
37 float depthBiasSlopeFactor = 1.75f;
38 float depthBiasClamp = 0.0f;
39
40 GLenum cullMode;
41 GLenum blendColorOp;
42 GLenum blendColorSrc;
43 GLenum blendColorDst;
44 GLenum blendAlphaOp;
45 GLenum blendAlphaSrc;
46 GLenum blendAlphaDst;
47 };
48}
Definition GraphicsPipeline.hpp:18
Definition GLGraphicsPipeline.hpp:6