Skip to content
This repository has been archived by the owner on Oct 30, 2019. It is now read-only.

Commit

Permalink
Check for ARB_instanced_arrays explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
flibitijibibo committed May 9, 2015
1 parent a1b4303 commit 213c964
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Graphics/OpenGLDevice_GL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1059,8 +1059,12 @@ private void LoadGLEntryPoints()
throw new NoSuitableGraphicsDeviceException("OpenGL framebuffer support is required!");
}

/* ARB_instanced_arrays/ARB_draw_instanced are almost optional. */
SupportsHardwareInstancing = true;
/* ARB_instanced_arrays/ARB_draw_instanced are almost optional.
* While we do not directly call glVertexAttribDivisor ourselves,
* we still need to check for ARB_instanced_arrays support.
* -flibit
*/
SupportsHardwareInstancing = SDL.SDL_GL_GetProcAddress("glVertexAttribDivisor") != IntPtr.Zero;
try
{
glDrawElementsInstanced = (DrawElementsInstanced) Marshal.GetDelegateForFunctionPointer(
Expand Down

0 comments on commit 213c964

Please sign in to comment.