rs_gl.cpp

Go to the documentation of this file.
00001 /*
00002     RenderStack  Support library for OpenGL 3+
00003     Copyright (C) 2010  Timo Suoranta
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Lesser General Public
00007     License as published by the Free Software Foundation; either
00008     version 2.1 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Lesser General Public License for more details.
00014 
00015     You should have received a copy of the GNU Lesser General Public
00016     License along with this library; if not, write to the Free Software
00017     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
00018 */
00019 
00027 #include "renderstack/rs_gl.h"
00028 #include "renderstack/rs_log.h"
00029 
00030 
00031 // #define RS_LOG_GL 1
00032 #if defined(RS_LOG_GL)
00033 #   define RS_LOG_GL_FUNCTION(A) rs_log_gl_function(A)
00034 #else
00035 #   define RS_LOG_GL_FUNCTION(A)
00036 #endif
00037 
00038 extern "C" {
00039 
00040 void rs_log_gl_function(char const * a)
00041 {
00042     rs_log("%s\n", a);
00043 }
00044 
00045 void rs_check_error()
00046 {
00047     GLint status = glGetError();
00048     if(status != GL_NO_ERROR)
00049     {
00050         rs_log("%s\n ", rs_gl_enum_string(status));
00051         rs_log("");
00052     }
00053 }
00054 
00055 const char *rs_gl_enum_string(GLenum e)
00056 {
00057     switch(e)
00058     {
00059         case GL_INVALID_ENUM      : return "GL_INVALID_ENUM";
00060         case GL_INVALID_VALUE     : return "GL_INVALID_VALUE";
00061         case GL_INVALID_OPERATION : return "GL_INVALID_OPERATION";
00062         case GL_STACK_OVERFLOW    : return "GL_STACK_OVERFLOW";
00063         case GL_STACK_UNDERFLOW   : return "GL_STACK_UNDERFLOW";
00064         case GL_OUT_OF_MEMORY     : return "GL_OUT_OF_MEMORY";
00065 
00066         case GL_BYTE              : return "GL_BYTE";
00067         case GL_UNSIGNED_BYTE     : return "GL_UNSIGNED_BYTE";
00068         case GL_SHORT             : return "GL_SHORT";
00069         case GL_UNSIGNED_SHORT    : return "GL_UNSIGNED_SHORT";
00070         case GL_INT               : return "GL_INT";
00071         case GL_UNSIGNED_INT      : return "GL_UNSIGNED_INT";
00072         case GL_FLOAT             : return "GL_FLOAT";
00073         case GL_2_BYTES           : return "GL_2_BYTES";
00074         case GL_3_BYTES           : return "GL_3_BYTES";
00075         case GL_4_BYTES           : return "GL_4_BYTES";
00076         case GL_DOUBLE            : return "GL_DOUBLE";
00077         case GL_FLOAT_VEC2        : return "GL_FLOAT_VEC2";
00078         case GL_FLOAT_VEC3        : return "GL_FLOAT_VEC3";
00079         case GL_FLOAT_VEC4        : return "GL_FLOAT_VEC4";
00080         case GL_INT_VEC2          : return "GL_INT_VEC2";
00081         case GL_INT_VEC3          : return "GL_INT_VEC3";
00082         case GL_INT_VEC4          : return "GL_INT_VEC4";
00083         case GL_BOOL              : return "GL_BOOL";
00084         case GL_BOOL_VEC2         : return "GL_BOOL_VEC2";
00085         case GL_BOOL_VEC3         : return "GL_BOOL_VEC3";
00086         case GL_BOOL_VEC4         : return "GL_BOOL_VEC4";
00087         case GL_FLOAT_MAT2        : return "GL_FLOAT_MAT2";
00088         case GL_FLOAT_MAT3        : return "GL_FLOAT_MAT3";
00089         case GL_FLOAT_MAT4        : return "GL_FLOAT_MAT4";
00090         case GL_SAMPLER_1D        : return "GL_SAMPLER_1D";
00091         case GL_SAMPLER_2D        : return "GL_SAMPLER_2D";
00092         case GL_SAMPLER_3D        : return "GL_SAMPLER_3D";
00093         case GL_SAMPLER_CUBE      : return "GL_SAMPLER_CUBE";
00094         case GL_SAMPLER_1D_SHADOW : return "GL_SAMPLER_1D_SHADOW";
00095         case GL_SAMPLER_2D_SHADOW : return "GL_SAMPLER_2D_SHADOW";
00096 
00097         case GL_FRAMEBUFFER_COMPLETE                     : return "GL_FRAMEBUFFER_COMPLETE";
00098         case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT        : return "GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT";
00099         case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT: return "GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT";
00100         case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER       : return "GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER";
00101         case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER       : return "GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER";
00102         case GL_FRAMEBUFFER_UNSUPPORTED                  : return "GL_FRAMEBUFFER_UNSUPPORTED";
00103 
00104         case GL_NONE:                   return "GL_NONE";
00105         case GL_FRAMEBUFFER_DEFAULT:    return "GL_FRAMEBUFFER_DEFAULT";
00106         case GL_TEXTURE:                return "GL_TEXTURE";
00107         case GL_RENDERBUFFER:           return "GL_RENDERBUFFER";
00108 
00109         case GL_SIGNED_NORMALIZED       : return "GL_SIGNED_NORMALIZED";
00110         case GL_UNSIGNED_NORMALIZED     : return "GL_UNSIGNED_NORMALIZED";
00111 
00112         case GL_LINEAR                  : return "GL_LINEAR";
00113         case GL_SRGB                    : return "GL_SRGB";
00114 
00115         default: return "?"; 
00116     }
00117 }
00118 
00128 /*  GL 1.0 ... 1.1  */ 
00129 /*  GL_H  */ 
00130 void rs_gl_array_element(GLint i)
00131 {
00132     RS_LOG_GL_FUNCTION(__FUNCTION__);
00133     glArrayElement(i);
00134     rs_check_error();
00135 }
00136 void rs_gl_bind_texture(GLenum target, GLuint texture)
00137 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00138     glBindTexture(target, texture);
00139     rs_check_error();
00140 }
00141 void rs_gl_blend_func(GLenum sfactor, GLenum dfactor)
00142 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00143     glBlendFunc(sfactor, dfactor);
00144     rs_check_error();
00145 }
00146 void rs_gl_clear(GLbitfield mask)
00147 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00148     glClear(mask);
00149     rs_check_error();
00150 }
00151 void rs_gl_clear_color(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
00152 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00153     glClearColor(red, green, blue, alpha);
00154     rs_check_error();
00155 }
00156 void rs_gl_clear_depth(GLclampd depth)
00157 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00158     glClearDepth(depth);
00159     rs_check_error();
00160 }
00161 void rs_gl_clear_stencil(GLint s)
00162 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00163     glClearStencil(s);
00164     rs_check_error();
00165 }
00166 void rs_gl_color_mask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
00167 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00168     glColorMask(red, green, blue, alpha);
00169     rs_check_error();
00170 }
00171 void rs_gl_copy_tex_image_1d(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border)
00172 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00173     glCopyTexImage1D(target, level, internalFormat, x, y, width, border);
00174     rs_check_error();
00175 }
00176 void rs_gl_copy_tex_image_2d(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
00177 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00178     glCopyTexImage2D(target, level, internalFormat, x, y, width, height, border);
00179     rs_check_error();
00180 }
00181 void rs_gl_copy_tex_sub_image_1d(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
00182 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00183     glCopyTexSubImage1D(target, level, xoffset, x, y, width);
00184     rs_check_error();
00185 }
00186 void rs_gl_copy_tex_sub_image_2d(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
00187 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00188     glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
00189     rs_check_error();
00190 }
00191 void rs_gl_cull_face(GLenum mode)
00192 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00193     glCullFace(mode);
00194     rs_check_error();
00195 }
00196 void rs_gl_delete_textures(GLsizei n, const GLuint *textures)
00197 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00198     glDeleteTextures(n, textures);
00199     rs_check_error();
00200 }
00201 void rs_gl_depth_func(GLenum func)
00202 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00203     glDepthFunc(func);
00204     rs_check_error();
00205 }
00206 void rs_gl_depth_mask(GLboolean flag)
00207 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00208     glDepthMask(flag);
00209     rs_check_error();
00210 }
00211 void rs_gl_depth_range(GLclampd zNear, GLclampd zFar)
00212 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00213     glDepthRange(zNear, zFar);
00214     rs_check_error();
00215 }
00216 void rs_gl_disable(GLenum cap)
00217 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00218     glDisable(cap);
00219     rs_check_error();
00220 }
00221 void rs_gl_draw_arrays(GLenum mode, GLint first, GLsizei count)
00222 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00223     glDrawArrays(mode, first, count);
00224     rs_check_error();
00225 }
00226 void rs_gl_draw_buffer(GLenum mode)
00227 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00228     glDrawBuffer(mode);
00229     rs_check_error();
00230 }
00231 void rs_gl_draw_elements(GLenum mode, GLsizei count, GLenum type, const GLvoid *indices)
00232 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00233     glDrawElements(mode, count, type, indices);
00234     rs_check_error();
00235 }
00236 void rs_gl_enable(GLenum cap)
00237 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00238     glEnable(cap);
00239     rs_check_error();
00240 }
00241 void rs_gl_finish(void)
00242 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00243     rs_check_error();
00244 }
00245 void rs_gl_flush(void)
00246 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00247     glFlush();
00248     rs_check_error();
00249 }
00250 void rs_gl_front_face(GLenum mode)
00251 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00252     glFrontFace(mode);
00253     rs_check_error();
00254 }
00255 void rs_gl_gen_textures(GLsizei n, GLuint *textures)
00256 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00257     glGenTextures(n, textures);
00258     rs_check_error();
00259 }
00260 void rs_gl_get_boolean_v(GLenum pname, GLboolean *params)
00261 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00262     glGetBooleanv(pname, params);
00263     rs_check_error();
00264 }
00265 void rs_gl_get_double_v(GLenum pname, GLdouble *params)
00266 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00267     glGetDoublev(pname, params);
00268     rs_check_error();
00269 }
00270 GLenum rs_gl_get_error(void)
00271 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00272     return glGetError();
00273 }
00274 void rs_gl_get_float_v(GLenum pname, GLfloat *params)
00275 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00276     glGetFloatv(pname, params);
00277     rs_check_error();
00278 }
00279 void rs_gl_get_integer_v(GLenum pname, GLint *params)
00280 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00281     glGetIntegerv(pname, params);
00282     rs_check_error();
00283 }
00284 void rs_gl_get_pointer_v(GLenum pname, GLvoid* *params)
00285 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00286     glGetPointerv(pname, params);
00287     rs_check_error();
00288 }
00289 const GLubyte * rs_gl_get_string(GLenum name)
00290 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00291     const GLubyte *res = glGetString(name);
00292     rs_check_error();
00293     return res;
00294 }
00295 void rs_gl_get_tex_env_fv(GLenum target, GLenum pname, GLfloat *params)
00296 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00297     glGetTexEnvfv(target, pname, params);
00298     rs_check_error();
00299 }
00300 void rs_gl_get_tex_env_iv(GLenum target, GLenum pname, GLint *params)
00301 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00302     glGetTexEnviv(target, pname, params);
00303     rs_check_error();
00304 }
00305 void rs_gl_get_tex_image(GLenum target, GLint level, GLenum format, GLenum type, GLvoid *pixels)
00306 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00307     glGetTexImage(target, level, format, type, pixels);
00308     rs_check_error();
00309 }
00310 void rs_gl_get_tex_level_parameter_fv(GLenum target, GLint level, GLenum pname, GLfloat *params)
00311 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00312     glGetTexLevelParameterfv(target, level, pname, params);
00313     rs_check_error();
00314 }
00315 void rs_gl_get_tex_level_parameter_iv(GLenum target, GLint level, GLenum pname, GLint *params)
00316 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00317     glGetTexLevelParameteriv(target, level, pname, params);
00318     rs_check_error();
00319 }
00320 void rs_gl_get_tex_parameter_fv(GLenum target, GLenum pname, GLfloat *params)
00321 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00322     glGetTexParameterfv(target, pname, params);
00323     rs_check_error();
00324 }
00325 void rs_gl_get_tex_parameter_iv(GLenum target, GLenum pname, GLint *params)
00326 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00327     glGetTexParameteriv(target, pname, params);
00328     rs_check_error();
00329 }
00330 void rs_gl_hint(GLenum target, GLenum mode)
00331 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00332     glHint(target, mode);
00333     rs_check_error();
00334 }
00335 GLboolean rs_gl_is_enabled(GLenum cap)
00336 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00337     GLboolean res = glIsEnabled(cap);
00338     rs_check_error();
00339     return res;
00340 }
00341 GLboolean rs_gl_is_texture(GLuint texture)
00342 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00343     GLboolean res = glIsTexture(texture);
00344     rs_check_error();
00345     return res;
00346 }
00347 void rs_gl_line_width(GLfloat width)
00348 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00349     glLineWidth(width);
00350     rs_check_error();
00351 }
00352 void rs_gl_logic_op(GLenum opcode)
00353 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00354     glLogicOp(opcode);
00355     rs_check_error();
00356 }
00357 void rs_gl_pixel_store_f(GLenum pname, GLfloat param)
00358 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00359     glPixelStoref(pname, param);
00360     rs_check_error();
00361 }
00362 void rs_gl_pixel_store_i(GLenum pname, GLint param)
00363 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00364     glPixelStorei(pname, param);
00365     rs_check_error();
00366 }
00367 void rs_gl_pixel_transfer_f(GLenum pname, GLfloat param)
00368 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00369     glPixelTransferf(pname, param);
00370     rs_check_error();
00371 }
00372 void rs_gl_pixel_transfer_i(GLenum pname, GLint param)
00373 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00374     glPixelTransferi(pname, param);
00375     rs_check_error();
00376 }
00377 void rs_gl_point_size(GLfloat size)
00378 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00379     glPointSize(size);
00380     rs_check_error();
00381 }
00382 void rs_gl_polygon_mode(GLenum face, GLenum mode)
00383 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00384     glPolygonMode(face, mode);
00385     rs_check_error();
00386 }
00387 void rs_gl_polygon_offset(GLfloat factor, GLfloat units)
00388 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00389     glPolygonOffset(factor, units);
00390     rs_check_error();
00391 }
00392 void rs_gl_read_buffer(GLenum mode)
00393 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00394     glReadBuffer(mode);
00395     rs_check_error();
00396 }
00397 void rs_gl_read_pixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLvoid *pixels)
00398 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00399     glReadPixels(x, y, width, height, format, type, pixels);
00400     rs_check_error();
00401 }
00402 void rs_gl_scissor(GLint x, GLint y, GLsizei width, GLsizei height)
00403 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00404     glScissor(x, y, width, height);
00405     rs_check_error();
00406 }
00407 void rs_gl_stencil_func(GLenum func, GLint ref, GLuint mask)
00408 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00409     glStencilFunc(func, ref, mask);
00410     rs_check_error();
00411 }
00412 void rs_gl_stencil_mask(GLuint mask)
00413 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00414     glStencilMask(mask);
00415     rs_check_error();
00416 }
00417 void rs_gl_stencil_op(GLenum fail, GLenum zfail, GLenum zpass)
00418 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00419     glStencilOp(fail, zfail, zpass);
00420     rs_check_error();
00421 }
00422 void rs_gl_tex_env_f(GLenum target, GLenum pname, GLfloat param)
00423 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00424     glTexEnvf(target, pname, param);
00425     rs_check_error();
00426 }
00427 void rs_gl_tex_env_fv(GLenum target, GLenum pname, const GLfloat *params)
00428 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00429     glTexEnvfv(target, pname, params);
00430     rs_check_error();
00431 }
00432 void rs_gl_tex_env_i(GLenum target, GLenum pname, GLint param)
00433 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00434     glTexEnvi(target, pname, param);
00435     rs_check_error();
00436 }
00437 void rs_gl_tex_env_iv(GLenum target, GLenum pname, const GLint *params)
00438 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00439     glTexEnviv(target, pname, params);
00440     rs_check_error();
00441 }
00442 void rs_gl_tex_image_1d(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
00443 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00444     glTexImage1D(target, level, internalformat, width, border, format, type, pixels);
00445     rs_check_error();
00446 }
00447 void rs_gl_tex_image_2d(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const GLvoid *pixels)
00448 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00449     glTexImage2D(target, level, internalformat, width, height, border, format, type, pixels);
00450     rs_check_error();
00451 }
00452 void rs_gl_tex_parameter_f(GLenum target, GLenum pname, GLfloat param)
00453 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00454     glTexParameterf(target, pname, param);
00455     rs_check_error();
00456 }
00457 void rs_gl_tex_parameter_fv(GLenum target, GLenum pname, const GLfloat *params)
00458 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00459     glTexParameterfv(target, pname, params);
00460     rs_check_error();
00461 }
00462 void rs_gl_tex_parameter_i(GLenum target, GLenum pname, GLint param)
00463 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00464     glTexParameteri(target, pname, param);
00465     rs_check_error();
00466 }
00467 void rs_gl_tex_parameter_iv(GLenum target, GLenum pname, const GLint *params)
00468 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00469     glTexParameteriv(target, pname, params);
00470     rs_check_error();
00471 }
00472 void rs_gl_tex_sub_image_1d(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels)
00473 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00474     glTexSubImage1D(target, level, xoffset, width, format, type, pixels);
00475     rs_check_error();
00476 }
00477 void rs_gl_tex_sub_image_2d(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels)
00478 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00479     glTexSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels);
00480     rs_check_error();
00481 }
00482 void rs_gl_viewport(GLint x, GLint y, GLsizei width, GLsizei height)
00483 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00484     glViewport(x, y, width, height);
00485     rs_check_error();
00486 }
00487 
00488 /*  GL_VERSION_1_2  */ 
00489 void rs_gl_blend_color(GLclampf a, GLclampf b, GLclampf c, GLclampf d)
00490 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00491     glBlendColor(a, b, c, d);
00492     rs_check_error();
00493 }
00494 
00495 void rs_gl_blend_equation(GLenum a)
00496 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00497     glBlendEquation(a);
00498     rs_check_error();
00499 }
00500 
00501 void rs_gl_draw_range_elements(GLenum a, GLuint b, GLuint c, GLsizei d, GLenum e, const GLvoid *f)
00502 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00503     glDrawRangeElements(a, b, c, d, e, f);
00504     rs_check_error();
00505 }
00506 
00507 void rs_gl_tex_image_3d(GLenum a, GLint b, GLint c, GLsizei d, GLsizei e, GLsizei f, GLint g, GLenum h, GLenum i, const GLvoid *j)
00508 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00509     glTexImage3D(a, b, c, d, e, f, g, h, i, j);
00510     rs_check_error();
00511 }
00512 
00513 void rs_gl_tex_sub_image_3d(GLenum a, GLint b, GLint c, GLint d, GLint e, GLsizei f, GLsizei g, GLsizei h, GLenum i, GLenum j, const GLvoid *k)
00514 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00515     glTexSubImage3D(a, b, c, d, e, f, g, h, i, j, k);
00516     rs_check_error();
00517 }
00518 
00519 void rs_gl_copy_tex_sub_image_3d(GLenum a, GLint b, GLint c, GLint d, GLint e, GLint f, GLint g, GLsizei h, GLsizei i)
00520 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00521     glCopyTexSubImage3D(a, b, c, d, e, f, g, h, i);
00522     rs_check_error();
00523 }
00524 
00525 
00526 /*  GL_VERSION_1_3  */ 
00527 void rs_gl_active_texture(GLenum a)
00528 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00529     glActiveTexture(a);
00530     rs_check_error();
00531 }
00532 
00533 void rs_gl_sample_coverage(GLclampf a, GLboolean b)
00534 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00535     glSampleCoverage(a, b);
00536     rs_check_error();
00537 }
00538 
00539 void rs_gl_compressed_tex_image_3d(GLenum a, GLint b, GLenum c, GLsizei d, GLsizei e, GLsizei f, GLint g, GLsizei h, const GLvoid *i)
00540 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00541     glCompressedTexImage3D(a, b, c, d, e, f, g, h, i);
00542     rs_check_error();
00543 }
00544 
00545 void rs_gl_compressed_tex_image_2d(GLenum a, GLint b, GLenum c, GLsizei d, GLsizei e, GLint f, GLsizei g, const GLvoid *h)
00546 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00547     glCompressedTexImage2D(a, b, c, d, e, f, g, h);
00548     rs_check_error();
00549 }
00550 
00551 void rs_gl_compressed_tex_image_1d(GLenum a, GLint b, GLenum c, GLsizei d, GLint e, GLsizei f, const GLvoid *g)
00552 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00553     glCompressedTexImage1D(a, b, c, d, e, f, g);
00554     rs_check_error();
00555 }
00556 
00557 void rs_gl_compressed_tex_sub_image_3d(GLenum a, GLint b, GLint c, GLint d, GLint e, GLsizei f, GLsizei g, GLsizei h, GLenum i, GLsizei j, const GLvoid *k)
00558 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00559     glCompressedTexSubImage3D(a, b, c, d, e, f, g, h, i, j, k);
00560     rs_check_error();
00561 }
00562 
00563 void rs_gl_compressed_tex_sub_image_2d(GLenum a, GLint b, GLint c, GLint d, GLsizei e, GLsizei f, GLenum g, GLsizei h, const GLvoid *i)
00564 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00565     glCompressedTexSubImage2D(a, b, c, d, e, f, g, h, i);
00566     rs_check_error();
00567 }
00568 
00569 void rs_gl_compressed_tex_sub_image_1d(GLenum a, GLint b, GLint c, GLsizei d, GLenum e, GLsizei f, const GLvoid *g)
00570 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00571     glCompressedTexSubImage1D(a, b, c, d, e, f, g);
00572     rs_check_error();
00573 }
00574 
00575 void rs_gl_get_compressed_tex_image(GLenum a, GLint b, GLvoid *c)
00576 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00577     glGetCompressedTexImage(a, b, c);
00578     rs_check_error();
00579 }
00580 
00581 
00582 /*  GL_VERSION_1_4  */ 
00583 void rs_gl_blend_func_separate(GLenum a, GLenum b, GLenum c, GLenum d)
00584 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00585     glBlendFuncSeparate(a, b, c, d);
00586     rs_check_error();
00587 }
00588 
00589 void rs_gl_multi_draw_arrays(GLenum a, GLint *b, GLsizei *c, GLsizei d)
00590 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00591     glMultiDrawArrays(a, b, c, d);
00592     rs_check_error();
00593 }
00594 
00595 void rs_gl_multi_draw_elements(GLenum a, const GLsizei *b, GLenum c, const GLvoid* *d, GLsizei e)
00596 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00597     glMultiDrawElements(a, b, c, d, e);
00598     rs_check_error();
00599 }
00600 
00601 void rs_gl_point_parameter_f(GLenum a, GLfloat b)
00602 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00603     glPointParameterf(a, b);
00604     rs_check_error();
00605 }
00606 
00607 void rs_gl_point_parameter_fv(GLenum a, const GLfloat *b)
00608 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00609     glPointParameterfv(a, b);
00610     rs_check_error();
00611 }
00612 
00613 void rs_gl_point_parameter_i(GLenum a, GLint b)
00614 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00615     glPointParameteri(a, b);
00616     rs_check_error();
00617 }
00618 
00619 void rs_gl_point_parameter_iv(GLenum a, const GLint *b)
00620 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00621     glPointParameteriv(a, b);
00622     rs_check_error();
00623 }
00624 
00625 
00626 /*  GL_VERSION_1_5  */ 
00627 void rs_gl_gen_queries(GLsizei a, GLuint *b)
00628 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00629     glGenQueries(a, b);
00630     rs_check_error();
00631 }
00632 
00633 void rs_gl_delete_queries(GLsizei a, const GLuint *b)
00634 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00635     glDeleteQueries(a, b);
00636     rs_check_error();
00637 }
00638 
00639 GLboolean rs_gl_is_query(GLuint a)
00640 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00641     GLboolean res = glIsQuery(a);
00642     rs_check_error();
00643     return res;
00644 }
00645 
00646 void rs_gl_begin_query(GLenum a, GLuint b)
00647 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00648     glBeginQuery(a, b);
00649     rs_check_error();
00650 }
00651 
00652 void rs_gl_end_query(GLenum a)
00653 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00654     glEndQuery(a);
00655     rs_check_error();
00656 }
00657 
00658 void rs_gl_get_query_iv(GLenum a, GLenum b, GLint *c)
00659 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00660     glGetQueryiv(a, b, c);
00661     rs_check_error();
00662 }
00663 
00664 void rs_gl_get_query_object_iv(GLuint a, GLenum b, GLint *c)
00665 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00666     glGetQueryObjectiv(a, b, c);
00667     rs_check_error();
00668 }
00669 
00670 void rs_gl_get_query_object_uiv(GLuint a, GLenum b, GLuint *c)
00671 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00672     glGetQueryObjectuiv(a, b, c);
00673     rs_check_error();
00674 }
00675 
00676 void rs_gl_bind_buffer(GLenum a, GLuint b)
00677 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00678     glBindBuffer(a, b);
00679     rs_check_error();
00680 }
00681 
00682 void rs_gl_delete_buffers(GLsizei a, const GLuint *b)
00683 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00684     glDeleteBuffers(a, b);
00685     rs_check_error();
00686 }
00687 
00688 void rs_gl_gen_buffers(GLsizei a, GLuint *b)
00689 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00690     glGenBuffers(a, b);
00691     rs_check_error();
00692 }
00693 
00694 GLboolean rs_gl_is_buffer(GLuint a)
00695 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00696     GLboolean res = glIsBuffer(a);
00697     rs_check_error();
00698     return res;
00699 }
00700 
00701 void rs_gl_buffer_data(GLenum a, GLsizeiptr b, const GLvoid *c, GLenum d)
00702 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00703     glBufferData(a, b, c, d);
00704     rs_check_error();
00705 }
00706 
00707 void rs_gl_buffer_sub_data(GLenum a, GLintptr b, GLsizeiptr c, const GLvoid *d)
00708 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00709     glBufferSubData(a, b, c, d);
00710     rs_check_error();
00711 }
00712 
00713 void rs_gl_get_buffer_sub_data(GLenum a, GLintptr b, GLsizeiptr c, GLvoid *d)
00714 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00715     glGetBufferSubData(a, b, c, d);
00716     rs_check_error();
00717 }
00718 
00719 GLvoid* rs_gl_map_buffer(GLenum a, GLenum b)
00720 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00721     GLvoid* res = glMapBuffer(a, b);
00722     rs_check_error();
00723     return res;
00724 }
00725 
00726 GLboolean rs_gl_unmap_buffer(GLenum a)
00727 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00728     GLboolean res = glUnmapBuffer(a);
00729     rs_check_error();
00730     return res;
00731 }
00732 
00733 void rs_gl_get_buffer_parameter_iv(GLenum a, GLenum b, GLint *c)
00734 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00735     glGetBufferParameteriv(a, b, c);
00736     rs_check_error();
00737 }
00738 
00739 void rs_gl_get_buffer_pointer_v(GLenum a, GLenum b, GLvoid* *c)
00740 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00741     glGetBufferPointerv(a, b, c);
00742     rs_check_error();
00743 }
00744 
00745 
00746 /*  GL_VERSION_2_0  */ 
00747 void rs_gl_blend_equation_separate(GLenum a, GLenum b)
00748 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00749     glBlendEquationSeparate(a, b);
00750     rs_check_error();
00751 }
00752 
00753 void rs_gl_draw_buffers(GLsizei a, const GLenum * b)
00754 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00755     glDrawBuffers(a, b);
00756     rs_check_error();
00757 }
00758 
00759 void rs_gl_stencil_op_separate(GLenum a, GLenum b, GLenum c, GLenum d)
00760 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00761     glStencilOpSeparate(a, b, c, d);
00762     rs_check_error();
00763 }
00764 
00765 void rs_gl_stencil_func_Separate(GLenum a, GLenum b, GLint c, GLuint d)
00766 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00767     glStencilFuncSeparate(a, b, c, d);
00768     rs_check_error();
00769 }
00770 
00771 void rs_gl_stencil_mask_separate(GLenum a, GLuint b)
00772 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00773     glStencilMaskSeparate(a, b);
00774     rs_check_error();
00775 }
00776 
00777 void rs_gl_attach_shader(GLuint a, GLuint b)
00778 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00779     glAttachShader(a, b);
00780     rs_check_error();
00781 }
00782 
00783 void rs_gl_bind_attrib_location(GLuint a, GLuint b, const GLchar *c)
00784 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00785     glBindAttribLocation(a, b, c);
00786     rs_check_error();
00787 }
00788 
00789 void rs_gl_compile_shader(GLuint a)
00790 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00791     glCompileShader(a);
00792     rs_check_error();
00793 }
00794 
00795 GLuint rs_gl_create_program(void)
00796 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00797     GLuint res = glCreateProgram();
00798     rs_check_error();
00799     return res;
00800 }
00801 
00802 GLuint rs_gl_create_shader(GLenum a)
00803 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00804     GLuint res = glCreateShader(a);
00805     rs_check_error();
00806     return res;
00807 }
00808 
00809 void rs_gl_delete_program(GLuint a)
00810 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00811     glDeleteProgram(a);
00812     rs_check_error();
00813 }
00814 
00815 void rs_gl_delete_shader(GLuint a)
00816 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00817     glDeleteShader(a);
00818     rs_check_error();
00819 }
00820 
00821 void rs_gl_detach_shader(GLuint a, GLuint b)
00822 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00823     glDetachShader(a, b);
00824     rs_check_error();
00825 }
00826 
00827 void rs_gl_disable_vertex_attrib_array(GLuint a)
00828 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00829     glDisableVertexAttribArray(a);
00830     rs_check_error();
00831 }
00832 
00833 void rs_gl_enable_vertex_attrib_array(GLuint a)
00834 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00835     glEnableVertexAttribArray(a);
00836     rs_check_error();
00837 }
00838 
00839 void rs_gl_get_active_attrib(GLuint a, GLuint b, GLsizei c, GLsizei *d, GLint *e, GLenum *f, GLchar *g)
00840 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00841     glGetActiveAttrib(a, b, c, d, e, f, g);
00842     rs_check_error();
00843 }
00844 
00845 void rs_gl_get_active_uniform(GLuint a, GLuint b, GLsizei c, GLsizei *d, GLint *e, GLenum *f, GLchar *g)
00846 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00847     glGetActiveUniform(a, b, c, d, e, f, g);
00848     rs_check_error();
00849 }
00850 
00851 void rs_gl_get_attached_shaders(GLuint a, GLsizei b, GLsizei *c, GLuint *d)
00852 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00853     glGetAttachedShaders(a, b, c, d);
00854     rs_check_error();
00855 }
00856 
00857 GLint rs_gl_get_attrib_location(GLuint a, const GLchar *b)
00858 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00859     GLint res = glGetAttribLocation(a, b);
00860     rs_check_error();
00861     return res;
00862 }
00863 
00864 void rs_gl_get_program_iv(GLuint a, GLenum b, GLint *c)
00865 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00866     glGetProgramiv(a, b, c);
00867     rs_check_error();
00868 }
00869 
00870 void rs_gl_get_program_info_log(GLuint a, GLsizei b, GLsizei *c, GLchar *d)
00871 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00872     glGetProgramInfoLog(a, b, c, d);
00873     rs_check_error();
00874 }
00875 
00876 void rs_gl_get_shader_iv(GLuint a, GLenum b, GLint *c)
00877 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00878     glGetShaderiv(a, b, c);
00879     rs_check_error();
00880 }
00881 
00882 void rs_gl_get_shader_info_log(GLuint a, GLsizei b, GLsizei *c, GLchar *d)
00883 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00884     glGetShaderInfoLog(a, b, c, d);
00885     rs_check_error();
00886 }
00887 
00888 void rs_gl_get_shader_source(GLuint a, GLsizei b, GLsizei *c, GLchar *d)
00889 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00890     glGetShaderSource(a, b, c, d);
00891     rs_check_error();
00892 }
00893 
00894 GLint rs_gl_get_uniform_location(GLuint a, const GLchar *b)
00895 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00896     GLint res = glGetUniformLocation(a, b);
00897     rs_check_error();
00898     return res;
00899 }
00900 
00901 void rs_gl_get_uniform_fv(GLuint a, GLint b, GLfloat *c)
00902 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00903     glGetUniformfv(a, b, c);
00904     rs_check_error();
00905 }
00906 
00907 
00908 void rs_gl_get_uniform_iv(GLuint a, GLint b, GLint *c)
00909 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00910     glGetUniformiv(a, b, c);
00911     rs_check_error();
00912 }
00913 
00914 void rs_gl_get_vertex_attrib_dv(GLuint a, GLenum b, GLdouble *c)
00915 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00916     glGetVertexAttribdv(a, b, c);
00917     rs_check_error();
00918 }
00919 
00920 void rs_gl_get_vertex_attrib_fv(GLuint a, GLenum b, GLfloat *c)
00921 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00922     glGetVertexAttribfv(a, b, c);
00923     rs_check_error();
00924 }
00925 
00926 void rs_gl_get_vertex_attrib_iv(GLuint a, GLenum b, GLint *c)
00927 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00928     glGetVertexAttribiv(a, b, c);
00929     rs_check_error();
00930 }
00931 
00932 void rs_gl_get_vertex_attrib_pointer_v(GLuint a, GLenum b, GLvoid* *c)
00933 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00934     glGetVertexAttribPointerv(a, b, c);
00935     rs_check_error();
00936 }
00937 
00938 GLboolean rs_gl_is_program(GLuint a)
00939 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00940     GLboolean res = glIsProgram(a);
00941     rs_check_error();
00942     return res;
00943 }
00944 
00945 GLboolean rs_gl_is_shader(GLuint a)
00946 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00947     GLboolean res = glIsShader(a);
00948     rs_check_error();
00949     return res;
00950 }
00951 
00952 void rs_gl_link_program(GLuint a)
00953 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00954     glLinkProgram(a);
00955     rs_check_error();
00956 }
00957 
00958 void rs_gl_shader_source(GLuint a, GLsizei b, const GLchar* *c, const GLint *d)
00959 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00960     glShaderSource(a, b, c, d);
00961     rs_check_error();
00962 }
00963 
00964 void rs_gl_use_program(GLuint a)
00965 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00966     glUseProgram(a);
00967     rs_check_error();
00968 }
00969 
00970 void rs_gl_uniform_1f(GLint a, GLfloat b)
00971 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00972     glUniform1f(a, b);
00973     rs_check_error();
00974 }
00975 void rs_gl_uniform_2f(GLint a, GLfloat b, GLfloat c)
00976 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00977     glUniform2f(a, b, c);
00978     rs_check_error();
00979 }
00980 
00981 void rs_gl_uniform_3f(GLint a, GLfloat b, GLfloat c, GLfloat d)
00982 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00983     glUniform3f(a, b, c, d);
00984     rs_check_error();
00985 }
00986 
00987 void rs_gl_uniform_4f(GLint a, GLfloat b, GLfloat c, GLfloat d, GLfloat e)
00988 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00989     glUniform4f(a, b, c, d, e);
00990     rs_check_error();
00991 }
00992 
00993 void rs_gl_uniform_1i(GLint a, GLint b)
00994 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
00995     glUniform1i(a, b);
00996     rs_check_error();
00997 }
00998 
00999 void rs_gl_uniform_2i(GLint a, GLint b, GLint c)
01000 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01001     glUniform2i(a, b, c);
01002     rs_check_error();
01003 }
01004 
01005 void rs_gl_uniform_3i(GLint a, GLint b, GLint c, GLint d)
01006 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01007     glUniform3i(a, b, c, d);
01008     rs_check_error();
01009 }
01010 
01011 void rs_gl_uniform_4i(GLint a, GLint b, GLint c, GLint d, GLint e)
01012 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01013     glUniform4i(a, b, c, d, e);
01014     rs_check_error();
01015 }
01016 
01017 void rs_gl_uniform_1fv(GLint a, GLsizei b, const GLfloat *c)
01018 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01019     glUniform1fv(a, b, c);
01020     rs_check_error();
01021 }
01022 
01023 void rs_gl_uniform_2fv(GLint a, GLsizei b, const GLfloat *c)
01024 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01025     glUniform2fv(a, b, c);
01026     rs_check_error();
01027 }
01028 
01029 void rs_gl_uniform_3fv(GLint a, GLsizei b, const GLfloat *c)
01030 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01031     glUniform3fv(a, b, c);
01032     rs_check_error();
01033 }
01034 
01035 void rs_gl_uniform_4fv(GLint a, GLsizei b, const GLfloat *c)
01036 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01037     glUniform4fv(a, b, c);
01038     rs_check_error();
01039 }
01040 
01041 void rs_gl_uniform_1iv(GLint a, GLsizei b, const GLint *c)
01042 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01043     glUniform1iv(a, b, c);
01044     rs_check_error();
01045 }
01046 
01047 void rs_gl_uniform_2iv(GLint a, GLsizei b, const GLint *c)
01048 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01049     glUniform2iv(a, b, c);
01050     rs_check_error();
01051 }
01052 
01053 void rs_gl_uniform_3iv(GLint a, GLsizei b, const GLint *c)
01054 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01055     glUniform3iv(a, b, c);
01056     rs_check_error();
01057 }
01058 
01059 void rs_gl_uniform_4iv(GLint a, GLsizei b, const GLint *c)
01060 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01061     glUniform4iv(a, b, c);
01062     rs_check_error();
01063 }
01064 
01065 void rs_gl_uniform_matrix_2fv(GLint a, GLsizei b, GLboolean c, const GLfloat *d)
01066 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01067     glUniformMatrix2fv(a, b, c, d);
01068     rs_check_error();
01069 }
01070 
01071 void rs_gl_uniform_matrix_3fv(GLint a, GLsizei b, GLboolean c, const GLfloat *d)
01072 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01073     glUniformMatrix3fv(a, b, c, d);
01074     rs_check_error();
01075 }
01076 
01077 void rs_gl_uniform_matrix_4fv(GLint a, GLsizei b, GLboolean c, const GLfloat *d)
01078 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01079     glUniformMatrix4fv(a, b, c, d);
01080     rs_check_error();
01081 }
01082 
01083 void rs_gl_validate_program(GLuint a)
01084 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01085     glValidateProgram(a);
01086     rs_check_error();
01087 }
01088 
01089 void rs_gl_vertex_attrib_1d(GLuint a, GLdouble b)
01090 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01091     glVertexAttrib1d(a, b);
01092     rs_check_error();
01093 }
01094 
01095 void rs_gl_vertex_attrib_1dv(GLuint a, const GLdouble *b)
01096 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01097     glVertexAttrib1dv(a, b);
01098     rs_check_error();
01099 }
01100 
01101 void rs_gl_vertex_attrib_1f(GLuint a, GLfloat b)
01102 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01103     glVertexAttrib1f(a, b);
01104     rs_check_error();
01105 }
01106 
01107 void rs_gl_vertex_attrib_1fv(GLuint a, const GLfloat *b)
01108 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01109     glVertexAttrib1fv(a, b);
01110     rs_check_error();
01111 }
01112 
01113 void rs_gl_vertex_attrib_1s(GLuint a, GLshort b)
01114 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01115     glVertexAttrib1s(a, b);
01116     rs_check_error();
01117 }
01118 
01119 void rs_gl_vertex_attrib_1sv(GLuint a, const GLshort *b)
01120 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01121     glVertexAttrib1sv(a, b);
01122     rs_check_error();
01123 }
01124 
01125 void rs_gl_vertex_attrib_2d(GLuint a, GLdouble b, GLdouble c)
01126 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01127     glVertexAttrib2d(a, b, c);
01128     rs_check_error();
01129 }
01130 
01131 void rs_gl_vertex_attrib_2dv(GLuint a, const GLdouble *b)
01132 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01133     glVertexAttrib2dv(a, b);
01134     rs_check_error();
01135 }
01136 
01137 void rs_gl_vertex_attrib_2f(GLuint a, GLfloat b, GLfloat c)
01138 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01139     glVertexAttrib2f(a, b, c);
01140     rs_check_error();
01141 }
01142 
01143 void rs_gl_vertex_attrib_2fv(GLuint a, const GLfloat *b)
01144 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01145     glVertexAttrib2fv(a, b);
01146     rs_check_error();
01147 }
01148 
01149 void rs_gl_vertex_attrib_2s(GLuint a, GLshort b, GLshort c)
01150 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01151     glVertexAttrib2s(a, b, c);
01152     rs_check_error();
01153 }
01154 
01155 void rs_gl_vertex_attrib_2sv(GLuint a, const GLshort *b)
01156 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01157     glVertexAttrib2sv(a, b);
01158     rs_check_error();
01159 }
01160 
01161 void rs_gl_vertex_attrib_3d(GLuint a, GLdouble b, GLdouble c, GLdouble d)
01162 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01163     glVertexAttrib3d(a, b, c, d);
01164     rs_check_error();
01165 }
01166 
01167 void rs_gl_vertex_attrib_3dv(GLuint a, const GLdouble *b)
01168 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01169     glVertexAttrib3dv(a, b);
01170     rs_check_error();
01171 }
01172 
01173 void rs_gl_vertex_attrib_3f(GLuint a, GLfloat b, GLfloat c, GLfloat d)
01174 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01175     glVertexAttrib3f(a, b, c, d);
01176     rs_check_error();
01177 }
01178 
01179 void rs_gl_vertex_attrib_3fv(GLuint a, const GLfloat *b)
01180 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01181     glVertexAttrib3fv(a, b);
01182     rs_check_error();
01183 }
01184 
01185 void rs_gl_vertex_attrib_3s(GLuint a, GLshort b, GLshort c, GLshort d)
01186 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01187     glVertexAttrib3s(a, b, c, d);
01188     rs_check_error();
01189 }
01190 
01191 void rs_gl_vertex_attrib_3sv(GLuint a, const GLshort *b)
01192 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01193     glVertexAttrib3sv(a, b);
01194     rs_check_error();
01195 }
01196 
01197 void rs_gl_vertex_attrib_4Nbv(GLuint a, const GLbyte *b)
01198 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01199     glVertexAttrib4Nbv(a, b);
01200     rs_check_error();
01201 }
01202 
01203 void rs_gl_vertex_attrib_4Niv(GLuint a, const GLint *b)
01204 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01205     glVertexAttrib4Niv(a, b);
01206     rs_check_error();
01207 }
01208 
01209 void rs_gl_vertex_attrib_4Nsv(GLuint a, const GLshort *b)
01210 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01211     glVertexAttrib4Nsv(a, b);
01212     rs_check_error();
01213 }
01214 
01215 void rs_gl_vertex_attrib_4Nub(GLuint a, GLubyte b, GLubyte c, GLubyte d, GLubyte e)
01216 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01217     glVertexAttrib4Nub(a, b, c, d, e);
01218     rs_check_error();
01219 }
01220 
01221 void rs_gl_vertex_attrib_4Nubv(GLuint a, const GLubyte *b)
01222 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01223     glVertexAttrib4Nubv(a, b);
01224     rs_check_error();
01225 }
01226 
01227 void rs_gl_vertex_attrib_4Nuiv(GLuint a, const GLuint *b)
01228 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01229     glVertexAttrib4Nuiv(a, b);
01230     rs_check_error();
01231 }
01232 
01233 void rs_gl_vertex_attrib_4Nusv(GLuint a, const GLushort *b)
01234 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01235     glVertexAttrib4Nusv(a, b);
01236     rs_check_error();
01237 }
01238 
01239 void rs_gl_vertex_attrib_4bv(GLuint a, const GLbyte *b)
01240 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01241     glVertexAttrib4bv(a, b);
01242     rs_check_error();
01243 }
01244 
01245 void rs_gl_vertex_attrib_4d(GLuint a, GLdouble b, GLdouble c, GLdouble d, GLdouble e)
01246 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01247     glVertexAttrib4d(a, b, c, d, e);
01248     rs_check_error();
01249 }
01250 
01251 void rs_gl_vertex_attrib_4dv(GLuint a, const GLdouble *b)
01252 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01253     glVertexAttrib4dv(a, b);
01254     rs_check_error();
01255 }
01256 
01257 void rs_gl_vertex_attrib_4f(GLuint a, GLfloat b, GLfloat c, GLfloat d, GLfloat e)
01258 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01259     glVertexAttrib4f(a, b, c, d, e);
01260     rs_check_error();
01261 }
01262 
01263 void rs_gl_vertex_attrib_4fv(GLuint a, const GLfloat *b)
01264 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01265     glVertexAttrib4fv(a, b);
01266     rs_check_error();
01267 }
01268 
01269 void rs_gl_vertex_attrib_4iv(GLuint a, const GLint *b)
01270 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01271     glVertexAttrib4iv(a, b);
01272     rs_check_error();
01273 }
01274 
01275 void rs_gl_vertex_attrib_4s(GLuint a, GLshort b, GLshort c, GLshort d, GLshort e)
01276 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01277     glVertexAttrib4s(a, b, c, d, e);
01278     rs_check_error();
01279 }
01280 
01281 void rs_gl_vertex_attrib_4sv(GLuint a, const GLshort *b)
01282 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01283     glVertexAttrib4sv(a, b);
01284     rs_check_error();
01285 }
01286 
01287 void rs_gl_vertex_attrib_4ubv(GLuint a, const GLubyte *b)
01288 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01289     glVertexAttrib4ubv(a, b);
01290     rs_check_error();
01291 }
01292 
01293 void rs_gl_vertex_attrib_4uiv(GLuint a, const GLuint *b)
01294 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01295     glVertexAttrib4uiv(a, b);
01296     rs_check_error();
01297 }
01298 
01299 void rs_gl_vertex_attrib_4usv(GLuint a, const GLushort *b)
01300 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01301     glVertexAttrib4usv(a, b);
01302     rs_check_error();
01303 }
01304 
01305 void rs_gl_vertex_attrib_pointer(GLuint a, GLint b, GLenum c, GLboolean d, GLsizei e, const GLvoid *f)
01306 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01307     glVertexAttribPointer(a, b, c, d, e, f);
01308     rs_check_error();
01309 }
01310 
01311 /*  GL_VERSION_2_1  */ 
01312 void rs_gl_uniform_matrix_2x3fv(GLint a, GLsizei b, GLboolean c, const GLfloat *d)
01313 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01314     glUniformMatrix2x3fv(a, b, c, d);
01315     rs_check_error();
01316 }
01317 
01318 void rs_gl_uniform_matrix_3x2fv(GLint a, GLsizei b, GLboolean c, const GLfloat *d)
01319 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01320     glUniformMatrix3x2fv(a, b, c, d);
01321     rs_check_error();
01322 }
01323 
01324 void rs_gl_niform_matrix_2x4fv(GLint a, GLsizei b, GLboolean c, const GLfloat *d)
01325 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01326     glUniformMatrix2x4fv(a, b, c, d);
01327     rs_check_error();
01328 }
01329 
01330 void rs_gl_uniform_matrix_4x2fv(GLint a, GLsizei b, GLboolean c, const GLfloat *d)
01331 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01332     glUniformMatrix4x2fv(a, b, c, d);
01333     rs_check_error();
01334 }
01335 
01336 void rs_gl_uniform_matrix_3x4fv(GLint a, GLsizei b, GLboolean c, const GLfloat *d)
01337 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01338     glUniformMatrix3x4fv(a, b, c, d);
01339     rs_check_error();
01340 }
01341 
01342 void rs_gl_uniform_matrix_4x3fv(GLint a, GLsizei b, GLboolean c, const GLfloat *d)
01343 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01344     glUniformMatrix4x3fv(a, b, c, d);
01345     rs_check_error();
01346 }
01347 
01348 
01349 /*  GL_VERSION_3_0  */ 
01350 void rs_gl_color_mask_i(GLuint a, GLboolean b, GLboolean c, GLboolean d, GLboolean e)
01351 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01352     glColorMaski(a, b, c, d, e);
01353     rs_check_error();
01354 }
01355 
01356 void rs_gl_get_boolean_i_v(GLenum a, GLuint b, GLboolean *c)
01357 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01358     glGetBooleani_v(a, b, c);
01359     rs_check_error();
01360 }
01361 
01362 void rs_gl_get_integer_i_v (GLenum a, GLuint b, GLint *c)
01363 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01364     glGetIntegeri_v(a, b, c);
01365     rs_check_error();
01366 }
01367 
01368 void rs_gl_enable_i(GLenum a, GLuint b)
01369 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01370     glEnablei(a, b);
01371     rs_check_error();
01372 }
01373 
01374 void rs_gl_disable_i(GLenum a, GLuint b)
01375 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01376     glDisablei(a, b);
01377     rs_check_error();
01378 }
01379 
01380 GLboolean rs_gl_is_enabled_i(GLenum a, GLuint b)
01381 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01382     GLboolean res = glIsEnabledi(a, b);
01383     rs_check_error();
01384     return res;
01385 }
01386 
01387 void rs_gl_begin_transform_feedback(GLenum a)
01388 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01389     glBeginTransformFeedback(a);
01390     rs_check_error();
01391 }
01392 
01393 void rs_gl_end_transform_feedback(void)
01394 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01395     glEndTransformFeedback();
01396     rs_check_error();
01397 }
01398 
01399 void rs_gl_bind_buffer_range(GLenum a, GLuint b, GLuint c, GLintptr d, GLsizeiptr e)
01400 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01401     glBindBufferRange(a, b, c, d, e);
01402     rs_check_error();
01403 }
01404 
01405 void rs_gl_bind_buffer_base(GLenum a, GLuint b, GLuint c)
01406 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01407     glBindBufferBase(a, b, c);
01408     rs_check_error();
01409 }
01410 
01411 void rs_gl_transform_feedback_varyings(GLuint a, GLsizei b, const GLchar* *c, GLenum d)
01412 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01413     glTransformFeedbackVaryings(a, b, c, d);
01414     rs_check_error();
01415 }
01416 
01417 void rs_gl_get_transform_feedback_varying(GLuint a, GLuint b, GLsizei c, GLsizei *d, GLsizei *e, GLenum *f, GLchar *g)
01418 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01419     glGetTransformFeedbackVarying(a, b, c, d, e, f, g);
01420     rs_check_error();
01421 }
01422 
01423 void rs_gl_clamp_color(GLenum a, GLenum b)
01424 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01425     glClampColor(a, b);
01426     rs_check_error();
01427 }
01428 
01429 void rs_gl_begin_conditional_render(GLuint a, GLenum b)
01430 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01431     glBeginConditionalRender(a, b);
01432     rs_check_error();
01433 }
01434 
01435 void rs_gl_end_conditional_render(void)
01436 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01437     glEndConditionalRender();
01438     rs_check_error();
01439 }
01440 
01441 void rs_gl_vertex_attrib_i_pointer(GLuint a, GLint b, GLenum c, GLsizei d, const GLvoid *e)
01442 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01443     glVertexAttribIPointer(a, b, c, d, e);
01444     rs_check_error();
01445 }
01446 
01447 void rs_gl_get_vertex_attrib_iiv(GLuint a, GLenum b, GLint *c)
01448 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01449     glGetVertexAttribIiv(a, b, c);
01450     rs_check_error();
01451 }
01452 
01453 void rs_gl_get_vertex_attrib_iuiv(GLuint a, GLenum b, GLuint *c)
01454 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01455     glGetVertexAttribIuiv(a, b, c);
01456     rs_check_error();
01457 }
01458 
01459 void rs_gl_vertex_attrib_i1i(GLuint a, GLint b)
01460 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01461     glVertexAttribI1i(a, b);
01462     rs_check_error();
01463 }
01464 
01465 void rs_gl_vertex_attrib_i2i(GLuint a, GLint b, GLint c)
01466 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01467     glVertexAttribI2i(a, b, c);
01468     rs_check_error();
01469 }
01470 
01471 void rs_gl_vertex_attrib_i3i(GLuint a, GLint b, GLint c, GLint d)
01472 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01473     glVertexAttribI3i(a, b, c, d);
01474     rs_check_error();
01475 }
01476 
01477 void rs_gl_vertex_attrib_i4i(GLuint a, GLint b, GLint c, GLint d, GLint e)
01478 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01479     glVertexAttribI4i(a, b, c, d, e);
01480     rs_check_error();
01481 }
01482 
01483 void rs_gl_vertex_attrib_i1ui(GLuint a, GLuint b)
01484 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01485     glVertexAttribI1ui(a, b);
01486     rs_check_error();
01487 }
01488 
01489 void rs_gl_vertex_attrib_i2ui(GLuint a, GLuint b, GLuint c)
01490 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01491     glVertexAttribI2ui(a, b, c);
01492     rs_check_error();
01493 }
01494 
01495 void rs_gl_vertex_attrib_i3ui(GLuint a, GLuint b, GLuint c, GLuint d)
01496 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01497     glVertexAttribI3ui(a, b, c, d);
01498     rs_check_error();
01499 }
01500 
01501 void rs_gl_vertex_attrib_i4ui(GLuint a, GLuint b, GLuint c, GLuint d, GLuint e)
01502 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01503     glVertexAttribI4ui(a, b, c, d, e);
01504     rs_check_error();
01505 }
01506 
01507 void rs_gl_vertex_attrib_i1iv(GLuint a, const GLint *b)
01508 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01509     glVertexAttribI1iv(a, b);
01510     rs_check_error();
01511 }
01512 
01513 void rs_gl_vertex_attrib_i2iv(GLuint a, const GLint *b)
01514 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01515     glVertexAttribI2iv(a, b);
01516     rs_check_error();
01517 }
01518 
01519 void rs_gl_vertex_attrib_i3iv(GLuint a, const GLint *b)
01520 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01521     glVertexAttribI3iv(a, b);
01522     rs_check_error();
01523 }
01524 
01525 void rs_gl_vertex_attrib_i4iv(GLuint a, const GLint *b)
01526 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01527     glVertexAttribI4iv(a, b);
01528     rs_check_error();
01529 }
01530 
01531 void rs_gl_vertex_attrib_i1uiv(GLuint a, const GLuint *b)
01532 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01533     glVertexAttribI1uiv(a, b);
01534     rs_check_error();
01535 }
01536 
01537 void rs_gl_vertex_attrib_i2uiv(GLuint a, const GLuint *b)
01538 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01539     glVertexAttribI2uiv(a, b);
01540     rs_check_error();
01541 }
01542 
01543 void rs_gl_vertex_attrib_i3uiv(GLuint a, const GLuint *b)
01544 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01545     glVertexAttribI3uiv(a, b);
01546     rs_check_error();
01547 }
01548 
01549 void rs_gl_vertex_attrib_i4uiv(GLuint a, const GLuint *b)
01550 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01551     glVertexAttribI4uiv(a, b);
01552     rs_check_error();
01553 }
01554 
01555 void rs_gl_vertex_attrib_i4bv(GLuint a, const GLbyte *b)
01556 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01557     glVertexAttribI4bv(a, b);
01558     rs_check_error();
01559 }
01560 
01561 void rs_gl_vertex_attrib_i4sv(GLuint a, const GLshort *b)
01562 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01563     glVertexAttribI4sv(a, b);
01564     rs_check_error();
01565 }
01566 
01567 void rs_gl_vertex_attrib_i4ubv(GLuint a, const GLubyte *b)
01568 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01569     glVertexAttribI4ubv(a, b);
01570     rs_check_error();
01571 }
01572 
01573 void rs_gl_vertex_attrib_i4usv(GLuint a, const GLushort *b)
01574 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01575     glVertexAttribI4usv(a, b);
01576     rs_check_error();
01577 }
01578 
01579 void rs_gl_get_uniform_uiv(GLuint a, GLint b, GLuint *c)
01580 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01581     glGetUniformuiv(a, b, c);
01582     rs_check_error();
01583 }
01584 
01585 void rs_gl_bind_frag_data_location(GLuint a, GLuint b, const GLchar *c)
01586 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01587     glBindFragDataLocation(a, b, c);
01588     rs_check_error();
01589 }
01590 
01591 GLint rs_gl_get_frag_data_location(GLuint a, const GLchar *b)
01592 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01593     GLint res = glGetFragDataLocation(a, b);
01594     rs_check_error();
01595     return res;
01596 }
01597 
01598 void rs_gl_uniform_1ui(GLint a, GLuint b)
01599 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01600     glUniform1ui(a, b);
01601     rs_check_error();
01602 }
01603 
01604 void rs_gl_uniform_2ui(GLint a, GLuint b, GLuint c)
01605 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01606     glUniform2ui(a, b, c);
01607     rs_check_error();
01608 }
01609 
01610 void rs_gl_uniform_3ui(GLint a, GLuint b, GLuint c, GLuint d)
01611 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01612     glUniform3ui(a, b, c, d);
01613     rs_check_error();
01614 }
01615 
01616 void rs_gl_uniform_4ui(GLint a, GLuint b, GLuint c, GLuint d, GLuint e)
01617 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01618     glUniform4ui(a, b, c, d, e);
01619     rs_check_error();
01620 }
01621 
01622 void rs_gl_uniform_1uiv(GLint a, GLsizei b, const GLuint *c)
01623 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01624     glUniform1uiv(a, b, c);
01625     rs_check_error();
01626 }
01627 
01628 void rs_gl_uniform_2uiv(GLint a, GLsizei b, const GLuint *c)
01629 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01630     glUniform2uiv(a, b, c);
01631     rs_check_error();
01632 }
01633 
01634 void rs_gl_uniform_3uiv(GLint a, GLsizei b, const GLuint *c)
01635 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01636     glUniform3uiv(a, b, c);
01637     rs_check_error();
01638 }
01639 
01640 void rs_gl_uniform_4uiv(GLint a, GLsizei b, const GLuint *c)
01641 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01642     glUniform4uiv(a, b, c);
01643     rs_check_error();
01644 }
01645 
01646 void rs_gl_tex_parameter_iiv(GLenum a, GLenum b, const GLint *c)
01647 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01648     glTexParameterIiv(a, b, c);
01649     rs_check_error();
01650 }
01651 
01652 void rs_gl_tex_parameter_iuiv(GLenum a, GLenum b, const GLuint *c)
01653 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01654     glTexParameterIuiv(a, b, c);
01655     rs_check_error();
01656 }
01657 
01658 void rs_gl_get_tex_parameter_iiv(GLenum a, GLenum b, GLint *c)
01659 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01660     glGetTexParameterIiv(a, b, c);
01661     rs_check_error();
01662 }
01663 
01664 void rs_gl_get_tex_parameter_iuiv(GLenum a, GLenum b, GLuint *c)
01665 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01666     glGetTexParameterIuiv(a, b, c);
01667     rs_check_error();
01668 }
01669 
01670 void rs_gl_clear_buffer_iv(GLenum a, GLint b, const GLint *c)
01671 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01672     glClearBufferiv(a, b, c);
01673     rs_check_error();
01674 }
01675 
01676 void rs_gl_clear_buffer_uiv(GLenum a, GLint b, const GLuint *c)
01677 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01678     glClearBufferuiv(a, b, c);
01679     rs_check_error();
01680 }
01681 
01682 void rs_gl_clear_buffer_fv(GLenum a, GLint b, const GLfloat *c)
01683 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01684     glClearBufferfv(a, b, c);
01685     rs_check_error();
01686 }
01687 
01688 void rs_gl_clear_buffer_fi(GLenum a, GLint b, GLfloat c, GLint d)
01689 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01690     glClearBufferfi(a, b, c, d);
01691     rs_check_error();
01692 }
01693 
01694 const GLubyte * rs_gl_get_string_i(GLenum a, GLuint b)
01695 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01696     const GLubyte * res = glGetStringi(a, b);
01697     rs_check_error();
01698     return res;
01699 }
01700 
01701 
01702 /*  GL_VERSION_3_1  */ 
01703 void rs_gl_draw_arrays_instanced(GLenum a, GLint b, GLsizei c, GLsizei d)
01704 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01705     glDrawArraysInstanced(a, b, c, d);
01706     rs_check_error();
01707 }
01708 
01709 void rs_gl_draw_elements_instanced(GLenum a, GLsizei b, GLenum c, const GLvoid *d, GLsizei e)
01710 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01711     glDrawElementsInstanced(a, b, c, d, e);
01712     rs_check_error();
01713 }
01714 
01715 void rs_gl_tex_buffer(GLenum a, GLenum b, GLuint c)
01716 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01717     glTexBuffer(a, b, c);
01718     rs_check_error();
01719 }
01720 
01721 void rs_gl_primitive_restart_index(GLuint a)
01722 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01723     glPrimitiveRestartIndex(a);
01724     rs_check_error();
01725 }
01726 
01727 
01728 /*  GL_VERSION_3_2  */ 
01729 void rs_gl_get_integer_64i_v(GLenum a, GLuint b, GLint64 *c)
01730 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01731     glGetInteger64i_v(a, b, c);
01732     rs_check_error();
01733 }
01734 
01735 void rs_gl_get_buffer_parameter_i64v(GLenum a, GLenum b, GLint64 *c)
01736 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01737     glGetBufferParameteri64v(a, b, c);
01738     rs_check_error();
01739 }
01740 
01741 void rs_gl_program_parameter_i(GLuint a, GLenum b, GLint c)
01742 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01743     glProgramParameteri(a, b, c);
01744     rs_check_error();
01745 }
01746 
01747 void rs_gl_framebuffer_texture(GLenum a, GLenum b, GLuint c, GLint d)
01748 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01749     glFramebufferTexture(a, b, c, d);
01750     rs_check_error();
01751 }
01752 
01753 void rs_gl_framebuffer_texture_face(GLenum a, GLenum b, GLuint c, GLint d, GLenum e)
01754 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01755     glFramebufferTextureFace(a, b, c, d, e);
01756     rs_check_error();
01757 }
01758 
01759 /*  3.0  */ 
01760 /* ARB_framebuffer_object */ 
01761 GLboolean rs_gl_is_renderbuffer(GLuint a)
01762 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01763     GLboolean res = glIsRenderbuffer(a);
01764     rs_check_error();
01765     return res;
01766 }
01767 
01768 void rs_gl_bind_renderbuffer(GLenum a, GLuint b)
01769 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01770     glBindRenderbuffer(a, b);
01771     rs_check_error();
01772 }
01773 
01774 void rs_gl_delete_renderbuffers(GLsizei a, const GLuint *b)
01775 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01776     glDeleteRenderbuffers(a, b);
01777     rs_check_error();
01778 }
01779 
01780 void rs_gl_gen_renderbuffers(GLsizei a, GLuint *b)
01781 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01782     glGenRenderbuffers(a, b);
01783     rs_check_error();
01784 }
01785 
01786 void rs_gl_renderbuffer_storage(GLenum a, GLenum b, GLsizei c, GLsizei d)
01787 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01788     glRenderbufferStorage(a, b, c, d);
01789     rs_check_error();
01790 }
01791 
01792 void rs_gl_get_renderbuffer_parameter_iv(GLenum a, GLenum b, GLint *c)
01793 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01794     glGetRenderbufferParameteriv(a, b, c);
01795     rs_check_error();
01796 }
01797 
01798 GLboolean rs_gl_is_framebuffer(GLuint a)
01799 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01800     GLboolean res = glIsFramebuffer(a);
01801     rs_check_error();
01802     return res;
01803 }
01804 
01805 void rs_gl_bind_framebuffer(GLenum a, GLuint b)
01806 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01807     glBindFramebuffer(a, b);
01808     rs_check_error();
01809 }
01810 
01811 void rs_gl_delete_framebuffers(GLsizei a, const GLuint *b)
01812 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01813     glDeleteFramebuffers(a, b);
01814     rs_check_error();
01815 }
01816 
01817 void rs_gl_gen_framebuffers(GLsizei a, GLuint *b)
01818 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01819     glGenFramebuffers(a, b);
01820     rs_check_error();
01821 }
01822 
01823 GLenum rs_gl_check_framebuffer_status(GLenum a)
01824 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01825     GLenum res = glCheckFramebufferStatus(a);
01826     rs_check_error();
01827     return res;
01828 }
01829 
01830 void rs_gl_framebuffer_rexture_1d(GLenum a, GLenum b, GLenum c, GLuint d, GLint e)
01831 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01832     glFramebufferTexture1D(a, b, c, d, e);
01833     rs_check_error();
01834 }
01835 
01836 void rs_gl_framebuffer_texture_2d(GLenum a, GLenum b, GLenum c, GLuint d, GLint e)
01837 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01838     glFramebufferTexture2D(a, b, c, d, e);
01839     rs_check_error();
01840 }
01841 
01842 void rs_gl_framebuffer_texture_3d(GLenum a, GLenum b, GLenum c, GLuint d, GLint e, GLint f)
01843 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01844     glFramebufferTexture3D(a, b, c, d, e, f);
01845     rs_check_error();
01846 }
01847 
01848 void rs_gl_framebuffer_renderbuffer(GLenum a, GLenum b, GLenum c, GLuint d)
01849 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01850     glFramebufferRenderbuffer(a, b, c, d);
01851     rs_check_error();
01852 }
01853 
01854 void rs_gl_get_framebuffer_attachment_parameter_iv(GLenum a, GLenum b, GLenum c, GLint *d)
01855 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01856     glGetFramebufferAttachmentParameteriv(a, b, c, d);
01857     rs_check_error();
01858 }
01859 
01860 void rs_gl_generate_mipmap(GLenum a)
01861 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01862     glGenerateMipmap(a);
01863     rs_check_error();
01864 }
01865 
01866 void rs_gl_blit_framebuffer(GLint a, GLint b, GLint c, GLint d, GLint e, GLint f, GLint g, GLint h, GLbitfield i, GLenum j)
01867 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01868     glBlitFramebuffer(a, b, c, d, e, f, g, h, i, j);
01869     rs_check_error();
01870 }
01871 
01872 void rs_gl_renderbuffer_storage_multisample(GLenum a, GLsizei b, GLenum c, GLsizei d, GLsizei e)
01873 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01874     glRenderbufferStorageMultisample(a, b, c, d, e);
01875     rs_check_error();
01876 }
01877 
01878 void rs_gl_framebuffer_texture_layer(GLenum a, GLenum b, GLuint c, GLint d, GLint e)
01879 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01880     glFramebufferTextureLayer(a, b, c, d, e);
01881     rs_check_error();
01882 }
01883 
01884 /* ARB_map_buffer_range */ 
01885 GLvoid* rs_gl_map_buffer_range(GLenum a, GLintptr b, GLsizeiptr c, GLbitfield d)
01886 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01887     GLvoid* res = glMapBufferRange(a, b, c, d);
01888     rs_check_error();
01889     return res;
01890 }
01891 
01892 void rs_gl_flush_mapped_buffer_range(GLenum a, GLintptr b, GLsizeiptr c)
01893 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01894     glFlushMappedBufferRange(a, b, c);
01895     rs_check_error();
01896 }
01897 
01898 /* ARB_vertex_array_object */ 
01899 void rs_gl_bind_vertex_array(GLuint a)
01900 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01901     glBindVertexArray(a);
01902     rs_check_error();
01903 }
01904 
01905 void rs_gl_delete_vertex_arrays(GLsizei a, const GLuint *b)
01906 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01907     glDeleteVertexArrays(a, b);
01908     rs_check_error();
01909 }
01910 
01911 void rs_gl_gen_vertex_arrays(GLsizei a, GLuint *b)
01912 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01913     glGenVertexArrays(a, b);
01914     rs_check_error();
01915 }
01916 
01917 GLboolean rs_gl_is_vertex_array(GLuint a)
01918 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01919     GLboolean res = glIsVertexArray(a);
01920     rs_check_error();
01921     return res;
01922 }
01923 
01924 
01925 /*  3.1  */ 
01926 /* ARB_copy_buffer */ 
01927 void rs_gl_copy_buffer_sub_data(GLenum a, GLenum b, GLintptr c, GLintptr d, GLsizeiptr e) 
01928 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01929     glCopyBufferSubData(a, b, c, d, e);
01930     rs_check_error();
01931 }
01932 
01933 /* ARB_uniform_buffer_object */ 
01934 
01935 /*  3.2  */ 
01936 /* ARB_draw_elements_base_vertex */ 
01937 void rs_gl_draw_elements_base_vertex(GLenum a, GLsizei b, GLenum c, const GLvoid *d, GLint e)
01938 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01939     glDrawElementsBaseVertex(a, b, c, d, e);
01940     rs_check_error();
01941 }
01942 
01943 void rs_gl_draw_range_elements_base_vertex(GLenum a, GLuint b, GLuint c, GLsizei d, GLenum e, const GLvoid *f, GLint g)
01944 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01945     glDrawRangeElementsBaseVertex(a, b, c, d, e, f, g);
01946     rs_check_error();
01947 }
01948 
01949 void rs_gl_draw_elements_instanced_base_vertex(GLenum a, GLsizei b, GLenum c, const GLvoid *d, GLsizei e, GLint f)
01950 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01951     glDrawElementsInstancedBaseVertex(a, b, c, d, e, f);
01952     rs_check_error();
01953 }
01954 
01955 void rs_gl_multi_draw_elements_base_vertex(GLenum a, const GLsizei *b, GLenum c, const GLvoid* *d, GLsizei e, const GLint *f)
01956 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01957     glMultiDrawElementsBaseVertex(a, b, c, d, e, f);
01958     rs_check_error();
01959 }
01960 
01961 /* ARB_provoking_vertex */ 
01962 void rs_gl_provoking_vertex(GLenum a)
01963 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01964     glProvokingVertex(a);
01965     rs_check_error();
01966 }
01967 
01968 /* ARB_sync */ 
01969 GLsync rs_gl_fence_sync(GLenum a, GLbitfield b)
01970 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01971     GLsync res = glFenceSync(a, b);
01972     rs_check_error();
01973     return res;
01974 }
01975 
01976 GLboolean rs_gl_is_sync(GLsync a)
01977 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01978     GLboolean res = glIsSync(a);
01979     rs_check_error();
01980     return res;
01981 }
01982 
01983 void rs_gl_delete_sync(GLsync a)
01984 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01985     glDeleteSync(a);
01986     rs_check_error();
01987 }
01988 
01989 GLenum rs_gl_client_wait_sync(GLsync a, GLbitfield b, GLuint64 c)
01990 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01991     GLenum res = glClientWaitSync(a, b, c);
01992     rs_check_error();
01993     return res;
01994 }
01995 
01996 void rs_gl_wait_sync(GLsync a, GLbitfield b, GLuint64 c)
01997 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
01998     glWaitSync(a, b, c);
01999     rs_check_error();
02000 }
02001 
02002 void rs_gl_get_integer_64v(GLenum a, GLint64 *b)
02003 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
02004     glGetInteger64v(a, b);
02005     rs_check_error();
02006 }
02007 
02008 void rs_gl_get_sync_iv(GLsync a, GLenum b, GLsizei c, GLsizei *d, GLint *e)
02009 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
02010     glGetSynciv(a, b, c, d, e);
02011     rs_check_error();
02012 }
02013 
02014 /* ARB_texture_multisample */
02015 void rs_gl_tex_image_2d_multisample(GLenum a, GLsizei b, GLint c, GLsizei d, GLsizei e, GLboolean f)
02016 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
02017     glTexImage2DMultisample(a, b, c, d, e, f);
02018     rs_check_error();
02019 }
02020 
02021 void rs_gl_tex_image_3d_multisample(GLenum a, GLsizei b, GLint c, GLsizei d, GLsizei e, GLsizei f, GLboolean g)
02022 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
02023     glTexImage3DMultisample(a, b, c, d, e, f, g);
02024     rs_check_error();
02025 }
02026 
02027 void rs_gl_get_multisample_fv(GLenum a, GLuint b, GLfloat *c)
02028 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
02029     glGetMultisamplefv(a, b, c);
02030     rs_check_error();
02031 }
02032 
02033 void rs_gl_sample_mask_i(GLuint a, GLbitfield b)
02034 {   RS_LOG_GL_FUNCTION(__FUNCTION__);
02035     glSampleMaski(a, b);
02036     rs_check_error();
02037 }
02038 
02039 }
02040 
Generated on Sun Apr 11 12:23:09 2010 for RenderStack by  doxygen 1.6.3