Go to the documentation of this file.
73 void SetDepthBias (
float DepthBias,
float fSlopeScaledDepthBias);
85 void GetBoundImage(
Uint32 Index, GLuint& GLHandle, GLint& MipLevel, GLboolean& IsLayered, GLint& Layer, GLenum& Access, GLenum& Format)
const;
130 std::vector<UniqueIdentifier> m_BoundTextures;
131 std::vector<UniqueIdentifier> m_BoundSamplers;
132 std::vector<UniqueIdentifier> m_BoundUniformBuffers;
134 struct BoundImageInfo
139 GLboolean IsLayered = 0;
149 GLboolean _IsLayered,
154 InterfaceID{_UniqueID},
155 GLHandle {_GLHandle},
156 MipLevel {_MipLevel},
157 IsLayered {_IsLayered},
164 bool operator==(
const BoundImageInfo& rhs)
const
167 return InterfaceID == rhs.InterfaceID &&
168 GLHandle == rhs.GLHandle &&
169 MipLevel == rhs.MipLevel &&
170 IsLayered == rhs.IsLayered &&
171 Layer == rhs.Layer &&
172 Access == rhs.Access &&
173 Format == rhs.Format;
177 std::vector<BoundImageInfo> m_BoundImages;
195 bool operator==(
const BoundSSBOInfo& rhs)
const
198 return BufferID == rhs.BufferID &&
199 Offset == rhs.Offset &&
204 std::vector<BoundSSBOInfo> m_BoundStorageBlocks;
208 class EnableStateHelper
211 enum class ENABLE_STATE :
Int32
220 return (bEnabled && m_EnableState == ENABLE_STATE::ENABLED) ||
221 (!bEnabled && m_EnableState == ENABLE_STATE::DISABLED);
225 return !(*
this == bEnabled);
228 const EnableStateHelper& operator=(
bool bEnabled)
230 m_EnableState = bEnabled ? ENABLE_STATE::ENABLED : ENABLE_STATE::DISABLED;
234 operator bool()
const
236 return m_EnableState == ENABLE_STATE::ENABLED;
240 ENABLE_STATE m_EnableState = ENABLE_STATE::UNKNOWN;
243 struct DepthStencilGLState
245 EnableStateHelper m_DepthEnableState;
246 EnableStateHelper m_DepthWritesEnableState;
248 EnableStateHelper m_StencilTestEnableState;
249 Uint16 m_StencilReadMask = 0xFFFF;
250 Uint16 m_StencilWriteMask = 0xFFFF;
259 } m_StencilOpState[2];
262 struct RasterizerGLState
266 EnableStateHelper FrontCounterClockwise;
269 EnableStateHelper DepthClampEnable;
270 EnableStateHelper ScissorTestEnable;
275 Uint32 m_ColorWriteMasks[MAX_RENDER_TARGETS] = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
276 EnableStateHelper m_bIndependentWriteMasks;
277 Int32 m_iActiveTexture = -1;
278 Int32 m_NumPatchVertices = -1;
EGLContext NativeGLContextType
Definition: GLContextAndroid.hpp:39
void GetColorWriteMask(Uint32 RTIndex, Uint32 &WriteMask, Bool &bIsIndependent)
Definition: GLContextState.cpp:844
Int32 Ref
Definition: GLContextState.hpp:257
GLint m_iMaxCombinedTexUnits
Definition: GLContextState.hpp:112
Definition: GLContextState.hpp:251
STENCIL_OP StencilPassOp
Definition: GLContextState.hpp:256
void SetActiveTexture(Int32 Index)
Definition: GLContextState.cpp:197
void BindImage(Uint32 Index, class TextureViewGLImpl *pTexView, GLint MipLevel, GLboolean IsLayered, GLint Layer, GLenum Access, GLenum Format)
Definition: GLContextState.cpp:242
COMPARISON_FUNCTION Func
Definition: GLContextState.hpp:253
@ STENCIL_OP_UNDEFINED
Undefined operation.
Definition: DepthStencilState.h:51
Vector3< T > min(const Vector3< T > &a, const Vector3< T > &b)
Definition: BasicMath.hpp:1648
Texture view implementation in OpenGL backend.
Definition: TextureViewGLImpl.hpp:38
void SetStencilFunc(GLenum Face, COMPARISON_FUNCTION Func, Int32 Ref, Uint32 Mask)
Definition: GLContextState.cpp:512
void SetCullMode(CULL_MODE CullMode)
Definition: GLContextState.cpp:575
void EnableStencilTest(bool bEnable)
Definition: GLContextState.cpp:477
void SetColorWriteMask(Uint32 RTIndex, Uint32 WriteMask, Bool bIsIndependent)
Definition: GLContextState.cpp:801
void EnableScissorTest(bool bEnableScissorTest)
Definition: GLContextState.cpp:668
FILL_MODE
Fill mode.
Definition: RasterizerState.h:46
Definition: GLContextState.hpp:109
bool operator==(const Plane3D &p1, const Plane3D &p2)
Definition: AdvancedMath.hpp:442
void BindBuffer(GLenum BindTarget, const GLObjectWrappers::GLBufferObj &Buff, bool ResetVAO)
Definition: GLContextState.cpp:365
Definition: AsyncWritableResource.hpp:76
void SetDepthFunc(COMPARISON_FUNCTION CmpFunc)
Definition: GLContextState.cpp:466
void SetStencilWriteMask(Uint8 StencilWriteMask)
Definition: GLContextState.cpp:495
void SetDepthBias(float DepthBias, float fSlopeScaledDepthBias)
Definition: GLContextState.cpp:609
void BindUniformBuffer(Int32 Index, const GLObjectWrappers::GLBufferObj &Buff)
Definition: GLContextState.cpp:330
Vector3< T > max(const Vector3< T > &a, const Vector3< T > &b)
Definition: BasicMath.hpp:1660
void BindSampler(Uint32 Index, const GLObjectWrappers::GLSamplerObj &GLSampler)
Definition: GLContextState.cpp:232
int32_t Int32
32-bit signed integer
Definition: BasicTypes.h:46
void GetBoundImage(Uint32 Index, GLuint &GLHandle, GLint &MipLevel, GLboolean &IsLayered, GLint &Layer, GLenum &Access, GLenum &Format) const
Definition: GLContextState.cpp:300
bool bFillModeSelectionSupported
Definition: GLContextState.hpp:111
void SetBlendFactors(const float *BlendFactors)
Definition: GLContextState.cpp:687
void InvalidateVAO()
Definition: GLContextState.hpp:92
CULL_MODE
Cull mode.
Definition: RasterizerState.h:69
void Invalidate()
Definition: GLContextState.cpp:77
GLint m_iMaxDrawBuffers
Definition: GLContextState.hpp:113
@ COMPARISON_FUNC_UNKNOWN
Unknown comparison function.
Definition: GraphicsTypes.h:934
GLint m_iMaxUniformBufferBindings
Definition: GLContextState.hpp:114
@ CULL_MODE_UNDEFINED
Undefined cull mode.
Definition: RasterizerState.h:72
void SetFrontFace(bool FrontCounterClockwise)
Definition: GLContextState.cpp:598
void EnsureMemoryBarrier(MEMORY_BARRIER RequiredBarriers, class AsyncWritableResource *pRes=nullptr)
Definition: GLContextState.cpp:383
uint32_t Uint32
32-bit unsigned integer
Definition: BasicTypes.h:51
bool Bool
Boolean.
Definition: BasicTypes.h:59
COMPARISON_FUNCTION
Comparison function.
Definition: GraphicsTypes.h:931
void SetCurrentGLContext(GLContext::NativeGLContextType Context)
Definition: GLContextState.hpp:105
void BindVAO(const GLObjectWrappers::GLVertexArrayObj &VAO)
Definition: GLContextState.cpp:159
void EnableDepthWrites(bool bEnable)
Definition: GLContextState.cpp:455
void BindFBO(const GLObjectWrappers::GLFrameBufferObj &FBO)
Definition: GLContextState.cpp:169
MEMORY_BARRIER
Definition: AsyncWritableResource.hpp:33
GLContext::NativeGLContextType GetCurrentGLContext() const
Definition: GLContextState.hpp:107
Render device implementation in OpenGL backend.
Definition: RenderDeviceGLImpl.hpp:45
void SetProgram(const GLObjectWrappers::GLProgramObj &GLProgram)
Definition: GLContextState.cpp:139
void SetPipeline(const GLObjectWrappers::GLPipelineObj &GLPipeline)
Definition: GLContextState.cpp:149
void SetStencilRef(GLenum Face, Int32 Ref)
Definition: GLContextState.cpp:504
void InvalidateFBO()
Definition: GLContextState.hpp:99
Bool GetScissorTestEnabled()
Definition: GLContextState.hpp:81
STENCIL_OP
Stencil operation.
Definition: DepthStencilState.h:48
void EnableDepthTest(bool bEnable)
Definition: GLContextState.cpp:437
bool IsValidVAOBound() const
Definition: GLContextState.hpp:103
@ FILL_MODE_UNDEFINED
Undefined fill mode.
Definition: RasterizerState.h:49
const ContextCaps & GetContextCaps()
Definition: GLContextState.hpp:116
uint16_t Uint16
16-bit unsigned integer
Definition: BasicTypes.h:52
Definition: GLObjectWrapper.hpp:36
void SetNumPatchVertices(Int32 NumVertices)
Definition: GLContextState.cpp:852
uint8_t Uint8
8-bit unsigned integer
Definition: BasicTypes.h:53
void BindStorageBlock(Int32 Index, const GLObjectWrappers::GLBufferObj &Buff, GLintptr Offset, GLsizeiptr Size)
Definition: GLContextState.cpp:344
void SetStencilOp(GLenum Face, STENCIL_OP StencilFailOp, STENCIL_OP StencilDepthFailOp, STENCIL_OP StencilPassOp)
Definition: GLContextState.cpp:527
void SetFillMode(FILL_MODE FillMode)
Definition: GLContextState.cpp:547
Buffer view implementation in OpenGL backend.
Definition: BufferViewGLImpl.hpp:38
void SetPendingMemoryBarriers(MEMORY_BARRIER PendingBarriers)
Definition: GLContextState.cpp:432
Definition: GLContextState.hpp:39
STENCIL_OP StencilDepthFailOp
Definition: GLContextState.hpp:255
Uint32 Mask
Definition: GLContextState.hpp:258
void BindTexture(Int32 Index, GLenum BindTarget, const GLObjectWrappers::GLTextureObj &Tex)
Definition: GLContextState.cpp:213
Int32 UniqueIdentifier
Definition: UniqueIdentifier.hpp:36
GLContextState(class RenderDeviceGLImpl *pDeviceGL)
Definition: GLContextState.cpp:45
void SetDepthClamp(bool bEnableDepthClamp)
Definition: GLContextState.cpp:633
@ MEMORY_BARRIER_NONE
Definition: AsyncWritableResource.hpp:35
bool operator!=(const STDAllocator< T, A > &left, const STDAllocator< U, A > &right)
Definition: STDAllocator.hpp:173
Blend state description.
Definition: BlendState.h:374
The library uses Direct3D-style math:
Definition: AdvancedMath.hpp:37
void SetBlendState(const BlendStateDesc &BSDsc, Uint32 SampleMask)
Definition: GLContextState.cpp:693
Bool GetDepthWritesEnabled()
Definition: GLContextState.hpp:80
STENCIL_OP StencilFailOp
Definition: GLContextState.hpp:254