Initialize glut before using it.

This commit is contained in:
ehofman 2005-11-27 09:46:58 +00:00
parent 66075d620e
commit 577dfa4f54
2 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,4 @@
//---------------------------------------------------------------------------
reateContext//
// File : RenderTexture.cpp
//---------------------------------------------------------------------------
// Copyright (c) 2002-2004 Mark J. Harris
@ -494,7 +494,7 @@ bool RenderTexture::Initialize(int width, int height,
_hGLContext = glXCreateContextPtr(_pDisplay, visInfo,
_bShareObjects ? context : NULL,
GL_TRUE);
True);
if (!_hGLContext)
{
return false;

View File

@ -305,8 +305,10 @@ void _Display()
// Function : main
// Description :
//---------------------------------------------------------------------------
int main()
int main(int argc, char *argv[])
{
int argn = argc;
glutInit(&argn, argv);
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
glutInitWindowPosition(50, 50);
glutInitWindowSize(512, 512);