From: ehofman Date: Sun, 27 Nov 2005 09:46:58 +0000 (+0000) Subject: Initialize glut before using it. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=577dfa4f54665b1de54e8c9c83169474d025c587;p=simgear.git Initialize glut before using it. --- diff --git a/simgear/screen/RenderTexture.cpp b/simgear/screen/RenderTexture.cpp index f27813f9..f45234c7 100644 --- a/simgear/screen/RenderTexture.cpp +++ b/simgear/screen/RenderTexture.cpp @@ -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; diff --git a/simgear/screen/TestRenderTexture.cpp b/simgear/screen/TestRenderTexture.cpp index 8b018cb8..2f2d1cf9 100644 --- a/simgear/screen/TestRenderTexture.cpp +++ b/simgear/screen/TestRenderTexture.cpp @@ -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);