Implemented OpenGL support on Mac OS X

The OpenGL renderer works without changes, yay! :)
This commit is contained in:
Sam Lantinga
2006-07-25 06:22:42 +00:00
parent d3f4c37f08
commit bcbb41b25f
16 changed files with 528 additions and 214 deletions

View File

@@ -171,7 +171,6 @@ extern DECLSPEC void SDLCALL SDL_UnlockYUVOverlay(SDL_Overlay * overlay);
extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay(SDL_Overlay * overlay,
SDL_Rect * dstrect);
extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay * overlay);
extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
extern DECLSPEC void SDLCALL SDL_GL_SwapBuffers(void);
/* Ends C function definitions when using C++ */

View File

@@ -1444,6 +1444,10 @@ extern DECLSPEC int SDLCALL SDL_SoftStretch(SDL_Surface * src,
*
* \return 0 on success, or -1 if the library couldn't be loaded
*
* This should be done after initializing the video driver, but before
* creating any OpenGL windows. If no OpenGL library is loaded, the default
* library will be loaded upon creation of the first OpenGL window.
*
* \note If you do this, you need to retrieve all of the GL functions used in
* your program from the dynamic library using SDL_GL_GetProcAddress().
*
@@ -1476,11 +1480,9 @@ extern DECLSPEC int SDLCALL SDL_GL_SetAttribute(SDL_GLattr attr, int value);
/**
* \fn int SDL_GL_GetWindowAttribute(SDL_WindowID windowID, SDL_GLattr attr, int *value)
*
* \brief Get the actual value for an OpenGL window attribute.
* \brief Get the actual value for an attribute from the current context.
*/
extern DECLSPEC int SDLCALL SDL_GL_GetWindowAttribute(SDL_WindowID windowID,
SDL_GLattr attr,
int *value);
extern DECLSPEC int SDLCALL SDL_GL_GetAttribute(SDL_GLattr attr, int *value);
/**
* \fn SDL_GLContext SDL_GL_CreateContext(SDL_WindowID windowID)