Mercurial > sdl-ios-xcode
comparison src/video/directfb/SDL_DirectFB_opengl.c @ 3023:d72a0dd80e8b
DirectFB cleanups & simple window manager
- use SDL_getenv, not getenv ...
- no more support for 0.9.25 - not even mentioned any longer on directfb.org
- fix fullscreen issues
- add a simple window manager unless the directfb team comes up with a working wm.
The driver has support for a very, very basic window manager you may
want to use when runnning with "wm=default". Use
export SDL_DIRECTFB_WM=1
to enable basic window borders including icon support. In order to have the window title rendered,
you need to have the following font installed:
/usr/share/fonts/truetype/freefont/FreeSans.ttf
author | Couriersud <couriersud@arcor.de> |
---|---|
date | Sun, 11 Jan 2009 23:49:23 +0000 |
parents | 8cc00819c8d6 |
children | f7b03b6838cb |
comparison
equal
deleted
inserted
replaced
3022:db20dde98dd3 | 3023:d72a0dd80e8b |
---|---|
171 DirectFB_GLContext *context; | 171 DirectFB_GLContext *context; |
172 int ret; | 172 int ret; |
173 | 173 |
174 SDL_DFB_CALLOC(context, 1, sizeof(*context)); | 174 SDL_DFB_CALLOC(context, 1, sizeof(*context)); |
175 | 175 |
176 SDL_DFB_CHECKERR(windata->surface-> | 176 SDL_DFB_CHECKERR(windata->surface->GetGL(windata->surface, |
177 GetGL(windata->surface, &context->context)); | 177 &context->context)); |
178 | 178 |
179 if (!context->context) | 179 if (!context->context) |
180 return NULL; | 180 return NULL; |
181 | 181 |
182 SDL_DFB_CHECKERR(context->context->Unlock(context->context)); | 182 SDL_DFB_CHECKERR(context->context->Unlock(context->context)); |
206 | 206 |
207 for (p = _this->gl_data->firstgl; p; p = p->next) | 207 for (p = _this->gl_data->firstgl; p; p = p->next) |
208 p->context->Unlock(p->context); | 208 p->context->Unlock(p->context); |
209 | 209 |
210 if (windata) { | 210 if (windata) { |
211 int cw, ch; | |
212 | |
213 windata->gl_context = NULL; | 211 windata->gl_context = NULL; |
214 /* Everything is unlocked, check for a resize */ | 212 /* Everything is unlocked, check for a resize */ |
215 SDL_DFB_CHECKERR(windata->surface-> | 213 DirectFB_AdjustWindowSurface(window); |
216 GetSize(windata->surface, &cw, &ch)); | |
217 if (cw != window->w || ch != window->h) | |
218 SDL_DFB_CHECKERR(windata->window-> | |
219 ResizeSurface(windata->window, window->w, | |
220 window->h)); | |
221 } | 214 } |
222 | 215 |
223 if (ctx != NULL) { | 216 if (ctx != NULL) { |
224 SDL_DFB_CHECKERR(ctx->context->Lock(ctx->context)); | 217 SDL_DFB_CHECKERR(ctx->context->Lock(ctx->context)); |
225 } | 218 } |
264 else if (devdata->glFlush) | 257 else if (devdata->glFlush) |
265 devdata->glFlush(); | 258 devdata->glFlush(); |
266 | 259 |
267 if (1 || windata->gl_context) { | 260 if (1 || windata->gl_context) { |
268 /* SDL_DFB_CHECKERR(windata->gl_context->context->Unlock(windata->gl_context->context)); */ | 261 /* SDL_DFB_CHECKERR(windata->gl_context->context->Unlock(windata->gl_context->context)); */ |
269 SDL_DFB_CHECKERR(windata->surface-> | 262 SDL_DFB_CHECKERR(windata->surface->Flip(windata->surface, ®ion, |
270 Flip(windata->surface, ®ion, DSFLIP_ONSYNC)); | 263 DSFLIP_ONSYNC)); |
271 /* SDL_DFB_CHECKERR(windata->gl_context->context->Lock(windata->gl_context->context)); */ | 264 /* SDL_DFB_CHECKERR(windata->gl_context->context->Lock(windata->gl_context->context)); */ |
272 | 265 |
273 } | 266 } |
274 | 267 |
275 return; | 268 return; |