| | |
| | | } |
| | | |
| | | /* Passing a NULL path means load pointers from the application */ |
| | | int BE_GL_LoadLibrary(_THIS, const char *path) |
| | | int HAIKU_GL_LoadLibrary(_THIS, const char *path) |
| | | { |
| | | /* FIXME: Is this working correctly? */ |
| | | image_info info; |
| | |
| | | return 0; |
| | | } |
| | | |
| | | void *BE_GL_GetProcAddress(_THIS, const char *proc) |
| | | void *HAIKU_GL_GetProcAddress(_THIS, const char *proc) |
| | | { |
| | | if (_this->gl_config.dll_handle != NULL) { |
| | | void *location = NULL; |
| | |
| | | |
| | | |
| | | |
| | | int BE_GL_SwapWindow(_THIS, SDL_Window * window) { |
| | | int HAIKU_GL_SwapWindow(_THIS, SDL_Window * window) { |
| | | _ToBeWin(window)->SwapBuffers(); |
| | | return 0; |
| | | } |
| | | |
| | | int BE_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) { |
| | | int HAIKU_GL_MakeCurrent(_THIS, SDL_Window * window, SDL_GLContext context) { |
| | | SDL_BWin* win = (SDL_BWin*)context; |
| | | _GetBeApp()->SetCurrentContext(win ? win->GetGLView() : NULL); |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | SDL_GLContext BE_GL_CreateContext(_THIS, SDL_Window * window) { |
| | | SDL_GLContext HAIKU_GL_CreateContext(_THIS, SDL_Window * window) { |
| | | /* FIXME: Not sure what flags should be included here; may want to have |
| | | most of them */ |
| | | SDL_BWin *bwin = _ToBeWin(window); |
| | |
| | | return (SDL_GLContext)(bwin); |
| | | } |
| | | |
| | | void BE_GL_DeleteContext(_THIS, SDL_GLContext context) { |
| | | void HAIKU_GL_DeleteContext(_THIS, SDL_GLContext context) { |
| | | /* Currently, automatically unlocks the view */ |
| | | ((SDL_BWin*)context)->RemoveGLView(); |
| | | } |
| | | |
| | | |
| | | int BE_GL_SetSwapInterval(_THIS, int interval) { |
| | | int HAIKU_GL_SetSwapInterval(_THIS, int interval) { |
| | | /* TODO: Implement this, if necessary? */ |
| | | return SDL_Unsupported(); |
| | | } |
| | | |
| | | int BE_GL_GetSwapInterval(_THIS) { |
| | | int HAIKU_GL_GetSwapInterval(_THIS) { |
| | | /* TODO: Implement this, if necessary? */ |
| | | return 0; |
| | | } |
| | | |
| | | |
| | | void BE_GL_UnloadLibrary(_THIS) { |
| | | void HAIKU_GL_UnloadLibrary(_THIS) { |
| | | /* TODO: Implement this, if necessary? */ |
| | | } |
| | | |
| | |
| | | /* FIXME: This function is meant to clear the OpenGL context when the video |
| | | mode changes (see SDL_bmodes.cc), but it doesn't seem to help, and is not |
| | | currently in use. */ |
| | | void BE_GL_RebootContexts(_THIS) { |
| | | void HAIKU_GL_RebootContexts(_THIS) { |
| | | SDL_Window *window = _this->windows; |
| | | while(window) { |
| | | SDL_BWin *bwin = _ToBeWin(window); |