LWJGL Forum

Programming => General Java Game Development => Topic started by: Evgeny on January 17, 2021, 19:36:01

Title: Framebuffer debug
Post by: Evgeny on January 17, 2021, 19:36:01
I use lwjgl 3.2.3 and I have some problems with fbo. How can I enable debug mode for fbo ? I found  glCheckFramebufferStatus only.
Title: Re: Framebuffer debug
Post by: Evgeny on January 24, 2021, 14:39:17
Does somebody know something else about it ? Developers where are you ? :)
Title: Re: Framebuffer debug
Post by: jakethesnake on May 03, 2021, 17:06:00
Try calling this after every opengl call you make in your troubled code. find the opengl call, and go read the documentation to see what's wrong.

private static final String sInvalid = "GLerr: invalid enum";
private static final String sValue = "GLerr: invalid value";
private static final String sOp = "GLerr: invalid operation";
private static final String sOver = "GLerr: stack overflow";
private static final String sUnder = "GLerr: stack underflow";
private static final String sMem = "GLerr: out of memory";
private static final String sFB = "GLerr: invalid FB operation";
private static final String sUnknown = "GLerr: unknown";

static String getErrors(){

switch(glGetError()){
case GL_NO_ERROR: return null;
case GL_INVALID_ENUM : return sInvalid;
case GL_INVALID_VALUE : return sValue;
case GL_INVALID_OPERATION : return sOp;
case GL_STACK_OVERFLOW : return sOver;
case GL_STACK_UNDERFLOW : return sUnder;
case GL_OUT_OF_MEMORY : diagnozeMem(); return sMem;
case GL_INVALID_FRAMEBUFFER_OPERATION : return sFB;
default: return sUnknown;
}

}