Hi,
don't know if still interested, but I have found even more convenient sollution to catch and analyze errors. It is based on some info from "OpenGL Programming Guide"
DECLARE FUNCTION gluErrorString LIB "glu32.dll" ALIAS "gluErrorString" (BYVAL errCode AS DWORD) AS LONG
DECLARE FUNCTION glGetError LIB "opengl32.dll" ALIAS "glGetError" () AS DWORD
function CheckForGLError() as long
dim errorCode as long
dim errorDescription as long
errorCode = glGetError()
IF errorCode <> %GL_NO_ERROR THEN
errorDescription = gluErrorString(errorCode)
MSGBOX hWnd, "Error description: "+peek$(errorDescription, 255), %MB_OK or %MB_ICONERROR, "TBGL Error"
function = 1
else
function = 0
eND IF
end function
... just call this function to detect if some problem occured, now it also returns full error description.
Petr
P.S. It is quite funny that this function returns in case of error for example "operazione non valida" although I have Czech OpenGL drivers and localized operating system !
Bookmarks