Mercurial > sdl-ios-xcode
comparison src/video/bwindow/SDL_BWin.h @ 906:a48acf6ee48f
Date: Sat, 03 Jul 2004 02:23:48 +0200
From: Marcin Konicki
Subject: [PATCH] Add missing functions and bring back OpenGL
This patch adds missing functions:
IconifyWindow
GetWMInfo
GL_LoadLibrary
GL_GetProcAddress
GL_GetAttribute
GL_MakeCurrent
Adding GL_* functions brings back working OpenGL in SDL for BeOS :).
With addd GL_* functions there are few changes in Window class to handle
changes better.
Patch also fixes bug which freezed window when using MesaGL instead of
BeOS r5 GL - it just needed Window->Quit() added into BE_VideoQuit().
THX to Michael Weirauch (a.k.a emwe) who worked on that bug before and
found that it freezes because of lock somewhere.
THX to Matti "Mictlantecuhtli" Lev��nen for testing, Rod��ric Vicaire
(a.k.a. Ingenu) for OpenGL wisdom, and Stefano Ceccherini (a.k.a Jack
Burton) for asking me to fix SDL on BeOS :).
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 18 Jul 2004 19:14:33 +0000 |
parents | b8d311d90021 |
children | 3bd4d7a1ee04 |
comparison
equal
deleted
inserted
replaced
905:e6ceebb0f0eb | 906:a48acf6ee48f |
---|---|
97 if(inhibit_resize) | 97 if(inhibit_resize) |
98 inhibit_resize = false; | 98 inhibit_resize = false; |
99 else | 99 else |
100 SDL_PrivateResize((int)width, (int)height); | 100 SDL_PrivateResize((int)width, (int)height); |
101 } | 101 } |
102 virtual int CreateView(Uint32 flags) { | 102 virtual int CreateView(Uint32 flags, Uint32 gl_flags) { |
103 int retval; | 103 int retval; |
104 | 104 |
105 retval = 0; | 105 retval = 0; |
106 Lock(); | 106 Lock(); |
107 if ( flags & SDL_OPENGL ) { | 107 if ( flags & SDL_OPENGL ) { |
108 #ifdef HAVE_OPENGL | 108 #ifdef HAVE_OPENGL |
109 if ( SDL_GLView == NULL ) { | 109 if ( SDL_GLView == NULL ) { |
110 /* FIXME: choose BGL type via user flags */ | |
111 SDL_GLView = new BGLView(Bounds(), "SDL GLView", | 110 SDL_GLView = new BGLView(Bounds(), "SDL GLView", |
112 B_FOLLOW_ALL_SIDES, | 111 B_FOLLOW_ALL_SIDES, (B_WILL_DRAW|B_FRAME_EVENTS), |
113 (B_WILL_DRAW|B_FRAME_EVENTS), | 112 gl_flags); |
114 (BGL_RGB|BGL_DOUBLE|BGL_DEPTH)); | |
115 } | 113 } |
116 if ( the_view != SDL_GLView ) { | 114 if ( the_view != SDL_GLView ) { |
117 if ( the_view ) { | 115 if ( the_view ) { |
118 RemoveChild(the_view); | 116 RemoveChild(the_view); |
119 } | 117 } |
205 */ | 203 */ |
206 return(false); | 204 return(false); |
207 } | 205 } |
208 return(true); /* Close the app window */ | 206 return(true); /* Close the app window */ |
209 } | 207 } |
208 virtual void Quit() { | |
209 if (!IsLocked()) | |
210 Lock(); | |
211 BDirectWindow::Quit(); | |
212 } | |
210 | 213 |
211 private: | 214 private: |
212 #ifdef HAVE_OPENGL | 215 #ifdef HAVE_OPENGL |
213 BGLView *SDL_GLView; | 216 BGLView *SDL_GLView; |
214 #endif | 217 #endif |