Horde3D http://horde3d.org/forums/ |
|
Overlay Improvements http://horde3d.org/forums/viewtopic.php?f=8&t=1098 |
Page 1 of 1 |
Author: | marciano [ 10.02.2010, 01:34 ] |
Post subject: | Overlay Improvements |
The current overlay coordinate system which has coordinates in the range [0..1] on both axes does not work well with different aspect ratios which you have a lot these days (4:3, 16:9, 16:10). To avoid stretching of overlays and additional logic to compensate for that, I think we should have the the y-axis fixed (0..1) and the x-axis aspect ratio dependent with a range of [0..aspect ratio]. That way overlays can have a more intuitive size. The horde logo for example which uses a 256,128 resolution texture would always have twice the width compared to its height, independent of the screen resolution and aspect ratio. I would also propose to change the interface to reduce the number of function parameters and make the function more powerful: Code: void h3dShowOverlay( float *verts, int vertCount, float colR, float colG, float colB, float colA, H3DRes materialRes, int flags ) Flags could be PixelPerfect (for drawing pixel-accurate fonts), DrawLines (lines instead of quads, useful for performance graphs) and other goodies like using two corners to define a quad etc. The layers are gone in the the proposal and the submission order would be taken instead. For better performance, horde would automatically batch consecutive overlays that have the same material and flags. |
Author: | Orm [ 01.03.2010, 18:48 ] |
Post subject: | Re: Overlay Improvements |
I just want to throw in my two cents here, but I will offer the backend code of Mob2D under the LGPL to help accomplish this. It is very efficient at rendering 2D elements, and can even animate them if the definitions are set properly, and I am sure could be even better. I am still constantly making improvements to it myself to act as a standalone engine, but I think it could provide a huge boost to Horde's 2D rendering abilities. |
Author: | DragonRift [ 19.03.2010, 08:12 ] |
Post subject: | Re: Overlay Improvements |
I have personally liked how agar lib handles the windows, maybe something can be built based off this in order to add support for powerful gui libraries like libagar ( http://libagar.org/index.html ) |
Author: | marciano [ 08.04.2010, 20:17 ] |
Post subject: | Re: Overlay Improvements |
The new overlay function (called h3dShowOverlays), including the changes to the coordinate system, is in the trunk now. It should be quite a bit more efficient as it does not use immediate mode any more and tries to batch together overlay drawcalls. |
Author: | anchor [ 25.09.2011, 17:44 ] |
Post subject: | Re: Overlay Improvements |
Hello! I tried to add a rotation parameter to the overlay drawing. But the glRotate is ignored. I touched the Renderer::drawOverlays() function, before the glBegin/glEnd section. How can I rotate the modelview matrix? |
Author: | Volker [ 25.09.2011, 20:58 ] |
Post subject: | Re: Overlay Improvements |
You are using fixed function pipeline commands. Those are not supported by Horde3D. You have to rotate the overlays in the shader. |
Author: | anchor [ 01.10.2011, 11:47 ] |
Post subject: | Re: Overlay Improvements |
Thank You! Can You tell me, how can I do it? |
Author: | marciano [ 03.10.2011, 21:14 ] |
Post subject: | Re: Overlay Improvements |
Does this thread help you? http://www.horde3d.org/forums/viewtopic.php?f=2&t=489 |
Author: | anchor [ 04.10.2011, 19:02 ] |
Post subject: | Re: Overlay Improvements |
Yes, thank You But this solution is not the fastest... I tried to make it with the gpu. I hope once You will implement it into the engine |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |