OpenGL部分函數備忘

來源:互聯網
上載者:User

1.glRect

void glRectd ( GLdouble x1 , GLdouble y1 , GLdouble x2 , GLdouble y2 );
void glRectf ( GLfloat x1 , GLfloat y1 , GLfloat x2 , GLfloat y2 );
void glRecti ( GLint x1 , GLint y1 , GLint x2 , GLint y2 );
void glRects ( GLshort x1 , GLshort y1 , GLshort x2 , GLshort y2 );

x1,y1,為左下點,x2,y2為右上點。

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~·

2.glColor-set current color

void glColor3b( GLbyte   red,
  GLbyte   green,
  GLbyte   blue);
void glColor3s( GLshort   red,
  GLshort   green,
  GLshort   blue);
void glColor3i( GLint   red,
  GLint   green,
  GLint   blue);
void glColor3f( GLfloat   red,
  GLfloat   green,
  GLfloat   blue);
void glColor3d( GLdouble   red,
  GLdouble   green,
  GLdouble   blue);
void glColor3ub( GLubyte   red,
  GLubyte   green,
  GLubyte   blue);
void glColor3us( GLushort   red,
  GLushort   green,
  GLushort   blue);
void glColor3ui( GLuint   red,
  GLuint   green,
  GLuint   blue);
void glColor4b( GLbyte   red,
  GLbyte   green,
  GLbyte   blue,
  GLbyte   alpha);
void glColor4s( GLshort   red,
  GLshort   green,
  GLshort   blue,
  GLshort   alpha);
void glColor4i( GLint   red,
  GLint   green,
  GLint   blue,
  GLint   alpha);
void glColor4f( GLfloat   red,
  GLfloat   green,
  GLfloat   blue,
  GLfloat   alpha);
void glColor4d( GLdouble   red,
  GLdouble   green,
  GLdouble   blue,
  GLdouble   alpha);
void glColor4ub( GLubyte   red,
  GLubyte   green,
  GLubyte   blue,
  GLubyte   alpha);
void glColor4us( GLushort   red,
  GLushort   green,
  GLushort   blue,
  GLushort   alpha);
void glColor4ui( GLuint   red,
  GLuint   green,
  GLuint   blue,
  GLuint   alpha);

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

3.glPolygonStipple 

C Specification
void glPolygonStipple( const GLubyte *   pattern);

Parameters
pattern

Specifies a pointer to a 32 × 32 stipple pattern that will be unpacked from memory in the same way that glDrawPixels unpacks
pixels.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.