rendering feature

If you found a bug in our library or on our website, please report it in this section. In this forum you can also make concrete suggestions or feature requests.

Moderators: CEGUI MVP, CEGUI Team

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

rendering feature

Postby lindquist » Fri Jan 28, 2005 19:27

It would be nice if you somehow had control over how the vertices were sent to the rendering API if applicable.

Fx. when using Ogre as the renderer, everything is translated into triangles... The diagonal between these triangles is currently fixed at top-left to bottom-right.

I would like to be able to control wether the diagonal is TL->BR or BL-TR.

The reason for this is that I'm trying to make a widget set that mainly uses a white image and instead creates the look by using colour-gradients.

These gradients are different with the two diagonal orientations.

It might be a little difficult to see the difference but it's the bright background that does it. Try viewing them on a black background or zoom alot :)

[img align=left]http://www.helix.dk/shots/gradient1.jpg[/img]

[img align=left]http://www.helix.dk/shots/gradient2.jpg[/img]

the first shot is from my current test...
the second is from my old homemade gui system. and I'd really like to keep the look while changing to CEGUI instead.

Writing a GUI from scratch is pretty hard, and my planning was not good enough.

From looking at the OgreRenderer source it seems that making the feature should be pretty straightforward. But I'm still very new to CEGUI, and I'm not sure which class should control it.

But I'm thinking something like:

Code: Select all

image->setTriangleDiagonalMode( TopLeftToBottomRight );

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

Re: rendering feature

Postby CrazyEddie » Sat Jan 29, 2005 08:32

Hi,

I must admit I couldn't see much difference in the images, I could see the gradient but they looked so similar :oops: That's probably just me so don't worry about that too much ;)

I'm not opposed to having a setting such as what you have suggested; it should definately go into the concrete renderer class(es). If you wait for me to do this, I can't give much of a time estimate (make a week or two?). If you (or anyone else) decides to submit a patch, that's cool, though I will request a minimum hit on performance please ;)

[Edit]
Having looked at your post again, I see you're suggesting something at the slightly higher Image level; which obviously allows control on a per-image basis. Again, I have no objections.

This would need either a setting, or more likely an extra parameter in the drawing methods, in the Imageset and Renderer classes. The Imageset loading / specification should also be extended to allow this option to be specified within the imageset <Image> elements. As we can see this is becoming a more wide ranging change.

CE.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: rendering feature

Postby lindquist » Sat Jan 29, 2005 14:21

Ok. I made a better screenshot where the difference is very clear.

[img align=left]http://www.helix.dk/shots/gradienttypes.jpg[/img]

I'll try making a patch for it...

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

Re: rendering feature

Postby CrazyEddie » Sat Jan 29, 2005 15:31

Yes, that is very clear, thanks :)

Let us know how things go trying to implement this; if things do not go well, I'll try and get this done for you by next weekend.

CE.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: rendering feature

Postby lindquist » Tue Feb 01, 2005 00:58

Hi again.
I have implemeted the feature. But I'm unsure of how to submit the patches.

How would you prefer ?

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

Re: rendering feature

Postby CrazyEddie » Tue Feb 01, 2005 09:14

Please add an item to the Patch Tracker. You can enter a description and upload the patch file there, and I'll take a look at it shortly; doing things this way means that I'll not forget about it :)

CE.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: rendering feature

Postby lindquist » Tue Feb 01, 2005 12:02

ok. I did a CVS update and then chose CVS->make patch

I hope this is right. I've never used CVS before this.

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

Re: rendering feature

Postby CrazyEddie » Tue Feb 01, 2005 13:27

Sounds like you did it right, though you seem to have forgotten to upload the file to the tracker ;)

You probably did everything except check the attach file box. You should be able to go back and attach this at any time.

HTH

CE.

User avatar
lindquist
CEGUI Team (Retired)
Posts: 770
Joined: Mon Jan 24, 2005 21:20
Location: Copenhagen, Denmark

Re: rendering feature

Postby lindquist » Tue Feb 01, 2005 20:10

:oops: ok. It should be up now...

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

Re: rendering feature

Postby CrazyEddie » Wed Feb 02, 2005 09:32

Okay thanks man :)

I've had a quick look over the changes and everything looks okay; I'll extend the renderer changes to the other renderers, do a bit of testing, and get it into CVS over the weekend.

CE.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 4 guests