View Full Version : Windowing system and OGL|ES.
04-19-2005, 09:06 AM
Does anyone have experience implementing/porting OGL|ES on devices without a windowing system? What needs to be looked at when implementing OGL|ES for such systems?
04-20-2005, 01:05 PM
You'd start with your display formats I suppose. Somewhere you'll have some kind of screen memory or media interface that has a known size and format, perhaps even multiple supported formats.
EGL implementation would be simplified. You'll still need an EGL implementation with support for context creation etc but you won't have to glue it to any native windowing surface management I assume apart from full screen, but not much changes.
So you're going to start with implementing eglGetDisplay and eglInitialize. The initialize call is going to tell applications the screen size. Then you have a fullscreen window you want to create. So assuming you've looked at the supported display formats and decided which ones you want to implement a renderer for and which features (like z precision and stencil support) you will have an idea of the configs (see egl API). Your next step is support for eglCreateWindowSurface, now since you don't have a window handle I assume you will just ignore the native window handle and allocate your backbuffer, stencil, z etc and you're off to the races (makecurrent and render). eglSwapBuffers woud copy the backbuffer to the onscreen memory or you send it to the screen via the whatever supported media API there was with your platform.
The main issue is whether you make the app create some kind of window (even a full screen one) using the native APIs which you then sent in to egl or whether you build that into the egl function. I suppose technically you should use whatever native platform interface there is to actually create a full screen drawable and pass its OS specific handle to the eglCreateWindowSurface call and swap then copies (or sends) your backbuffer to that.
Some of this might seem like a pain to implement "why can't I just start issuing OpenGL calls?" but code ported to and from your platform will get display sizes and framebuffer formats in a consistent way across platforms without any OS specific code. There's also the need potentially for multiple contexts and rendering offscreen etc so the preamble will make code more portable and set you up for better long term feature support.
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.