一: 查询关于OpenGL2.0实现信息:
1: 原型: const GLubyte* glGetString(GLenum name)
参数: GL_VENDOR, GL_RENDERER, GL_VERSION;
二: 查询关于OpenGL2.0实现依赖限制:
1:原型: void glGetBooleanv(GLenum pname, GLboolean* params)
2: 原型:void glGetFloatv(GLenum pname, GLfloat* params)
3: 原型: void glGetIntegerv(GLenum pname, GLint* params)
参数: GL_VIEWPORT,GL_DEPTH_RANGE,GL_LINE_WIDTH,GL_CULL_FACE_MODE,GL_FRONT_FACE,GL_POLYGON_OFFSET_FACTOR,GL_POLYGON_OFFSET_UNITS,GL_SAMPLE_COVERAGE_VALUE,GL_SAMPLE_COVERAGE_INVERT,GL_COLOR_WRITEMASK,GL_DEPTH_WRITEMASK,GL_STENCIL_WRITEMASK,GL_STENCIL_BACK_WRITEMASK,GL_COLOR_CLEAR_VALUE,GL_DEPTH_CLEAR_VALUE,GL_STENCIL_CLEAR_VALUE,GL_SUBPIXEL_BITS,GL_MAX_TEXTURE_SIZE,GL_MAX_CUB_MAP_TEXTURE_SIZE,GL_MAX_VIEWPORT_DIMS,GL_ALIASED_POINT_SIZE_RANGE,GL_ALIASED_LINE_WIDTH_RANGE,GL_NUM_COMPRESSED_TEXTURE_FORMATS,GL_COMPRESSED_TEXTURE_FORMATS,GL_RED_BITS,GL_GREEN_BITS,GL_BLUE_BITS,GL_ALPHA_BITS,GL_DEPTH_BITS,GL_STENCIL_BITS,GL_IMPLEMENTATION_READ_TYPE,GL_IMPLEMENTATION_READ_FORMAT。
三: 查询关于OpenGL2.0内部状态信息:
1:原型: void glGetBooleanv(GLenum pname, GLboolean* params)
2: 原型:void glGetFloatv(GLenum pname, GLfloat* params)
3: 原型: void glGetIntegerv(GLenum pname, GLint* params)
参数:
GL_ARRAY_BUFFER_BINDING,GL_ELEMENT_ARRAY_BUFFER_BINDING,GL_CULL_FACE_MODE,GL_FRONT_FACE,GL_SAMPLE_COVERAGE_VALUE,GL_SAMPLE_COVERAGE_INVERT,GL_TEXTURE_BINDING_2D,GL_TEXTURE_BINDING_CUBE_MAP,GL_ACTIVE_TEXTURE,GL_COLOR_WRITEMASK,GL_DEPTH_WRITEMASK,GL_STENCIL_WRITEMASK,GL_STENCIL_BACK_WRITEMASK,GL_COLOR_CLEAR_VALUE,GL_DEPTH_CLEAR_VALUE,GL_STENCIL_CLEAR_VALUE,GL_SCISSOR_BOX,GL_STENCIL_FUNC,GL_STENCIL_VALUE_MASK,GL_STENCIL_REF,GL_STENCIL_FAIL,GL_STENCIL_PASS_DEPTH_FAIL,GL_STENCIL_PASS_DEPTH_PASS,GL_STENCIL_BACK_FUNC,GL_STENCIL_BACK_VALUE_MASK,GL_STENCIL_BACK_REF,GL_STENCIL_BACK_FAIL,GL_STENCIL_BACK_PASS_DEPTH_FAIL,GL_STENCIL_BACK_PASS_DEPTH_PASS,GL_DEPTH_FUNC,GL_BLEND_SRC_RGB,GL_BLEND_SRC_ALPHA,GL_BLEND_DST_RGB,GL_BLEND_DST_ALPHA,GL_BLEND_EQUATION,GL_BLEND_EQUATION_RGB,GL_BLEND_EQUATION_ALPHA,GL_BLEND_COLOR,GL_UNPACK_ALIGNMENT,GL_PACK_ALIGNMENT,GL_CURRENT_PROGRAM,GL_RENDERBUFFER_BINDING,GL_FRAMEBUFFER_BINDING。
四: 设置OpenGL2.0的建议(HINT)
原型:void glHint(GLenum target, GLenum mode)
参数target :GL_GENERATE_MIPMAP_HINT, GL_FRAGMENT_SHADER_DERIVATIVE_HINT_OES
参数mode: GL_FASTEST, GL_DONT_CARE
五: 查询和判断OpenGL2.0中的实体对象名称:
1: GLboolean glIsTexture(GLuint texture)
2: GLboolean glIsShader(GLuint shader)
3: GLboolean glIsProgram(GLuint program)
4: GLboolean glIsBuffer(GLuint buffer)
5: GLboolean glIsRenderbuffer(GLuint renderbuffer)
6: GLboolean glIsFramebuffer(GLunit framebuffer)
六: OpenGL2.0中的控制操作
1: void glEnable(GLenum capability)
2: void glDisable(GLenum capability)
3: GLboolean glIsEnabled(GLenum capability)
参数: GL_CULL_FACE, GL_POLYGON_OFFSET_FILL, GL_SCISSOR_TEST, GL_SAMPLE_COVERAGE, GL_SAMPLE_COVERAGE_TO_ALPHA, GL_STENCIL_TEST, GL_DEPTH_TEST, GL_BLEND, GL_DITHER。
七: 着色七状态查询:
1: void glGetAttachedShaders(GLuint program, GLsizei maxcount, GLsizei *count, GLuint *shaders)
2: void glGetShaderSource(GLuint shader, GLsizei bufsize, GLsizei *length, GLchar *source)
3: void glGetUniformfv(GLuint program, GLint location, GLfloat *params)
4 : GLuint program, GLint location,GLint *params)
5: void glGetShaderPrecisionFormat(GLenum shaderType, GLenum precisionType, GLint *range, GLint *precision)
八: 顶点属性查询:
1: void glGetVertexAttribPointerv(GLuint index, GLenum pname, GLvoid** pointer)
2: void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat* params)
3: void glGetVertexAttribiv(GLuint index, GLenum pname, GLint* params)
参数pname: GL_VERTEX_ATTRIB_ARRAY_BUFFER_BINDING , GL_VERTEX_ATTRIB_ARRAY_ENABLED , GL_VERTEX_ATTRIB_ARRAY_SIZE , GL_VERTEX_ATTRIB_ARRAY_STRIDE , GL_VERTEX_ATTRIB_ARRAY_TYPE , GL_VERTEX_ATTRIB_ARRAY_NORMALIZED , or GL_CURRENT_VERTEX_ATTRIB
GL_CURRENT_VERTEX_ATTRIB
九: 纹理状态查询:
1:void glGetTexParameterfv(GLenum target, GLenum pname, GLfloat* params )
2: void glGetTexParameteriv(GLenum target, GLenum pname, GLint* params)
参数target: GL_TEXTURE_2D or GL_TEXTURE_CUBE_MAP
参数pname: GL_TEXTURE_MINIFICATION_FILTER ,GL_TEXTURE_MAGNIFICATION_FILTER , GL_TEXTURE_WRAP_S , or GL_TEXTURE_WRAP_T
十: 缓冲区状态查询:
1: void glGetBufferParameteriv(GLenum target, GLenum pname, GLint* params)
2: void glGetBufferPointervOES(GLenum target, GLenum pname, void** params)
3: void glGetRenderbufferParameteriv(GLenum target, GLenum pname, GLint* params)
4: void glGetFramebufferAttachmentParameteriv(GLenum target, GLenum attachment, GLenum pname, GLint* params)