Commit 4166c52d authored by pcy's avatar pcy
Browse files

synchronous gl debug

parent f007c2ce
...@@ -120,6 +120,9 @@ namespace PoroCYon.FNAGLSL { ...@@ -120,6 +120,9 @@ namespace PoroCYon.FNAGLSL {
GL.Init(gd); GL.Init(gd);
GL.GetError(); // ignore errors from FNA/mojoshader GL.GetError(); // ignore errors from FNA/mojoshader
GL.Enable(GL.DEBUG_OUTPUT_SYNCHRONOUS);
GL.Throw();
if (maxTextureSlots < 0) { if (maxTextureSlots < 0) {
maxTextureSlots = GL.GetIntegerv(GL.MAX_COMBINED_TEXTURE_IMAGE_UNITS); maxTextureSlots = GL.GetIntegerv(GL.MAX_COMBINED_TEXTURE_IMAGE_UNITS);
GL.Throw(); GL.Throw();
......
...@@ -10,6 +10,8 @@ namespace PoroCYon.FNAGLSL { ...@@ -10,6 +10,8 @@ namespace PoroCYon.FNAGLSL {
LINK_STATUS = 0x8B82, LINK_STATUS = 0x8B82,
CURRENT_PROGRAM = 0x8B8D, CURRENT_PROGRAM = 0x8B8D,
DEBUG_OUTPUT_SYNCHRONOUS = 0x8242,
ACTIVE_ATTRIBUTES = 0x8B89, ACTIVE_ATTRIBUTES = 0x8B89,
ACTIVE_UNIFORMS = 0x8B86, ACTIVE_UNIFORMS = 0x8B86,
INVALID_INDEX = 0xFFFFFFFFu, INVALID_INDEX = 0xFFFFFFFFu,
......
...@@ -50,6 +50,9 @@ namespace PoroCYon.FNAGLSL { ...@@ -50,6 +50,9 @@ namespace PoroCYon.FNAGLSL {
_ActiveTexture = GetProcAddress<ActiveTexture_T>("ActiveTexture"); _ActiveTexture = GetProcAddress<ActiveTexture_T>("ActiveTexture");
_BindTexture = GetProcAddress<BindTexture_T>("BindTexture"); _BindTexture = GetProcAddress<BindTexture_T>("BindTexture");
_Enable = GetProcAddress<Enable_T>("Enable");
_Disable = GetProcAddress<Disable_T>("Disable");
_Uniform1fv = GetProcAddress<Uniform1fv_T>("Uniform1fv"); _Uniform1fv = GetProcAddress<Uniform1fv_T>("Uniform1fv");
_Uniform2fv = GetProcAddress<Uniform2fv_T>("Uniform2fv"); _Uniform2fv = GetProcAddress<Uniform2fv_T>("Uniform2fv");
_Uniform3fv = GetProcAddress<Uniform3fv_T>("Uniform3fv"); _Uniform3fv = GetProcAddress<Uniform3fv_T>("Uniform3fv");
...@@ -110,6 +113,12 @@ namespace PoroCYon.FNAGLSL { ...@@ -110,6 +113,12 @@ namespace PoroCYon.FNAGLSL {
_GetActiveUniformsiv = null; _GetActiveUniformsiv = null;
_GetActiveUniform = null; _GetActiveUniform = null;
_ActiveTexture = null;
_BindTexture = null;
_Enable = null;
_Disable = null;
_Uniform1fv = null; _Uniform1fv = null;
_Uniform2fv = null; _Uniform2fv = null;
_Uniform3fv = null; _Uniform3fv = null;
...@@ -598,6 +607,14 @@ namespace PoroCYon.FNAGLSL { ...@@ -598,6 +607,14 @@ namespace PoroCYon.FNAGLSL {
public static void BindTexture(GLenum tar, GLuint tex) { public static void BindTexture(GLenum tar, GLuint tex) {
_BindTexture(tar, tex); _BindTexture(tar, tex);
} }
delegate void Enable_T(GLenum cap);
static Enable_T _Enable;
public static void Enable(GLenum cap) { _Enable(cap); }
delegate void Disable_T(GLenum cap);
static Disable_T _Disable;
public static void Disable(GLenum cap) { _Disable(cap); }
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment