Is it possible to create a user interface for my game in Ogre3D by cutting 2D sprites in real time, like a scroll area?

Everything related to 3D programming
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 782
Joined: Fri Dec 04, 2015 9:26 pm

Is it possible to create a user interface for my game in Ogre3D by cutting 2D sprites in real time, like a scroll area?

Post by skinkairewalker »

Is there a way to 'cut' the sprite in real time within a specific area, like an interface window, so that the 'cut' sprite is displayed only inside the defined area? The idea is to create an interface for my 3d game and make a window, similar to a scroll area...

*Using Ogre3D + 2D Sprite
benubi
Enthusiast
Enthusiast
Posts: 220
Joined: Tue Mar 29, 2005 4:01 pm

Re: Is it possible to create a user interface for my game in Ogre3D by cutting 2D sprites in real time, like a scroll ar

Post by benubi »

You can use a ScrollArea3D with a big texture, or 2 ScrollBars around a Texture that you redraw.

I believe what you mean is "clipping" and not cutting (ClipSprite). If you use a ScrollArea3D it will do the clipping on the texture by itself. If you redraw the Texture with 2D drawing often it may cost you frames per second.
User avatar
skinkairewalker
Enthusiast
Enthusiast
Posts: 782
Joined: Fri Dec 04, 2015 9:26 pm

Re: Is it possible to create a user interface for my game in Ogre3D by cutting 2D sprites in real time, like a scroll ar

Post by skinkairewalker »

benubi wrote: Mon Oct 28, 2024 7:26 pm You can use a ScrollArea3D with a big texture, or 2 ScrollBars around a Texture that you redraw.

I believe what you mean is "clipping" and not cutting (ClipSprite). If you use a ScrollArea3D it will do the clipping on the texture by itself. If you redraw the Texture with 2D drawing often it may cost you frames per second.
wow awesome !
I'm trying to create my own interface, without using Gadgets3D, so Clipsprite gave me a good idea!
Thanks :)
Post Reply