Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Caesar

OGL example not working

This topic is 6159 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve just started learning OpenGl (using OpenGL SBible) and I couldn''t get this working. It''s nearly the same as the second example in the book (colors changed) but it doesn''t work properly. Just the first two gl... commands executed. What''s wrong?
  

#include<windows.h>
#include<gl\gl.h>
#include<gl\glaux.h>
#include<conio.h>

void main()
{
    auxInitDisplayMode(AUX_SINGLE | AUX_RGBA);
    auxInitPosition(100,100,250,250);
    auxInitWindow("My first OpenGL Program");

    glClearColor(1.0f,0.0f,1.0f,1.0f);
    glClear(GL_COLOR_BUFFER_BIT);

    glColor3f(1.0f,1.0f,0.0f);
    glRectf(100.0f, 150.0f, 150.0f, 100.0f);

    glFlush();

    getch();
}

  
Thanks

Share this post


Link to post
Share on other sites
Advertisement
Guest Anonymous Poster
That seems too simple, I don''t know about that auxInit stuff but when I make an OGL app I make a Win32 app that uses OGL. check out the nehe tutorials at nehe.gamedev.net

Share this post


Link to post
Share on other sites
The aux stuff is a standard part of OGL and should provide some platformspecific routines (ie. creating the windows under Win32 etc) to ease the use for begginers

Share this post


Link to post
Share on other sites
The aux stuff is ancient - I don''t think the library gets updated anymore.

If you are looking for platform independent & easy init. stuff try glut.

-Mezz

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!