设为首页 - 加入收藏 焦点技术网
热搜:java
当前位置:首页 >

OpenGL绘图函数

2011-12-14 23:22:00.0 图形学 textures api  
导读: OpenGL绘图函数 1.清屏void glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha ); 2.缓冲区清理glClear( GLbitfield mask) 3.平移,旋转,缩放void glRotated( GLdouble angle, GLdouble x, GLdouble y, GLd...。。。

 OpenGL绘图函数

 

1.清屏

void glClearColor( GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha );

 

2.缓冲区清理

glClear( GLbitfield mask)

 

3.平移,旋转,缩放

void glRotated( GLdouble angle, GLdouble x, GLdouble y, GLdouble z );
void glRotatef( GLfloat angle, GLfloat x, GLfloat y, GLfloat z );
void glScaled( GLdouble x, GLdouble y, GLdouble z );
void glScalef( GLfloat x, GLfloat y, GLfloat z );
void glTranslated( GLdouble x, GLdouble y, GLdouble z );
void glTranslatef( GLfloat x, GLfloat y, GLfloat z );

 

4.强制执行opengl命令

glFinish(void);

 

5.保护原来的矩阵在一系列变换操作后不被破坏(改变)

void glPushMatrix( void );
void glPopMatrix( void );

 

6.视见

void glViewport( GLint x, GLint y, GLsizei width, GLsizei height );

 

7.平行视景体

void glOrtho( GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble near_val, GLdouble far_val );

 

8.矩阵单位化

void glLoadIdentity( void );

 

9.光照 Ligiht0-7

GLAPI void APIENTRY glLightf( GLenum light, GLenum pname, GLfloat param );
GLAPI void APIENTRY glLighti( GLenum light, GLenum pname, GLint param );
GLAPI void APIENTRY glLightfv( GLenum light, GLenum pname, const GLfloat *params );
GLAPI void APIENTRY glLightiv( GLenum light, GLenum pname, const GLint *params );

 

10.点大小 和 线宽

GLAPI void APIENTRY glPointSize( GLfloat size );
GLAPI void APIENTRY glLineWidth( GLfloat width );

 

11.获取opengl错误

glEnum glGetError( void );

 

12.纹理生产和删除

GLAPI void APIENTRY glGenTextures( GLsizei n, GLuint *textures );
GLAPI void APIENTRY glDeleteTextures( GLsizei n, const GLuint *textures);

 

OpenGL API: http://msdn.microsoft.com/en-us/library/dd374211(v=VS.85).aspx

 

 

转载自:http://blog.csdn.net/ccsdu2004/article/details/4345639

(编辑: szchtx)

网友评论
相关文章