PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

opengl ES + windows api ?

i'd like to make an application like that image... there are several buttons to control the scene, and the scene will be rendered with opengl es. i just want to know, is it POSSIBLE? i've heard that one can draw a full-screen scene only... :(
is there any graphic library that can draw a small scene like that? thanks
Attachments:
pda.jpg
matt99 wrote:is there any graphic library that can draw a small scene like that? thanks

I think so. Vincent for example really only requires the rendering target to be identified by a device context. You can use the viewport settings (glViewport) to clip the image to the correct size.

- HM
hm wrote:You can use the viewport settings (glViewport) to clip the image to the correct size.


yes, we can use glViewport, but Vincent uses the full screen anyway. so I can draw objects much smaller, but can't place radio buttons, check buttons, and so on. :( sad
[quote="matt99]yes, we can use glViewport, but Vincent uses the full screen anyway. so I can draw objects much smaller, but can't place radio buttons, check buttons, and so on. :( sad[/quote]

Can you render to a sub-window that is positioned to the correct location & size?

- HM
hm wrote:
Can you render to a sub-window that is positioned to the correct location & size?


i can't render to a sub-window yet. i'm trying to find a short cut with this :

http://www.khronos.org/devu/opengles_ch ... orials.zip

let opengl ES use a full-window, and i just added a simple button on that window. and it worked!!! but there are two loops - winmain and opengl... hmmm... can we control the opengl options with windows buttons? well i think i gotta try...
With the X50v hardware OpenGL implementation, using glViewport works well. In addition, the window to draw on does not need to be a fullscreen window. Note however, only when using a fullscreen window which has focus enables the OpenGL implementation to synchronize with vblank.
Also note, that writing to the same screen location with the native Windows API and OpenGL|ES does work with Vincent reasonable well, but not so with a hardware implementation. For instance with the Vincent test application (that little rotating car) the framerate counter, which is written by GDI over the OpenGL|ES surface may flicker on ther X50v.

Tala