mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 02:05:29 +00:00
Check whether EXT_framebuffer_object is supported and abort if it is not.
This commit is contained in:
parent
5e85dfc40e
commit
5dfa3e4de2
|
@ -18,7 +18,7 @@ using OpenTK.Graphics.OpenGL;
|
|||
|
||||
namespace Examples.Tutorial
|
||||
{
|
||||
[Example("Simple FrameBuffer Object.", ExampleCategory.OpenGL)]
|
||||
[Example("Framebuffer Objects.", ExampleCategory.OpenGL)]
|
||||
public class SimpleFBO : GameWindow
|
||||
{
|
||||
public SimpleFBO()
|
||||
|
@ -56,6 +56,15 @@ namespace Examples.Tutorial
|
|||
|
||||
public override void OnLoad(EventArgs e)
|
||||
{
|
||||
if (!GL.SupportsExtension("EXT_framebuffer_object"))
|
||||
{
|
||||
System.Windows.Forms.MessageBox.Show(
|
||||
"Your video card does not support Framebuffer Objects. Please update your drivers.",
|
||||
"FBOs not supported",
|
||||
System.Windows.Forms.MessageBoxButtons.OK, System.Windows.Forms.MessageBoxIcon.Exclamation);
|
||||
Exit();
|
||||
}
|
||||
|
||||
GL.Enable(EnableCap.DepthTest);
|
||||
GL.ClearDepth(1.0f);
|
||||
GL.DepthFunc(DepthFunction.Lequal);
|
||||
|
|
Loading…
Reference in a new issue