Introduction to OpenGL functions

Source: Internet
Author: User

Function category:

* GL core: implements basic functions, such as shape description and matrix conversion. It is prefixed with GL;

* Utility: Provides texture support, complex curve and surface drawing, and prefix with Glu;

* Auxiliary functions (Auxiliary): simple window management, input event processing, etc., prefixed with aux;

* Dedicated WGL functions: used to connect OpenGL to winnt/95 systems, with WGL as the prefix;

* Win32 functions: no prefix, including choosepixelformat, describepixelformat,

Void glclearcolor (
Glclampf
Red,
GlclampfGreen,
GlclampfBlue,
GlclampfAlpha
); Clear the color buffer Gl. h

Gldisable glenable

Glfinish ------- force all previous OpenGL commands to be completed. openGL is usually queued and processed in batches to achieve optimized performance. glfinidh forces uncompleted OpenGL commands to be executed. unlike glflush, this function does not return any results before all rendering operations are completed.

Glflush ------- causes all the waiting commands to be executed, which must be completed within a limited period of time. In essence, this is equivalent to asynchronous execution of graphical commands, because glflush will return immediately.

Glgeterror ----- check OpenGL errors

Glortho --------- set or modify the area range. Describe a parallel area.

Glpushattrib/glpopattrib saves and restores a set of related OpenGL Status values

Glrect ---- draw a plane rectangle.

Glviewport ----- set the part of a window that can be drawn by OpenGL. Map the color-cutting area to the physical window coordinate.

A window that can use OpenGL can be created by using.

Gludisplayfunc --- set the display callback function for the current window -- tell glut which function should be called when the content of the window must be drawn. When the window size is changed or restored from the overwritten state, or this may happen when you call the glurostredisplay function that requires updating. However, this function does not display the call to glflush or glswapbuffer.

Gluinitdisplaymode ---- display mode of the initialization window, for example, single buffer and double buffer...

Glukeyboardfunc --- set the keyboard callback function

Glumainloop ---- start the main glut processing cycle. The event loop is where all mouse and keyboard timers are repainted and other messages are processed. This function will not be returned until the function ends.

Glumousefunc --- set the mouse callback function for the current window

Glureshapefunc -- resets the shape callback function for the current window.

Gluspecialfunc -- set a special keyboard callback function, such as f1f2...

Gluswapbuffer --

Glutimerfunc registers a callback function, which is called by glut after the specified time expires.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.