OpenGL GLUT initialization function [GO]

Source: Internet
Author: User

GLUT initialization function for OpenGL

void Glutinit (int* argc,char** argv)

Initializes the GLUT library. The form corresponding to the main function should be: int main (int argc,char* argv[]);

This function obtains its two arguments from the main function.

void glutinitwindowsize (int width,int height);//Set the size of the main window

void glutinitwindowposition (int x,int y);

Sets the size and position of the window to be produced by the GLUT program (upper-left corner). In pixels.

void Glutinitdisplaymode (unsigned int mode);

Sets the graphical display mode. The optional values for the parameter mode are:

    • Glut_rgba: Is the default mode used when Glut-rgba or Glut-index are not specified. Indicates the window in which you want to establish the RGBA mode.
    • Glut_rgb: The same as the Glut-rgba function.
    • Glut_index: Indicates the color index mode.
    • Glut_single: Use only single cache
    • Glut_double: Use dual cache. In order to avoid the process of drawing the computer to show, or to smooth the implementation of animation.
    • Glut_accum: Let the window use an additive cache.
    • Glut_alpha: Let the color buffer use the ALPHA component.
    • Glut_depth: Use deep cache.
    • Glut_stencil: Use template caching.
    • Glut_multisample: Allows the window to support multiple routines.
    • Glut_stereo: Enables the window to support stereoscopic.
    • Glut_luminace:luminance is the meaning of brightness. Unfortunately, on most OpenGL platforms, it is not supported.

Go to: http://blog.csdn.net/augusdi/article/details/7076776

OpenGL GLUT initialization function [GO]

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.