http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

TheGrumpyProgrammer



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: More help for an OpenGl Beginner.






    I think I can help...but I don't have too much time to look at your 
code.  Anyways, it looks like your using double-buffering, and then not 
swapping buffers when you need to.  After your call to glFlush(), call 
auxSwapBuffers().

  Hope this helps.


>From: "Paulo Zaffari" <czaffari@ez-poa.com.br>
>Reply-To: gameprogrammer@gameprogrammer.com
>To: "Game Programmer List" <gameprogrammer@gameprogrammer.com>
>Subject: More help for an OpenGl  Beginner.
>Date: Sat, 6 May 2000 20:21:42 -0300
>
>Before anything I must thank everyone who helped me before in this 
>list.Now, my question:
>
>     I am using VC6 to compile the following OpenGl code. The problem is 
>that it only creates a window with a black background and nothing else. 
>Does anyone can tell me what should I do to make my rendering code really 
>work?
>
>#include "stdafx.h"
>#include "windows.h"
>#include "gl/gl.h"
>#include "gl/glu.h"
>#include "gl/glaux.h"
>
>#pragma comment(lib, "opengl32.lib")
>#pragma comment(lib, "glu32.lib")
>#pragma comment(lib, "glaux.lib")
>
>
>void CALLBACK MainLoop(void);
>
>int main(int argc, char* argv[])
>{
>     auxInitDisplayMode(AUX_RGBA | AUX_DOUBLE | AUX_DEPTH);
>     auxInitPosition(0, 0, 640, 480);
>     auxInitWindow("Win32 OpenGL Console Application Test");
>
>
>     auxMainLoop(MainLoop);
>  return(0);
>}
>
>void CALLBACK MainLoop(void)
>{
>  glBegin(GL_TRIANGLES);
>   glColor3f(1.0,1.0,1.0);
>   glVertex3f(0.0,0.0,0.0);
>   glVertex3f(1.0,1.0,0.0);
>   glVertex3f(0.0,1.0,0.0);
>  glEnd();
>
>  glFlush();
>}

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html