Skip to content

Commit

Permalink
Fix DrawRangeElementsBaseVertex and DrawElementsBaseVertex (#2191)
Browse files Browse the repository at this point in the history
* fix DrawRangeElementsBaseVertex

* fix DrawElementsBaseVertex
  • Loading branch information
nkast authored Jan 17, 2025
1 parent 3ba5585 commit a675591
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Platforms/Graphics/.GL/ConcreteGraphicsCapabilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ internal void PlatformInitialize(ConcreteGraphicsContextGL cgraphicsContext, Gra
SupportsSeparateBlendStates = version >= new GLVersion(4,0) || GL.Extensions.Contains("GL_ARB_draw_buffers_blend");
#endif

SupportsBaseVertex = version >= new GLVersion(3,2) || GL.Extensions.Contains("GL_ARB_framebuffer_object");
SupportsBaseVertex = version >= new GLVersion(3,2) || GL.Extensions.Contains("GL_ARB_draw_elements_base_vertex");
SupportsDrawRangeElements = (GL.BoundApi == OGL.RenderApi.GL && version >= new GLVersion(2, 0))
|| (GL.BoundApi == OGL.RenderApi.ES && version >= new GLVersion(3, 0));

Expand Down
2 changes: 1 addition & 1 deletion Platforms/Graphics/.GL/ConcreteGraphicsContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ public override void DrawIndexedPrimitives(PrimitiveType primitiveType, int base
int indexElementCount = GraphicsContextStrategy.GetElementCountArray(primitiveType, primitiveCount);
GLPrimitiveType target = ConcreteGraphicsContext.PrimitiveTypeGL(primitiveType);

if (GL.DrawElementsBaseVertex != null)
if (((ConcreteGraphicsCapabilities)this.Capabilities).SupportsBaseVertex)
{
PlatformApplyVertexBuffers(0);

Expand Down

0 comments on commit a675591

Please sign in to comment.