Exemplo n.º 1
0
void Register_GL_2_0_Functions(PyGL::FunctionTable &functions) {
  if (GLEW_VERSION_2_0) {
#ifdef _DEBUG
    std::cout << "Supports OpenGL 2.0" << std::endl;
#endif
    PyGL::Instance().setVersion(2.0);
    REGISTER_GL_FUNC(functions, AttachShader);
    REGISTER_GL_FUNC(functions, CreateShader);
    REGISTER_GL_FUNC(functions, CreateProgram);
    REGISTER_GL_FUNC(functions, DetachShader);
    REGISTER_GL_FUNC(functions, DeleteShader);
    REGISTER_GL_FUNC(functions, DeleteProgram);
    REGISTER_GL_FUNC(functions, BindAttribLocation);
    REGISTER_GL_FUNC(functions, BlendEquationSeparate);
    REGISTER_GL_FUNC(functions, CompileShader);
    REGISTER_GL_FUNC(functions, DisableVertexAttribArray);
    REGISTER_GL_FUNC(functions, DrawBuffers);
    REGISTER_GL_FUNC(functions, EnableVertexAttribArray);
    REGISTER_GL_FUNC(functions, GetActiveAttrib);
    REGISTER_GL_FUNC(functions, GetActiveUniform);
    REGISTER_GL_FUNC(functions, GetAttachedShaders);
    REGISTER_GL_FUNC(functions, GetAttribLocation);
    REGISTER_GL_FUNC(functions, GetProgramInfoLog);
    REGISTER_GL_FUNC(functions, GetProgram);
    REGISTER_GL_FUNC(functions, GetShaderInfoLog);
    REGISTER_GL_FUNC(functions, GetShaderSource);
    REGISTER_GL_FUNC(functions, GetShader);
    REGISTER_GL_FUNC(functions, GetUniformLocation);
    REGISTER_GL_FUNC(functions, IsProgram);
    REGISTER_GL_FUNC(functions, IsShader);
    REGISTER_GL_FUNC(functions, LinkProgram);
    REGISTER_GL_FUNC(functions, GetUniform);
    REGISTER_GL_FUNC(functions, GetVertexAttribPointer);
    REGISTER_GL_FUNC(functions, GetVertexAttrib);
    REGISTER_GL_FUNC(functions, ShaderSource);
    REGISTER_GL_FUNC(functions, StencilFuncSeparate);
    REGISTER_GL_FUNC(functions, StencilMaskSeparate);
    REGISTER_GL_FUNC(functions, StencilOpSeparate);
    REGISTER_GL_FUNC(functions, Uniform1f);
    REGISTER_GL_FUNC(functions, Uniform2f);
    REGISTER_GL_FUNC(functions, Uniform3f);
    REGISTER_GL_FUNC(functions, Uniform4f);
    REGISTER_GL_FUNC(functions, Uniform1i);
    REGISTER_GL_FUNC(functions, Uniform2i);
    REGISTER_GL_FUNC(functions, Uniform3i);
    REGISTER_GL_FUNC(functions, Uniform4i);
    REGISTER_GL_FUNC(functions, Uniform1iv);
    REGISTER_GL_FUNC(functions, Uniform2iv);
    REGISTER_GL_FUNC(functions, Uniform3iv);
    REGISTER_GL_FUNC(functions, Uniform4iv);
    REGISTER_GL_FUNC(functions, Uniform1fv);
    REGISTER_GL_FUNC(functions, Uniform2fv);
    REGISTER_GL_FUNC(functions, Uniform3fv);
    REGISTER_GL_FUNC(functions, Uniform4fv);
    REGISTER_GL_FUNC(functions, UniformMatrix2fv);
    REGISTER_GL_FUNC(functions, UniformMatrix3fv);
    REGISTER_GL_FUNC(functions, UniformMatrix4fv);
    REGISTER_GL_FUNC(functions, UseProgram);
    REGISTER_GL_FUNC(functions, ValidateProgram);
    REGISTER_GL_FUNC(functions, VertexAttrib1f);
    REGISTER_GL_FUNC(functions, VertexAttrib1d);
    REGISTER_GL_FUNC(functions, VertexAttrib1s);
    REGISTER_GL_FUNC(functions, VertexAttrib2f);
    REGISTER_GL_FUNC(functions, VertexAttrib2d);
    REGISTER_GL_FUNC(functions, VertexAttrib2s);
    REGISTER_GL_FUNC(functions, VertexAttrib3f);
    REGISTER_GL_FUNC(functions, VertexAttrib3d);
    REGISTER_GL_FUNC(functions, VertexAttrib3s);
    REGISTER_GL_FUNC(functions, VertexAttrib2fv);
    REGISTER_GL_FUNC(functions, VertexAttrib2dv);
    REGISTER_GL_FUNC(functions, VertexAttrib2sv);
    REGISTER_GL_FUNC(functions, VertexAttrib3fv);
    REGISTER_GL_FUNC(functions, VertexAttrib3dv);
    REGISTER_GL_FUNC(functions, VertexAttrib3sv);
    REGISTER_GL_FUNC(functions, VertexAttrib4f);
    REGISTER_GL_FUNC(functions, VertexAttrib4d);
    REGISTER_GL_FUNC(functions, VertexAttrib4s);
    REGISTER_GL_FUNC(functions, VertexAttrib4Nub);
    REGISTER_GL_FUNC(functions, VertexAttrib4Nbv);
    REGISTER_GL_FUNC(functions, VertexAttrib4Niv);
    REGISTER_GL_FUNC(functions, VertexAttrib4Nsv);
    REGISTER_GL_FUNC(functions, VertexAttrib4Nubv);
    REGISTER_GL_FUNC(functions, VertexAttrib4Nuiv);
    REGISTER_GL_FUNC(functions, VertexAttrib4Nusv);
    REGISTER_GL_FUNC(functions, VertexAttrib4bv);
    REGISTER_GL_FUNC(functions, VertexAttrib4ubv);
    REGISTER_GL_FUNC(functions, VertexAttrib4sv);
    REGISTER_GL_FUNC(functions, VertexAttrib4usv);
    REGISTER_GL_FUNC(functions, VertexAttrib4iv);
    REGISTER_GL_FUNC(functions, VertexAttrib4uiv);
    REGISTER_GL_FUNC(functions, VertexAttrib4fv);
    REGISTER_GL_FUNC(functions, VertexAttrib4dv);
    REGISTER_GL_FUNC(functions, VertexAttribPointer);
  }
}
Exemplo n.º 2
0
void Register_GL_1_3_Functions(lua_State *L, int module) {
  if (GLEW_VERSION_1_3) {
#ifdef _DEBUG
    std::cout << "Supports OpenGL 1.3" << std::endl;
#endif
    LuaGL::Instance().setVersion(1.3);
    REGISTER_GL_FUNC(L, module, ActiveTexture);
    REGISTER_GL_FUNC(L, module, ClientActiveTexture);
    REGISTER_GL_FUNC(L, module, CompressedTexImage1D);
    REGISTER_GL_FUNC(L, module, CompressedTexImage2D);
    REGISTER_GL_FUNC(L, module, CompressedTexImage3D);
    REGISTER_GL_FUNC(L, module, CompressedTexSubImage1D);
    REGISTER_GL_FUNC(L, module, CompressedTexSubImage2D);
    REGISTER_GL_FUNC(L, module, CompressedTexSubImage3D);
    REGISTER_GL_FUNC(L, module, GetCompressedTexImage);
    REGISTER_GL_FUNC(L, module, LoadTransposeMatrixf);
    REGISTER_GL_FUNC(L, module, LoadTransposeMatrixd);
    REGISTER_GL_FUNC(L, module, MultTransposeMatrixf);
    REGISTER_GL_FUNC(L, module, MultTransposeMatrixd);
    REGISTER_GL_FUNC(L, module, MultiTexCoord1s);
    REGISTER_GL_FUNC(L, module, MultiTexCoord1i);
    REGISTER_GL_FUNC(L, module, MultiTexCoord1f);
    REGISTER_GL_FUNC(L, module, MultiTexCoord1d);
    REGISTER_GL_FUNC(L, module, MultiTexCoord2s);
    REGISTER_GL_FUNC(L, module, MultiTexCoord2i);
    REGISTER_GL_FUNC(L, module, MultiTexCoord2f);
    REGISTER_GL_FUNC(L, module, MultiTexCoord2d);
    REGISTER_GL_FUNC(L, module, MultiTexCoord2sv);
    REGISTER_GL_FUNC(L, module, MultiTexCoord2iv);
    REGISTER_GL_FUNC(L, module, MultiTexCoord2fv);
    REGISTER_GL_FUNC(L, module, MultiTexCoord2dv);
    REGISTER_GL_FUNC(L, module, MultiTexCoord3s);
    REGISTER_GL_FUNC(L, module, MultiTexCoord3i);
    REGISTER_GL_FUNC(L, module, MultiTexCoord3f);
    REGISTER_GL_FUNC(L, module, MultiTexCoord3d);
    REGISTER_GL_FUNC(L, module, MultiTexCoord3sv);
    REGISTER_GL_FUNC(L, module, MultiTexCoord3iv);
    REGISTER_GL_FUNC(L, module, MultiTexCoord3fv);
    REGISTER_GL_FUNC(L, module, MultiTexCoord3dv);
    REGISTER_GL_FUNC(L, module, MultiTexCoord4s);
    REGISTER_GL_FUNC(L, module, MultiTexCoord4i);
    REGISTER_GL_FUNC(L, module, MultiTexCoord4f);
    REGISTER_GL_FUNC(L, module, MultiTexCoord4d);
    REGISTER_GL_FUNC(L, module, MultiTexCoord4sv);
    REGISTER_GL_FUNC(L, module, MultiTexCoord4iv);
    REGISTER_GL_FUNC(L, module, MultiTexCoord4fv);
    REGISTER_GL_FUNC(L, module, MultiTexCoord4dv);
    REGISTER_GL_FUNC(L, module, SampleCoverage);
  }
}