----- Original Message -----
Sent: Saturday, May 06, 2000 4:21
PM
Subject: More help for an OpenGl
Beginner.
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();
}