GLUT Window Template

I have written an article on CodeProject that describes in detail how to set up your first OpenGL GLUT window and provides you with a template for your OpenGL applications. It can be used in the following ways:

  • Learn GLUT and OpenGL through
    • Interactive Program
    • Documentation
    • Source Code
  • Start your first OpenGL program
  • Use the code as a template for your OpenGL applications

Click below for a screen shot of what the program would look like when its run.

GLUT Window Template

Make sure you read the Visual C++ 2015 section in the article to avoid any issues in running the program.

Check it out, and let me know if you find it useful.

Ali B


2 thoughts on “GLUT Window Template

  1. Hi ,

    you have written a great tutorial.

    I have created an android app for drawing of lines,circles.. by using
    GLSurfaceView in OpenGLES 2.0 like an Auto cad app.
    The app works well with Google Nexus 7, in the sense that
    if we draw a line & then a circle the line doesn’t get erased
    in surface view. But with Samsung Galaxy
    Note II, it is entirely different.
    The line previously drawn before a circle being drawn, gets erased.
    i.e., each time if we draw a new line or circle, the previous one
    gets erased.I can draw only one image at a time.
    What I need is the same output which I
    get in Google Nexus 7 in Samsung Galaxy Note II.
    i.e.I want to draw more than one image in
    the GLSurfaceView at a time.
    Note :
    Both the Android OS in Google Nexus 7 and Samsung Galaxy Note II
    are Jelly Bean 4.2. But both devices are different GPU.
    Google Nexus 7 GPU is ULP GeForce &
    Samsung Galaxy Note II is Mali400MP.

    Would this be an issue in the rendering of output of the
    Surfaceview ?

    Should we take into account of GPU while Coding ?

    Can you tell me why this problem of different output in
    different devices ?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s