Update of /cvsroot/java-game-lib/LWJGL/src/native/macosx
In directory sc8-pr-cvs1:/tmp/cvs-serv14680/src/native/macosx
Modified Files:
RenderingContext.h RenderingContext.cpp
Log Message:
Moved typedefs into extgl.h so that OpenGL symbols not multiply defined - removes 650 warnings. Removed all imports of agl.h and gl.h. Removed OpenGL.framework from the project
Index: RenderingContext.h
CVS Browser:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/RenderingContext.h
===================================================================
RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/RenderingContext.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- RenderingContext.h 1 Jan 2003 03:58:03 -0000 1.3
+++ RenderingContext.h 1 Jan 2003 23:05:26 -0000 1.4
@@ -42,9 +42,10 @@
#ifndef _RENDERING_CONTEXT_H
#define _RENDERING_CONTEXT_H
+#define _OSX
#include "extgl.h"
+//#include <OpenGL/glext.h>
#include <Carbon/Carbon.h>
-#include <AGL/agl.h>
class RenderingContext
{
Index: RenderingContext.cpp
CVS Browser:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/java-game-lib/LWJGL/src/native/macosx/RenderingContext.cpp
===================================================================
RCS file: /cvsroot/java-game-lib/LWJGL/src/native/macosx/RenderingContext.cpp,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- RenderingContext.cpp 1 Jan 2003 03:58:03 -0000 1.3
+++ RenderingContext.cpp 1 Jan 2003 23:05:26 -0000 1.4
@@ -69,10 +69,13 @@
{
// cleanup the AGL context
//
+
aglSetCurrentContext(NULL);
+ /*
aglSetDrawable(aglContext, NULL);
aglDestroyContext(aglContext);
-
+ */
+
// cleanup the window
//
DisposeWindow( windowPtr );
@@ -80,6 +83,7 @@
bool RenderingContext::createGL( int colorBits, int alphaBits, int depthBits, int stencilBits )
{
+ /*
AGLPixelFormat fmt;
GLboolean ok;
GLint attrib[] = { AGL_RGBA, AGL_NONE };
@@ -91,28 +95,32 @@
return false;
}
- /* Choose an rgb pixel format */
+ // Choose an rgb pixel format
+ //
fmt = aglChoosePixelFormat(NULL, 0, attrib);
if(fmt == NULL)
{
return false;
}
- /* Create an AGL context */
+ // Create an AGL context
+ //
aglContext = aglCreateContext(fmt, NULL);
if( aglContext == NULL)
{
return false;
}
- /* Attach the window to the context */
+ // Attach the window to the context
+ //
ok = aglSetDrawable(aglContext, GetWindowPort(windowPtr) );
if(!ok)
{
return false;
}
- /* Make the context the current context */
+ // Make the context the current context
+ //
ok = aglSetCurrentContext(aglContext);
if(!ok)
{
@@ -125,7 +133,8 @@
return false;
}
- /* Pixel format is no longer needed */
+ // Pixel format is no longer needed
+ //
aglDestroyPixelFormat(fmt);
#ifdef _DEBUG
@@ -138,8 +147,8 @@
{
printf("Available extensions:\n%s\n", p);
}
-#endif /* DEBUG */
-
+#endif
+*/
return true;
}
@@ -152,7 +161,7 @@
// destroy the context
//
- aglDestroyContext( aglContext );
+ //aglDestroyContext( aglContext );
// close the gl extension context
//
@@ -163,21 +172,21 @@
{
// swap the rendering buffer
//
- aglSwapBuffers( aglContext );
+ //aglSwapBuffers( aglContext );
}
void RenderingContext::makeContextCurrent()
{
// make the current context the one we have stored
//
- aglSetCurrentContext( aglContext );
+ //aglSetCurrentContext( aglContext );
}
void RenderingContext::releaseContext()
{
// release the context
//
- aglSetCurrentContext( NULL );
+ // aglSetCurrentContext( NULL );
}
RenderingContext::~RenderingContext()
|