Daryl
07-15-2004, 06:12 AM
I am just getting started with OpenGL and need to get the "Hello World" program running.
I have just downloaded the MESA implementation and have no problems running the demos with VS 6.0 on Windows XP. But I want to "start from scratch" so I will understand what's going on. To do this, I want to create a new project from scratch in its own workspace, unassisted by the MESA demos.
I've copied MESA's include\GL folder to the VC98\Include\GL folder, the MESA lib folder to the VC98 lib folder, and put the DLLs in Windows\System32. I've added OpenGL32.lib, glu32.lib, and glut32.lib to Visual Studio's Project->Settings->Link->Object/Library list. The following program compiles with no errors or warnings, but when I execute it, I get a "failed to create OpenGL rendering context" error in the console output.
Any help getting past this will be gratefully appreciated.
#include <gl/glut.h>
void main(int argc, char **argv) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_SINGLE | GLUT_RGBA);
glutInitWindowPosition(100,100);
glutInitWindowSize(320,320);
glutCreateWindow("3D Tech- GLUT Tutorial");
}
I have just downloaded the MESA implementation and have no problems running the demos with VS 6.0 on Windows XP. But I want to "start from scratch" so I will understand what's going on. To do this, I want to create a new project from scratch in its own workspace, unassisted by the MESA demos.
I've copied MESA's include\GL folder to the VC98\Include\GL folder, the MESA lib folder to the VC98 lib folder, and put the DLLs in Windows\System32. I've added OpenGL32.lib, glu32.lib, and glut32.lib to Visual Studio's Project->Settings->Link->Object/Library list. The following program compiles with no errors or warnings, but when I execute it, I get a "failed to create OpenGL rendering context" error in the console output.
Any help getting past this will be gratefully appreciated.
#include <gl/glut.h>
void main(int argc, char **argv) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_DEPTH | GLUT_SINGLE | GLUT_RGBA);
glutInitWindowPosition(100,100);
glutInitWindowSize(320,320);
glutCreateWindow("3D Tech- GLUT Tutorial");
}