Skip to content

Commit

Permalink
Renamed all GL state enumerations to follow LLGL naming convention.
Browse files Browse the repository at this point in the history
  • Loading branch information
LukasBanana committed Jul 4, 2023
1 parent 1ec2403 commit 8f6aee7
Show file tree
Hide file tree
Showing 24 changed files with 202 additions and 196 deletions.
2 changes: 1 addition & 1 deletion sources/Renderer/OpenGL/Buffer/GL2XVertexArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ void GL2XVertexArray::Bind(GLStateManager& stateMngr) const
/* Enable required vertex arrays */
for (const auto& attr : attribs_)
{
stateMngr.BindBuffer(GLBufferTarget::ARRAY_BUFFER, attr.buffer);
stateMngr.BindBuffer(GLBufferTarget::ArrayBuffer, attr.buffer);
glVertexAttribPointer(attr.index, attr.size, attr.type, attr.normalized, attr.stride, attr.pointer);
glEnableVertexAttribArray(attr.index);
}
Expand Down
18 changes: 9 additions & 9 deletions sources/Renderer/OpenGL/Buffer/GLBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,18 @@ namespace LLGL
static GLBufferTarget FindPrimaryBufferTarget(long bindFlags)
{
if ((bindFlags & BindFlags::VertexBuffer) != 0)
return GLBufferTarget::ARRAY_BUFFER;
return GLBufferTarget::ArrayBuffer;
if ((bindFlags & BindFlags::IndexBuffer) != 0)
return GLBufferTarget::ELEMENT_ARRAY_BUFFER;
return GLBufferTarget::ElementArrayBuffer;
if ((bindFlags & BindFlags::ConstantBuffer) != 0)
return GLBufferTarget::UNIFORM_BUFFER;
return GLBufferTarget::UniformBuffer;
if ((bindFlags & BindFlags::StreamOutputBuffer) != 0)
return GLBufferTarget::TRANSFORM_FEEDBACK_BUFFER;
return GLBufferTarget::TransformFeedbackBuffer;
if ((bindFlags & (BindFlags::Sampled | BindFlags::Storage)) != 0)
return GLBufferTarget::SHADER_STORAGE_BUFFER;
return GLBufferTarget::ShaderStorageBuffer;
if ((bindFlags & BindFlags::IndirectBuffer) != 0)
return GLBufferTarget::DRAW_INDIRECT_BUFFER;
return GLBufferTarget::ARRAY_BUFFER;
return GLBufferTarget::DrawIndirectBuffer;
return GLBufferTarget::ArrayBuffer;
}

GLBuffer::GLBuffer(long bindFlags) :
Expand Down Expand Up @@ -235,8 +235,8 @@ void GLBuffer::CopyBufferSubData(const GLBuffer& readBuffer, GLintptr readOffset
if (HasExtension(GLExt::ARB_copy_buffer))
{
/* Bind source and destination buffer for copy operation (GL 3.1+) */
GLStateManager::Get().BindBuffer(GLBufferTarget::COPY_READ_BUFFER, readBuffer.GetID());
GLStateManager::Get().BindBuffer(GLBufferTarget::COPY_WRITE_BUFFER, GetID());
GLStateManager::Get().BindBuffer(GLBufferTarget::CopyReadBuffer, readBuffer.GetID());
GLStateManager::Get().BindBuffer(GLBufferTarget::CopyWriteBuffer, GetID());
glCopyBufferSubData(GL_COPY_READ_BUFFER, GL_COPY_WRITE_BUFFER, readOffset, writeOffset, size);
}
else
Expand Down
2 changes: 1 addition & 1 deletion sources/Renderer/OpenGL/Buffer/GLBuffer.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class GLBuffer : public Buffer
private:

GLuint id_ = 0;
GLBufferTarget target_ = GLBufferTarget::ARRAY_BUFFER;
GLBufferTarget target_ = GLBufferTarget::ArrayBuffer;
bool indexType16Bits_ = false;

};
Expand Down
2 changes: 1 addition & 1 deletion sources/Renderer/OpenGL/Buffer/GLBufferArrayWithVAO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void GLBufferArrayWithVAO::BuildVertexArrayWithVAO(std::uint32_t numBuffers, Buf
{
/* Bind VBO */
auto vertexBufferGL = LLGL_CAST(GLBufferWithVAO*, bufferGL);
GLStateManager::Get().BindBuffer(GLBufferTarget::ARRAY_BUFFER, vertexBufferGL->GetID());
GLStateManager::Get().BindBuffer(GLBufferTarget::ArrayBuffer, vertexBufferGL->GetID());

/* Build each vertex attribute */
const auto& vertexAttribs = vertexBufferGL->GetVertexAttribs();
Expand Down
2 changes: 1 addition & 1 deletion sources/Renderer/OpenGL/Buffer/GLBufferWithVAO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ void GLBufferWithVAO::BuildVertexArrayWithVAO()
GLStateManager::Get().BindVertexArray(GetVaoID());
{
/* Bind VBO */
GLStateManager::Get().BindBuffer(GLBufferTarget::ARRAY_BUFFER, GetID());
GLStateManager::Get().BindBuffer(GLBufferTarget::ArrayBuffer, GetID());

/* Build each vertex attribute */
for (const auto& attrib : vertexAttribs_)
Expand Down
16 changes: 8 additions & 8 deletions sources/Renderer/OpenGL/Command/GLCommandAssembler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ static std::size_t AssembleGLCommand(const GLOpcode opcode, const void* pc, JITC
{
//TODO: generate loop in ASM
auto cmd = reinterpret_cast<const GLCmdDrawArraysIndirect*>(pc);
compiler.CallMember(&GLStateManager::BindBuffer, g_stateMngrArg, GLBufferTarget::DRAW_INDIRECT_BUFFER, cmd->id);
compiler.CallMember(&GLStateManager::BindBuffer, g_stateMngrArg, GLBufferTarget::DrawIndirectBuffer, cmd->id);
GLintptr offset = cmd->indirect;
for (std::uint32_t i = 0; i < cmd->numCommands; ++i)
{
Expand Down Expand Up @@ -385,7 +385,7 @@ static std::size_t AssembleGLCommand(const GLOpcode opcode, const void* pc, JITC
auto cmd = reinterpret_cast<const GLCmdDrawElementsIndirect*>(pc);
{
//TODO: generate loop in ASM
compiler.CallMember(&GLStateManager::BindBuffer, g_stateMngrArg, GLBufferTarget::DRAW_INDIRECT_BUFFER, cmd->id);
compiler.CallMember(&GLStateManager::BindBuffer, g_stateMngrArg, GLBufferTarget::DrawIndirectBuffer, cmd->id);
GLintptr offset = cmd->indirect;
for (std::uint32_t i = 0; i < cmd->numCommands; ++i)
{
Expand All @@ -399,14 +399,14 @@ static std::size_t AssembleGLCommand(const GLOpcode opcode, const void* pc, JITC
case GLOpcodeMultiDrawArraysIndirect:
{
auto cmd = reinterpret_cast<const GLCmdMultiDrawArraysIndirect*>(pc);
compiler.CallMember(&GLStateManager::BindBuffer, g_stateMngrArg, GLBufferTarget::DRAW_INDIRECT_BUFFER, cmd->id);
compiler.CallMember(&GLStateManager::BindBuffer, g_stateMngrArg, GLBufferTarget::DrawIndirectBuffer, cmd->id);
compiler.Call(glMultiDrawArraysIndirect, cmd->mode, cmd->indirect, cmd->drawcount, cmd->stride);
return sizeof(*cmd);
}
case GLOpcodeMultiDrawElementsIndirect:
{
auto cmd = reinterpret_cast<const GLCmdMultiDrawElementsIndirect*>(pc);
compiler.CallMember(&GLStateManager::BindBuffer, g_stateMngrArg, GLBufferTarget::DRAW_INDIRECT_BUFFER, cmd->id);
compiler.CallMember(&GLStateManager::BindBuffer, g_stateMngrArg, GLBufferTarget::DrawIndirectBuffer, cmd->id);
compiler.Call(glMultiDrawElementsIndirect, cmd->mode, cmd->type, cmd->indirect, cmd->drawcount, cmd->stride);
return sizeof(*cmd);
}
Expand All @@ -421,7 +421,7 @@ static std::size_t AssembleGLCommand(const GLOpcode opcode, const void* pc, JITC
case GLOpcodeDispatchComputeIndirect:
{
auto cmd = reinterpret_cast<const GLCmdDispatchComputeIndirect*>(pc);
compiler.CallMember(&GLStateManager::BindBuffer, g_stateMngrArg, GLBufferTarget::DISPATCH_INDIRECT_BUFFER, cmd->id);
compiler.CallMember(&GLStateManager::BindBuffer, g_stateMngrArg, GLBufferTarget::DispatchIndirectBuffer, cmd->id);
compiler.Call(glDispatchComputeIndirect, cmd->indirect);
return sizeof(*cmd);
}
Expand Down Expand Up @@ -457,11 +457,11 @@ static std::size_t AssembleGLCommand(const GLOpcode opcode, const void* pc, JITC
{
auto cmd = reinterpret_cast<const GLCmdUnbindResources*>(pc);
if (cmd->resetUBO)
compiler.CallMember(&GLStateManager::UnbindBuffersBase, g_stateMngrArg, GLBufferTarget::UNIFORM_BUFFER, cmd->first, cmd->count);
compiler.CallMember(&GLStateManager::UnbindBuffersBase, g_stateMngrArg, GLBufferTarget::UniformBuffer, cmd->first, cmd->count);
if (cmd->resetSSAO)
compiler.CallMember(&GLStateManager::UnbindBuffersBase, g_stateMngrArg, GLBufferTarget::SHADER_STORAGE_BUFFER, cmd->first, cmd->count);
compiler.CallMember(&GLStateManager::UnbindBuffersBase, g_stateMngrArg, GLBufferTarget::ShaderStorageBuffer, cmd->first, cmd->count);
if (cmd->resetTransformFeedback)
compiler.CallMember(&GLStateManager::UnbindBuffersBase, g_stateMngrArg, GLBufferTarget::TRANSFORM_FEEDBACK_BUFFER, cmd->first, cmd->count);
compiler.CallMember(&GLStateManager::UnbindBuffersBase, g_stateMngrArg, GLBufferTarget::TransformFeedbackBuffer, cmd->first, cmd->count);
if (cmd->resetTextures)
compiler.CallMember(&GLStateManager::UnbindTextures, g_stateMngrArg, cmd->first, cmd->count);
if (cmd->resetImages)
Expand Down
16 changes: 8 additions & 8 deletions sources/Renderer/OpenGL/Command/GLCommandExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static std::size_t ExecuteGLCommand(const GLOpcode opcode, const void* pc, GLSta
{
auto cmd = reinterpret_cast<const GLCmdDrawArraysIndirect*>(pc);
#ifdef LLGL_GLEXT_DRAW_INDIRECT
stateMngr->BindBuffer(GLBufferTarget::DRAW_INDIRECT_BUFFER, cmd->id);
stateMngr->BindBuffer(GLBufferTarget::DrawIndirectBuffer, cmd->id);
GLintptr offset = cmd->indirect;
for (std::uint32_t i = 0; i < cmd->numCommands; ++i)
{
Expand Down Expand Up @@ -390,7 +390,7 @@ static std::size_t ExecuteGLCommand(const GLOpcode opcode, const void* pc, GLSta
{
auto cmd = reinterpret_cast<const GLCmdDrawElementsIndirect*>(pc);
#ifdef LLGL_GLEXT_DRAW_INDIRECT
stateMngr->BindBuffer(GLBufferTarget::DRAW_INDIRECT_BUFFER, cmd->id);
stateMngr->BindBuffer(GLBufferTarget::DrawIndirectBuffer, cmd->id);
GLintptr offset = cmd->indirect;
for (std::uint32_t i = 0; i < cmd->numCommands; ++i)
{
Expand All @@ -404,7 +404,7 @@ static std::size_t ExecuteGLCommand(const GLOpcode opcode, const void* pc, GLSta
{
auto cmd = reinterpret_cast<const GLCmdMultiDrawArraysIndirect*>(pc);
#ifdef LLGL_GLEXT_MULTI_DRAW_INDIRECT
stateMngr->BindBuffer(GLBufferTarget::DRAW_INDIRECT_BUFFER, cmd->id);
stateMngr->BindBuffer(GLBufferTarget::DrawIndirectBuffer, cmd->id);
glMultiDrawArraysIndirect(cmd->mode, cmd->indirect, cmd->drawcount, cmd->stride);
#endif
return sizeof(*cmd);
Expand All @@ -413,7 +413,7 @@ static std::size_t ExecuteGLCommand(const GLOpcode opcode, const void* pc, GLSta
{
auto cmd = reinterpret_cast<const GLCmdMultiDrawElementsIndirect*>(pc);
#ifdef LLGL_GLEXT_MULTI_DRAW_INDIRECT
stateMngr->BindBuffer(GLBufferTarget::DRAW_INDIRECT_BUFFER, cmd->id);
stateMngr->BindBuffer(GLBufferTarget::DrawIndirectBuffer, cmd->id);
glMultiDrawElementsIndirect(cmd->mode, cmd->type, cmd->indirect, cmd->drawcount, cmd->stride);
#endif
return sizeof(*cmd);
Expand All @@ -430,7 +430,7 @@ static std::size_t ExecuteGLCommand(const GLOpcode opcode, const void* pc, GLSta
{
auto cmd = reinterpret_cast<const GLCmdDispatchComputeIndirect*>(pc);
#ifdef LLGL_GLEXT_COMPUTE_SHADER
stateMngr->BindBuffer(GLBufferTarget::DISPATCH_INDIRECT_BUFFER, cmd->id);
stateMngr->BindBuffer(GLBufferTarget::DispatchIndirectBuffer, cmd->id);
glDispatchComputeIndirect(cmd->indirect);
#endif
return sizeof(*cmd);
Expand Down Expand Up @@ -466,11 +466,11 @@ static std::size_t ExecuteGLCommand(const GLOpcode opcode, const void* pc, GLSta
{
auto cmd = reinterpret_cast<const GLCmdUnbindResources*>(pc);
if (cmd->resetUBO)
stateMngr->UnbindBuffersBase(GLBufferTarget::UNIFORM_BUFFER, cmd->first, cmd->count);
stateMngr->UnbindBuffersBase(GLBufferTarget::UniformBuffer, cmd->first, cmd->count);
if (cmd->resetSSAO)
stateMngr->UnbindBuffersBase(GLBufferTarget::SHADER_STORAGE_BUFFER, cmd->first, cmd->count);
stateMngr->UnbindBuffersBase(GLBufferTarget::ShaderStorageBuffer, cmd->first, cmd->count);
if (cmd->resetTransformFeedback)
stateMngr->UnbindBuffersBase(GLBufferTarget::TRANSFORM_FEEDBACK_BUFFER, cmd->first, cmd->count);
stateMngr->UnbindBuffersBase(GLBufferTarget::TransformFeedbackBuffer, cmd->first, cmd->count);
if (cmd->resetTextures)
stateMngr->UnbindTextures(cmd->first, cmd->count);
if (cmd->resetImages)
Expand Down
6 changes: 3 additions & 3 deletions sources/Renderer/OpenGL/Command/GLDeferredCommandBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -440,14 +440,14 @@ void GLDeferredCommandBuffer::SetResource(std::uint32_t descriptor, Resource& re
case GLResourceType_UBO:
{
auto& bufferGL = LLGL_CAST(GLBuffer&, resource);
BindBufferBase(GLBufferTarget::UNIFORM_BUFFER, bufferGL, binding.slot);
BindBufferBase(GLBufferTarget::UniformBuffer, bufferGL, binding.slot);
}
break;

case GLResourceType_SSBO:
{
auto& bufferGL = LLGL_CAST(GLBuffer&, resource);
BindBufferBase(GLBufferTarget::SHADER_STORAGE_BUFFER, bufferGL, binding.slot);
BindBufferBase(GLBufferTarget::ShaderStorageBuffer, bufferGL, binding.slot);
}
break;

Expand Down Expand Up @@ -716,7 +716,7 @@ void GLDeferredCommandBuffer::BeginStreamOutput(std::uint32_t numBuffers, Buffer
{
/* Bind transform feedback buffers */
numBuffers = std::min(numBuffers, LLGL_MAX_NUM_SO_BUFFERS);
BindBuffersBase(GLBufferTarget::TRANSFORM_FEEDBACK_BUFFER, 0, numBuffers, buffers);
BindBuffersBase(GLBufferTarget::TransformFeedbackBuffer, 0, numBuffers, buffers);

/* Begin transform feedback section */
#ifdef __APPLE__
Expand Down
22 changes: 11 additions & 11 deletions sources/Renderer/OpenGL/Command/GLImmediateCommandBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -369,14 +369,14 @@ void GLImmediateCommandBuffer::SetResource(std::uint32_t descriptor, Resource& r
case GLResourceType_UBO:
{
auto& bufferGL = LLGL_CAST(GLBuffer&, resource);
stateMngr_->BindBufferBase(GLBufferTarget::UNIFORM_BUFFER, binding.slot, bufferGL.GetID());
stateMngr_->BindBufferBase(GLBufferTarget::UniformBuffer, binding.slot, bufferGL.GetID());
}
break;

case GLResourceType_SSBO:
{
auto& bufferGL = LLGL_CAST(GLBuffer&, resource);
stateMngr_->BindBufferBase(GLBufferTarget::SHADER_STORAGE_BUFFER, binding.slot, bufferGL.GetID());
stateMngr_->BindBufferBase(GLBufferTarget::ShaderStorageBuffer, binding.slot, bufferGL.GetID());
}
break;

Expand Down Expand Up @@ -433,11 +433,11 @@ void GLImmediateCommandBuffer::ResetResourceSlots(
case ResourceType::Buffer:
{
if ((bindFlags & BindFlags::ConstantBuffer) != 0)
stateMngr_->UnbindBuffersBase(GLBufferTarget::UNIFORM_BUFFER, first, count);
stateMngr_->UnbindBuffersBase(GLBufferTarget::UniformBuffer, first, count);
if ((bindFlags & (BindFlags::Sampled | BindFlags::Storage)) != 0)
stateMngr_->UnbindBuffersBase(GLBufferTarget::SHADER_STORAGE_BUFFER, first, count);
stateMngr_->UnbindBuffersBase(GLBufferTarget::ShaderStorageBuffer, first, count);
if ((bindFlags & BindFlags::StreamOutputBuffer) != 0)
stateMngr_->UnbindBuffersBase(GLBufferTarget::TRANSFORM_FEEDBACK_BUFFER, first, count);
stateMngr_->UnbindBuffersBase(GLBufferTarget::TransformFeedbackBuffer, first, count);
}
break;

Expand Down Expand Up @@ -602,7 +602,7 @@ void GLImmediateCommandBuffer::BeginStreamOutput(std::uint32_t numBuffers, Buffe
soTargets[i] = bufferGL->GetID();
}

stateMngr_->BindBuffersBase(GLBufferTarget::TRANSFORM_FEEDBACK_BUFFER, 0, static_cast<GLsizei>(numBuffers), soTargets);
stateMngr_->BindBuffersBase(GLBufferTarget::TransformFeedbackBuffer, 0, static_cast<GLsizei>(numBuffers), soTargets);

/* Begin transform feedback section */
#ifdef LLGL_GLEXT_TRANSFORM_FEEDBACK
Expand Down Expand Up @@ -735,7 +735,7 @@ void GLImmediateCommandBuffer::DrawIndirect(Buffer& buffer, std::uint64_t offset
{
#ifdef LLGL_GLEXT_DRAW_INDIRECT
auto& bufferGL = LLGL_CAST(GLBuffer&, buffer);
stateMngr_->BindBuffer(GLBufferTarget::DRAW_INDIRECT_BUFFER, bufferGL.GetID());
stateMngr_->BindBuffer(GLBufferTarget::DrawIndirectBuffer, bufferGL.GetID());

const GLintptr indirect = static_cast<GLintptr>(offset);
glDrawArraysIndirect(
Expand All @@ -750,7 +750,7 @@ void GLImmediateCommandBuffer::DrawIndirect(Buffer& buffer, std::uint64_t offset
#ifdef LLGL_GLEXT_DRAW_INDIRECT
/* Bind indirect argument buffer */
auto& bufferGL = LLGL_CAST(GLBuffer&, buffer);
stateMngr_->BindBuffer(GLBufferTarget::DRAW_INDIRECT_BUFFER, bufferGL.GetID());
stateMngr_->BindBuffer(GLBufferTarget::DrawIndirectBuffer, bufferGL.GetID());

GLintptr indirect = static_cast<GLintptr>(offset);
#ifdef LLGL_GLEXT_MULTI_DRAW_INDIRECT
Expand Down Expand Up @@ -784,7 +784,7 @@ void GLImmediateCommandBuffer::DrawIndexedIndirect(Buffer& buffer, std::uint64_t
{
#ifdef LLGL_GLEXT_DRAW_INDIRECT
auto& bufferGL = LLGL_CAST(GLBuffer&, buffer);
stateMngr_->BindBuffer(GLBufferTarget::DRAW_INDIRECT_BUFFER, bufferGL.GetID());
stateMngr_->BindBuffer(GLBufferTarget::DrawIndirectBuffer, bufferGL.GetID());

const GLintptr indirect = static_cast<GLintptr>(offset);
glDrawElementsIndirect(
Expand All @@ -800,7 +800,7 @@ void GLImmediateCommandBuffer::DrawIndexedIndirect(Buffer& buffer, std::uint64_t
#ifdef LLGL_GLEXT_DRAW_INDIRECT
/* Bind indirect argument buffer */
auto& bufferGL = LLGL_CAST(GLBuffer&, buffer);
stateMngr_->BindBuffer(GLBufferTarget::DRAW_INDIRECT_BUFFER, bufferGL.GetID());
stateMngr_->BindBuffer(GLBufferTarget::DrawIndirectBuffer, bufferGL.GetID());

GLintptr indirect = static_cast<GLintptr>(offset);
#ifdef LLGL_GLEXT_MULTI_DRAW_INDIRECT
Expand Down Expand Up @@ -845,7 +845,7 @@ void GLImmediateCommandBuffer::DispatchIndirect(Buffer& buffer, std::uint64_t of
{
#ifdef LLGL_GLEXT_COMPUTE_SHADER
auto& bufferGL = LLGL_CAST(GLBuffer&, buffer);
stateMngr_->BindBuffer(GLBufferTarget::DISPATCH_INDIRECT_BUFFER, bufferGL.GetID());
stateMngr_->BindBuffer(GLBufferTarget::DispatchIndirectBuffer, bufferGL.GetID());
glDispatchComputeIndirect(static_cast<GLintptr>(offset));
#endif
}
Expand Down
8 changes: 4 additions & 4 deletions sources/Renderer/OpenGL/GLRenderSystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -573,8 +573,8 @@ void GLRenderSystem::EnableDebugCallback(bool enable)
if (enable)
{
/* Enable GL debug message callback */
GLStateManager::Get().Enable(GLState::DEBUG_OUTPUT);
GLStateManager::Get().Enable(GLState::DEBUG_OUTPUT_SYNCHRONOUS);
GLStateManager::Get().Enable(GLState::DebugOutput);
GLStateManager::Get().Enable(GLState::DebugOutputSynchronous);
glDebugMessageCallback(GLDebugCallback, nullptr);

/* Filter out spam from debug callback */
Expand All @@ -589,8 +589,8 @@ void GLRenderSystem::EnableDebugCallback(bool enable)
}
else
{
GLStateManager::Get().Disable(GLState::DEBUG_OUTPUT);
GLStateManager::Get().Disable(GLState::DEBUG_OUTPUT_SYNCHRONOUS);
GLStateManager::Get().Disable(GLState::DebugOutput);
GLStateManager::Get().Disable(GLState::DebugOutputSynchronous);
glDebugMessageCallback(nullptr, nullptr);
}
}
Expand Down
4 changes: 2 additions & 2 deletions sources/Renderer/OpenGL/Platform/GLContextManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ void GLContextManager::InitRenderStates(GLStateManager& stateMngr)
/* D3D11, Vulkan, and Metal always use a fixed restart index for strip topologies */
#ifdef LLGL_PRIMITIVE_RESTART_FIXED_INDEX
if (HasExtension(GLExt::ARB_ES3_compatibility))
stateMngr.Enable(GLState::PRIMITIVE_RESTART_FIXED_INDEX);
stateMngr.Enable(GLState::PrimitiveRestartFixedIndex);
#endif

#ifdef LLGL_OPENGL
/* D3D10+ has this by default */
if (HasExtension(GLExt::ARB_seamless_cubemap_per_texture))
stateMngr.Enable(GLState::TEXTURE_CUBE_MAP_SEAMLESS);
stateMngr.Enable(GLState::TextureCubeMapSeamless);
#endif

/* D3D10+ uses clock-wise vertex winding per default */
Expand Down
Loading

0 comments on commit 8f6aee7

Please sign in to comment.