21 #include "../../SDL_internal.h" 23 #if SDL_VIDEO_DRIVER_HAIKU && SDL_VIDEO_OPENGL 28 #include <KernelKit.h> 29 #include <OpenGLKit.h> 31 #include "../../main/haiku/SDL_BApp.h" 47 int BE_GL_LoadLibrary(
_THIS,
const char *
path)
52 while (get_next_image_info(0, &cookie, &info) == B_OK) {
54 if( get_image_symbol(info.id,
"glBegin", B_SYMBOL_TYPE_ANY,
66 void *BE_GL_GetProcAddress(
_THIS,
const char *proc)
69 void *location =
NULL;
73 proc, B_SYMBOL_TYPE_ANY,
74 &location)) == B_OK) {
90 _ToBeWin(window)->SwapBuffers();
96 _GetBeApp()->SetCurrentContext(win ? win->
GetGLView() :
NULL);
105 Uint32 gl_flags = BGL_RGB;
107 gl_flags |= BGL_ALPHA;
110 gl_flags |= BGL_DEPTH;
113 gl_flags |= BGL_STENCIL;
116 gl_flags |= BGL_DOUBLE;
118 gl_flags |= BGL_SINGLE;
124 gl_flags |= BGL_ACCUM;
132 ((
SDL_BWin*)context)->RemoveGLView();
136 int BE_GL_SetSwapInterval(
_THIS,
int interval) {
141 int BE_GL_GetSwapInterval(
_THIS) {
147 void BE_GL_UnloadLibrary(
_THIS) {
155 void BE_GL_RebootContexts(
_THIS) {
163 bwin->UnlockLooper();
165 window = window->
next;
static screen_context_t context
static SDL_VideoDevice * _this
void * SDL_GLContext
An opaque handle to an OpenGL context.
virtual void RemoveGLView()
EGLSurface EGLNativeWindowType * window
The type used to identify a window.
virtual BGLView * CreateGLView(Uint32 gl_flags)
#define SDL_arraysize(array)
GLsizei const GLchar *const * path
struct SDL_VideoDevice::@34 gl_config
#define SDL_Unsupported()