Point list to renderer class

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
alipolatolu
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06
Location: Turkey
Contact:

Point list to renderer class

Postby alipolatolu » Thu May 13, 2004 09:06

Hi,

I have a suggestion. You know that i need to develop shapes different from quad. This feature must be in renderer class.

I think you can add a function to the renderer class that we can give point arrays :) When we called this function, and give a point list, It can generate the shape of this points and adds this shape to queue :)

Am I right? By this function, I (and every user of this system) can make customized shapes easily by making my own functions. For example, if I want a rounded Rectangle, I can create a RoundRect function that returns pointlist.

What do you think about this?

Thanks,

Polat

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

Point list to renderer class

Postby CrazyEddie » Thu May 13, 2004 12:21

What you suggest is obviously theoretically possible, though the points would need to be properly validated and split into some supported geometry type (triangle strip, or whatever).

Another thing is how the resulting geometry would be textured. Since (at the window rendering level of abstraction) the system has no notion of a texture as such, but rather a collection of separate sprites or images. So you would need to expose the underlying texture. At this point you are dealing with raw geometry and textures - so you may as well do this directly and talk to the underlying API or engine.

In addition to the above, there would also be issues related to (but probably not limited to) hit-detection and clipping. If all images and controls are no longer quads, then you have to modify the system to be able to work with arbitrary geometry - which while not impossible, would most likely involve re-working large chunks of the system (for clipping you could no longer simply grab a Rect for the window, you'd have to ask for "the clipper" which would potentially be much more complicated, and to perform the actual clipping, what is currently a simple two-rect intersection calculation becomes a potentially complex masking operation).

I do not discount the possibility that such things will be added to the system, but I will say that if I, personally, undertook such a task it, would be way off in the distant future ;) However, if you or somebody else were to create such a modification - feel free to submit a patch as I'm always more than willing to look at contributed modifications to the system :D

User avatar
alipolatolu
Just popping in
Just popping in
Posts: 14
Joined: Wed Jan 12, 2005 12:06
Location: Turkey
Contact:

Point list to renderer class

Postby alipolatolu » Thu May 13, 2004 13:21

Yep, don't worry about this ;) I will share things that I added to this system. I will develop some new Widgets (like toolbar, menu, status bar, etc.). and I will also post them to you. In my plans there is a DXSound App to add this system for playing music.

I'm developing a Smart Home (Intelligent Homes) system, and this GUI is a part of this system :D We are developing radio controlled home devices.

Thank you for answer, I think i will continue in the same way :roll:

Polat

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

Point list to renderer class

Postby CrazyEddie » Thu May 13, 2004 17:18

I will develop some new Widgets (like toolbar, menu, status bar, etc.). and I will also post them to you.

Cool :D

I'm developing a Smart Home (Intelligent Homes) system, and this GUI is a part of this system :D We are developing radio controlled home devices.

Sounds interesting. Amazing the number of uses for the GUI system which I never considered. :)

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

Point list to renderer class

Postby CrazyEddie » Thu Jun 03, 2004 17:27

Using a whole image for a Gui component is pretty simple. It's really a case of (almost) anything goes.

The hit detection function is a virtual member which allows any Gui element to use any means of hit-detection it likes. All of the base stuff that's been written so far uses the simplest method of testing a given point is within a Rect. Using bitmapped masks and what have you is certainly a possibility for complex shapes, though the system has no built-in support for this (at the moment anyway), so the widget designer would have to watch to see what scaling to apply before doing the test.


Return to “Bug Reports, Suggestions, Feature Requests”

Who is online

Users browsing this forum: No registered users and 2 guests