I am opengl beginner. I set the DLLs, Library, Header but, error occurred. My development environment is win7 ( 64bit ).
For reference - DLLs : C:\Windows\System32, C:\Windows\SysWOW64 // glu32.dll, glut.dll, glut32.dll, opengl32.dll
Libs : C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib, C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib // glut.lib, glut32.lib
Header : C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\gl, C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\gl // GL.H, GLAUX.H, GLU.H, glut.h
#include <Windows.h>
#include <gl/glut.H>
void DoDisplay ( void )
{
glClearColor ( 0.0f, 0.0f, 1.0f, 1.0f );
glClear( GL_COLOR_BUFFER_BIT );
glBegin ( GL_TRIANGLES );
glVertex2f ( 0.0, 0.5 );
glVertex2f ( -0.5, -0.5 );
glVertex2f ( 0.5, -0.5 );
glEnd ();
glFlush ();
}
int main ( int argc, char ** argv )
{
glutInit ( &argc, argv );
glutInitDisplayMode ( GLUT_RGB | GLUT_DOUBLE );
glutInitWindowSize ( 300, 300 );
glutInitWindowPosition ( 0, 0 );
glutCreateWindow ( "OpenGL" );
glutDisplayFunc ( DoDisplay );
glutMainLoop ();
return 0;
}
Edit :
White Window : http://i.stack.imgur.com/9GJoN.jpg
This code is simply output the white triangle.
Win32 Project -> Console Project.
Problem not solved.. sorry.
Error is http://i.stack.imgur.com/9GJoN.jpg
glutInit(), missingglBegin()and some other problems, you're going to have to be more specific with what the problem is and what you are actually trying to do. - PeterT