Skip to content

Commit

Permalink
[DGL] Query correct value for MaxTextureSlots (MonoGame#6970)
Browse files Browse the repository at this point in the history
* Query correct value for the bounds to GL.ActiveTexture

see bug MonoGame#6969

* Fix typo
  • Loading branch information
Jjagg authored and kimimaru4000 committed Sep 25, 2020
1 parent a53b231 commit 98a1c92
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,7 @@ private void PlatformSetup()

Context.MakeCurrent(windowInfo);
#endif
MaxTextureSlots = 16;

GL.GetInteger(GetPName.MaxTextureImageUnits, out MaxTextureSlots);
GL.GetInteger(GetPName.MaxCombinedTextureImageUnits, out MaxTextureSlots);
GraphicsExtensions.CheckGLError();

GL.GetInteger(GetPName.MaxTextureSize, out _maxTextureSize);
Expand Down
1 change: 1 addition & 0 deletions MonoGame.Framework/Platform/Graphics/OpenGL.cs
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,7 @@ internal enum GetPName : int
{
ArrayBufferBinding = 0x8894,
MaxTextureImageUnits = 0x8872,
MaxCombinedTextureImageUnits = 0x8B4D,
MaxVertexAttribs = 0x8869,
MaxTextureSize = 0x0D33,
MaxDrawBuffers = 0x8824,
Expand Down

0 comments on commit 98a1c92

Please sign in to comment.