diff --git a/Platforms/Graphics/.BlazorGL/ConcreteGraphicsContext.cs b/Platforms/Graphics/.BlazorGL/ConcreteGraphicsContext.cs
index 46cc9d52570..13f265bd572 100644
--- a/Platforms/Graphics/.BlazorGL/ConcreteGraphicsContext.cs
+++ b/Platforms/Graphics/.BlazorGL/ConcreteGraphicsContext.cs
@@ -25,9 +25,6 @@ internal sealed class ConcreteGraphicsContext : GraphicsContextStrategy
internal ShaderProgram _shaderProgram = null;
- internal bool _supportsInvalidateFramebuffer;
- internal bool _supportsBlitFramebuffer;
-
private Vector4 _posFixup;
internal BufferBindingInfo[] _bufferBindingInfos;
@@ -81,22 +78,6 @@ public override void PlatformSetup()
this._newEnabledVertexAttributes = new bool[base.Capabilities.MaxVertexBufferSlots];
- // TODO: check for FramebufferObjectARB
- if ((GL is IWebGL2RenderingContext)
- //|| this.Capabilities.SupportsFramebufferObjectARB
- //|| this.Capabilities.SupportsFramebufferObjectEXT
- )
- {
- this._supportsBlitFramebuffer = true;
- this._supportsInvalidateFramebuffer = true;
- }
- else
- {
- throw new PlatformNotSupportedException(
- "GraphicsDevice requires either ARB_framebuffer_object or EXT_framebuffer_object." +
- "Try updating your graphics drivers.");
- }
-
this._bufferBindingInfos = new BufferBindingInfo[base.Capabilities.MaxVertexBufferSlots];
for (int i = 0; i < this._bufferBindingInfos.Length; i++)
this._bufferBindingInfos[i] = new BufferBindingInfo(null, null, IntPtr.Zero, 0);
@@ -1206,19 +1187,16 @@ protected override void PlatformResolveRenderTargets()
GL.CheckGLError();
((IWebGL2RenderingContext)GL).DrawBuffer(WebGL2DrawBufferAttachmentPoint.COLOR_ATTACHMENT0 + i);
GL.CheckGLError();
- Debug.Assert(this._supportsBlitFramebuffer);
((IWebGL2RenderingContext)GL).BlitFramebuffer(
0, 0, renderTarget.Width, renderTarget.Height,
0, 0, renderTarget.Width, renderTarget.Height,
WebGLBufferBits.COLOR, WebGLTexParam.NEAREST);
GL.CheckGLError();
- if (renderTarget.RenderTargetUsage == RenderTargetUsage.DiscardContents
- && this._supportsInvalidateFramebuffer)
+ if (renderTarget.RenderTargetUsage == RenderTargetUsage.DiscardContents)
{
if (i == 0)
{
- Debug.Assert(this._supportsInvalidateFramebuffer);
((IWebGL2RenderingContext)GL).InvalidateFramebuffer(WebGL2FramebufferType.READ_FRAMEBUFFER, InvalidateFramebufferAttachements);
GL.CheckGLError();
}
diff --git a/Platforms/Graphics/.GL/ConcreteGraphicsCapabilities.cs b/Platforms/Graphics/.GL/ConcreteGraphicsCapabilities.cs
index 7366573381c..e8a6cf48f55 100644
--- a/Platforms/Graphics/.GL/ConcreteGraphicsCapabilities.cs
+++ b/Platforms/Graphics/.GL/ConcreteGraphicsCapabilities.cs
@@ -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));
diff --git a/Platforms/Graphics/.GL/ConcreteGraphicsContext.cs b/Platforms/Graphics/.GL/ConcreteGraphicsContext.cs
index d82cd3397e4..2d146293eb3 100644
--- a/Platforms/Graphics/.GL/ConcreteGraphicsContext.cs
+++ b/Platforms/Graphics/.GL/ConcreteGraphicsContext.cs
@@ -89,19 +89,17 @@ public override void PlatformSetup()
{
this._newEnabledVertexAttributes = new bool[base.Capabilities.MaxVertexBufferSlots];
- if (((ConcreteGraphicsCapabilities)base.Capabilities).SupportsFramebufferObjectARB
- || ((ConcreteGraphicsCapabilities)base.Capabilities).SupportsFramebufferObjectEXT)
- {
- this._supportsBlitFramebuffer = GL.BlitFramebuffer != null;
- this._supportsInvalidateFramebuffer = GL.InvalidateFramebuffer != null;
- }
- else
+ if (!((ConcreteGraphicsCapabilities)base.Capabilities).SupportsFramebufferObjectARB
+ && !((ConcreteGraphicsCapabilities)base.Capabilities).SupportsFramebufferObjectEXT)
{
throw new PlatformNotSupportedException(
"GraphicsDevice requires either ARB_framebuffer_object or EXT_framebuffer_object." +
"Try updating your graphics drivers.");
}
+ this._supportsBlitFramebuffer = GL.BlitFramebuffer != null;
+ this._supportsInvalidateFramebuffer = GL.InvalidateFramebuffer != null;
+
this._bufferBindingInfos = new BufferBindingInfo[base.Capabilities.MaxVertexBufferSlots];
for (int i = 0; i < this._bufferBindingInfos.Length; i++)
this._bufferBindingInfos[i] = new BufferBindingInfo(null, null, IntPtr.Zero, 0);
@@ -840,7 +838,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);
diff --git a/Platforms/Kni.Platform.Android.GL.csproj b/Platforms/Kni.Platform.Android.GL.csproj
index 9cad2ee2407..5246f664ce9 100644
--- a/Platforms/Kni.Platform.Android.GL.csproj
+++ b/Platforms/Kni.Platform.Android.GL.csproj
@@ -5,8 +5,8 @@
..\Artifacts\Platforms\Android
True
- 4.0.9001.0
- 4.0.9001.0
+ 4.0.9001.1
+ 4.0.9001.1
diff --git a/Platforms/Kni.Platform.Blazor.GL.csproj b/Platforms/Kni.Platform.Blazor.GL.csproj
index 751f913869c..f017a3879ad 100644
--- a/Platforms/Kni.Platform.Blazor.GL.csproj
+++ b/Platforms/Kni.Platform.Blazor.GL.csproj
@@ -6,8 +6,8 @@
BLAZORGL;STBSHARP_INTERNAL
- 4.0.9001.0
- 4.0.9001.0
+ 4.0.9001.1
+ 4.0.9001.1
diff --git a/Platforms/Kni.Platform.Cardboard.GL.csproj b/Platforms/Kni.Platform.Cardboard.GL.csproj
index bd3b13e9702..327dd58f056 100644
--- a/Platforms/Kni.Platform.Cardboard.GL.csproj
+++ b/Platforms/Kni.Platform.Cardboard.GL.csproj
@@ -5,8 +5,8 @@
..\Artifacts\Platforms\Cardboard
True
- 4.0.9001.0
- 4.0.9001.0
+ 4.0.9001.1
+ 4.0.9001.1
diff --git a/Platforms/Kni.Platform.Oculus.GL.csproj b/Platforms/Kni.Platform.Oculus.GL.csproj
index ce566d0ce30..57e01b93158 100644
--- a/Platforms/Kni.Platform.Oculus.GL.csproj
+++ b/Platforms/Kni.Platform.Oculus.GL.csproj
@@ -5,8 +5,8 @@
..\Artifacts\Platforms\Oculus
True
- 4.0.9001.0
- 4.0.9001.0
+ 4.0.9001.1
+ 4.0.9001.1
diff --git a/Platforms/Kni.Platform.SDL2.GL.csproj b/Platforms/Kni.Platform.SDL2.GL.csproj
index 0aa60eb35ce..72714c09e71 100644
--- a/Platforms/Kni.Platform.SDL2.GL.csproj
+++ b/Platforms/Kni.Platform.SDL2.GL.csproj
@@ -2,8 +2,8 @@
- 4.0.9001.0
- 4.0.9001.0
+ 4.0.9001.1
+ 4.0.9001.1
diff --git a/Platforms/Kni.Platform.iOS.GL.csproj b/Platforms/Kni.Platform.iOS.GL.csproj
index b26fa24e311..fb3c0c15964 100644
--- a/Platforms/Kni.Platform.iOS.GL.csproj
+++ b/Platforms/Kni.Platform.iOS.GL.csproj
@@ -5,8 +5,8 @@
..\Artifacts\Platforms\iOS
True
- 4.0.9001.0
- 4.0.9001.0
+ 4.0.9001.1
+ 4.0.9001.1