Some 0.7.x Suggestions

Discussion regarding the development of CEGUI itself - as opposed to questions about CEGUI usage that should be in the help forums.

Moderators: CEGUI MVP, CEGUI Team

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Some 0.7.x Suggestions

Postby Jamarr » Fri Dec 05, 2008 16:51

Hey CE, sorry about the long post ^_^

I'm trying to learn about the 0.7.x (rendertarget-devel) development. I read somewhere (on the wiki?) that the OpenGL renderer is, for the most part, useable. Is this correct? Is this branch kept up to date with relevant changes (bug fixes, etc.) in the 0.6.x?

It seems that the new RenderTarget system was designed to improve rendering performance for CEGUI windows by taking advantage of extensions, while also offering custom rendering support for individual windows to add processing effects like shaders or what have you. Is this also correct?

Also, I was peeking at the source and I noticed that you've setup the OpenGL 'TextureTarget' such that it supports non-uniform texture sizes. What I mean by this, is that the width and height dimensions do not have to be equal. In the current 0.6.x branch, it seems like there was an assumption made about POT requirements also enforcing same size dimensions - but even though OpenGL 1.0 requires POT sizes the dimensions don't have to be the same?

In 0.6.x, both the CEGUI::Renderer interface and OpenGLTexture object still only support same-dimension texture sizes. Are you planning on updating this interface such that both height and width dimensions can be specified when creating textures? This seems like a good time to do so.

I also noticed that the OpenGL 'TextureTarget' also supports NPOT dimensions, but the OpenGLTexture object has not been updated with the same support. Are you planning on addressing this issue?

On that note, why even have the 'TextureTarget' use it's own code to create textures when there is already an OpenGLTexture object specifically for that purpose? It seems it would be easier/better to just update the OpenGLTexture object with these changes, and then have the 'TextureTarget' use an OpenGLTexture object to create/maintain the underlying texture.

I also noticed that you where not using GLEW to check for OpenGL extensions, but instead wrote your own couple of functions to do this. Are you taking GLEW back out? Or was this code written pre-GLEW and you just haven't got around to updating it?

I know it's still very much a work in progress, but I haven't seen these issues mentioned so I figured I would bring them up. I am very interested in this development branch and would like to see it keep moving forward.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Fri Dec 05, 2008 20:20

Hi :)

I'm trying to learn about the 0.7.x (rendertarget-devel) development. I read somewhere (on the wiki?) that the OpenGL renderer is, for the most part, useable. Is this correct? Is this branch kept up to date with relevant changes (bug fixes, etc.) in the 0.6.x?

The code in 'rendertarget-devel' will probably not be developed further and is effectively abandoned, although parts of what you see there will likely be reused in some form; during my work on that code - which was highly enlightening - I decided to go much further than what was effectively just caching window rendering to texture, so what you see there was no longer appropriate to the kind of changes I really wanted to make.

It seems that the new RenderTarget system was designed to improve rendering performance for CEGUI windows by taking advantage of extensions,

Yes, this is basically correct

while also offering custom rendering support for individual windows to add processing effects like shaders or what have you.

This kind of thing was basically missing from rendertarget-devel, and is part of the reason for it's abandonment.

With regards to all the GL texture limitations, that was largely one of CE's 'moments'. The rewrite will allow more flexibility as you'd expect. Some of the issues with the rendertarget-devel code are basically that the current renderer was hacked about rather than starting anew, which is why there's so much of the 'bad' bits of the older renderer model remain.

I also noticed that you where not using GLEW to check for OpenGL extensions, but instead wrote your own couple of functions to do this. Are you taking GLEW back out? Or was this code written pre-GLEW and you just haven't got around to updating it?

Yeah, that was written pre-GLEW. GLEW usage will be staying and will be used in the renderer rewrite extensively.


The current status of the renderer rewrites is that I have the rendertarget-devel code which I now consider a kind of proof of concept as far as rendering windows to textures go. I also have a bunch of test apps that I used as further proofs and tech-demos - things like 'wobbly windows', rotation support for windows and images, things of this nature. In the interim I also had issues where I was not happy with the complexity of all the layers of drawing within CEGUI, so decided that this could and should be addressed. Then I had a period where I basically couldn't do anything on CEGUI, so no progress was made at all on anything. I do have more time now, and as 0.6.2 is out, I intend to get down to the serious business of getting this renderer rewrite work done.

CE.

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Mon Dec 08, 2008 20:00

Just thought I'd add to what I wrote above, since I over the weekend I worked on my new design for the renderer rewrite a bit.

What I have now feels more correct and consistent given what the basic requirements are; things like multiple UI 'roots' are more properly taken into consideration - which was kind of gonna have to be fudged in rendertarget-devel. Aside from a couple of really minor things, I'm pretty happy with what I have now.

I've also changed my approach for how implementation will proceed; this time, rather than taking the existing renderer interface and implementations and re-working them for the new system, I'm effectively going to scrap the existing interfaces and start from scratch - we might end up with the same thing in the end, but if we do it will be because it was the right choice as opposed to because we were trying to make it fit with what went before. In addition, this time I'm strictly only going to work on one renderer (the OpenGL one) until that is 100% complete instead of trying to work on three at the same time (that's why it turned into a proof-of-concept, as I kept going off to see how I was going to do things in the other modules rather than concentrating on getting one right first). I'll reassure anyone reading this I do not intend to fundamentally change the way CEGUI operates from client code - while there will be some additions and some interface changes at the lower levels, the basic premise of things like Imagesets and Fonts will remain, and will work in much the same way. Unless you're currently doing something really hacky, probably the only change you might need to make is the way you construct the renderer initially.

Despite the amount of time I've taken to get around to this, and how I tend to 'big it up', this is not actually an immense amount of work, so with some fortune I should have something to show pretty soon (the core rewrite of the OpenGL parts will almost certainly be done by the new year at the latest).

CE.

Jamarr
CEGUI MVP
CEGUI MVP
Posts: 812
Joined: Tue Jun 03, 2008 23:59
Location: USA

Postby Jamarr » Tue Dec 09, 2008 00:56

Sounds good. Are you planning on creating, or is there already, a branch in svn that you are working from? Or are you planning to create a branch for it once the OpenGL renderer is complete? I'd like to see what you are concocting. ^_^

I was thinking of updating the 0.6.x OpenGL Renderer and Texture objects to make use a few extensions to squeeze out some more performance but if you'll have something by new years that'll be even better. Are you coding this yourself or do you have help? And is that how it usually goes?

User avatar
CrazyEddie
CEGUI Project Lead
Posts: 6760
Joined: Wed Jan 12, 2005 12:06
Location: England
Contact:

Postby CrazyEddie » Tue Dec 09, 2008 09:35

Are you planning on creating, or is there already, a branch in svn that you are working from? Or are you planning to create a branch for it once the OpenGL renderer is complete? I'd like to see what you are concocting. ^_^

This will almost certainly not be in a public svn repository until I have the OpenGL renderer pretty much complete. One reason for this is that for around 70% of the time the development will be outside of the rest of CEGUI, with CEGUI internals eventually being ported to use the new renderer (this is easier to write in this manner because it allows me to concentrate on one thing at a time. Otherwise I'd have to modify various levels of CEGUI just to get it to compile without errors). I do, obviously, understand the desire to see things as they come together :)

Are you coding this yourself or do you have help? And is that how it usually goes?

I am doing all the work on this myself. The way things usually work for these larger components is that someone takes on the job and they work on that in whichever manner they feel most comfortable with. Usually this eventually results in a new svn branch, such as we had for example with development of the falagard system, the window renderer system, and the aborted first attempt at render targets :)

I think the unveiling of the falagard system was something of a triumph; I'd been going on about that for ages before actually getting around to doing it too, and when it was finally done - while obviously not perfect - it went way beyond what most people were expecting. I'd like to think I can do the same kind of thing here too (nothing like putting pressure on yourself :lol: ).

CE.


Return to “CEGUI Library Development Discussion”

Who is online

Users browsing this forum: No registered users and 6 guests