Overlay Graphics

Has any one has any idea about overlaying 2D graphics over 3D world ? Please gimme what ever view you have. Very new to this. Donno how to proceed.
Jd :roll:

Depends on the platform & OpenGL ES implementation (and the type of overlay you are looking for). For example, with Vincent you can easily combine gl… calls with GDI calls, if you only flush and swap correctly (example is the car demo, which uses GDI to draw the frame rate).

Another possibility would be to render the 2D content to a bitmap that you would then render as texture using the 3D API.

Or you explicitly render the 3D content to a pixmap surface that you would then include using a 2D blt.

  • HM

This is for mobile device applications where in u need to draw some message boxes or menus on the 3d world.hardware is powervr mbx. Is there any hardware support to copy the 2d buffer on to the 3d buffer?

You should not mix 2D/GDI operations with 3D - this will hurt performance.

All good 3D apps which use 2D elements (i.e. the ‘HUD’, like your health and ammo counters etc in a game) do it using textured polygons - so it is rendered by the 3D hardware.

This means that ideally you generate 3D menus and message boxes… rather than use GDI calls. It’s more work but it will look better and run at high performance.


This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.