[GB.OPENGL.GLSL]
* NEW: Add missing method Gl.GetProgramInfoLog() git-svn-id: svn://localhost/gambas/trunk@2511 867c0c6c-44f3-4631-809d-bfa615b0a4ec
This commit is contained in:
parent
fe929cce9e
commit
4dbca3f22d
@ -48,6 +48,7 @@ GB_DESC Cgl[] =
|
||||
/* GLprogram.c */
|
||||
GB_STATIC_METHOD("CreateProgram", "i", GLCREATEPROGRAM, NULL),
|
||||
GB_STATIC_METHOD("DeleteProgram", NULL, GLDELETEPROGRAM, "(Program)i"),
|
||||
GB_STATIC_METHOD("GetProgramInfoLog", "s", GLGETPROGRAMINFOLOG, "(Program)i"),
|
||||
GB_STATIC_METHOD("GetProgramiv", "Integer[]", GLGETPROGRAMIV, "(Program)i(Pname)i"),
|
||||
GB_STATIC_METHOD("IsProgram", "b", GLISPROGRAM, "(Program)i"),
|
||||
GB_STATIC_METHOD("LinkProgram", NULL, GLLINKPROGRAM, "(Program)i"),
|
||||
|
@ -38,6 +38,27 @@ BEGIN_METHOD(GLDELETEPROGRAM, GB_INTEGER program)
|
||||
|
||||
END_METHOD
|
||||
|
||||
BEGIN_METHOD(GLGETPROGRAMINFOLOG, GB_INTEGER program)
|
||||
|
||||
GLint length;
|
||||
|
||||
glGetProgramiv(VARG(program), GL_INFO_LOG_LENGTH, &length);
|
||||
|
||||
if (!length)
|
||||
{
|
||||
GB.ReturnNull();
|
||||
return;
|
||||
}
|
||||
else
|
||||
{
|
||||
GLchar log[length];
|
||||
|
||||
glGetProgramInfoLog(VARG(program), length, NULL, log);
|
||||
GB.ReturnNewZeroString((const char *)log);
|
||||
}
|
||||
|
||||
END_METHOD
|
||||
|
||||
BEGIN_METHOD(GLGETPROGRAMIV, GB_INTEGER program; GB_INTEGER pname)
|
||||
|
||||
GLint value;
|
||||
|
@ -27,6 +27,7 @@
|
||||
|
||||
DECLARE_METHOD(GLCREATEPROGRAM);
|
||||
DECLARE_METHOD(GLDELETEPROGRAM);
|
||||
DECLARE_METHOD(GLGETPROGRAMINFOLOG);
|
||||
DECLARE_METHOD(GLGETPROGRAMIV);
|
||||
DECLARE_METHOD(GLISPROGRAM);
|
||||
DECLARE_METHOD(GLLINKPROGRAM);
|
||||
|
Loading…
x
Reference in New Issue
Block a user