Initialize glut before using it.
This commit is contained in:
parent
66075d620e
commit
577dfa4f54
@ -1,4 +1,4 @@
|
|||||||
//---------------------------------------------------------------------------
|
reateContext//
|
||||||
// File : RenderTexture.cpp
|
// File : RenderTexture.cpp
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2004 Mark J. Harris
|
// Copyright (c) 2002-2004 Mark J. Harris
|
||||||
@ -494,7 +494,7 @@ bool RenderTexture::Initialize(int width, int height,
|
|||||||
|
|
||||||
_hGLContext = glXCreateContextPtr(_pDisplay, visInfo,
|
_hGLContext = glXCreateContextPtr(_pDisplay, visInfo,
|
||||||
_bShareObjects ? context : NULL,
|
_bShareObjects ? context : NULL,
|
||||||
GL_TRUE);
|
True);
|
||||||
if (!_hGLContext)
|
if (!_hGLContext)
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
|
@ -305,8 +305,10 @@ void _Display()
|
|||||||
// Function : main
|
// Function : main
|
||||||
// Description :
|
// Description :
|
||||||
//---------------------------------------------------------------------------
|
//---------------------------------------------------------------------------
|
||||||
int main()
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
int argn = argc;
|
||||||
|
glutInit(&argn, argv);
|
||||||
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
glutInitDisplayMode(GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE);
|
||||||
glutInitWindowPosition(50, 50);
|
glutInitWindowPosition(50, 50);
|
||||||
glutInitWindowSize(512, 512);
|
glutInitWindowSize(512, 512);
|
||||||
|
Loading…
Reference in New Issue
Block a user