Hello
I am very new to Ogre and wanted to use Gorilla. Everything worked fine, but I don't know how to draw a Sprite. The examples only show Text, but no textures.
Can someone please show me a example on how to draw Sprites.
I would appreciate any help.
Gorilla - How can you draw 2D Sprites
-
- Gnoblar
- Posts: 8
- Joined: Thu Sep 22, 2016 8:38 pm
- devxkh
- Halfling
- Posts: 84
- Joined: Tue Aug 02, 2016 6:07 pm
- Location: Germany
- x 12
Re: Gorilla - How can you draw 2D Sprites
https://github.com/betajaen/gorilla/tre ... r/examples
You just draw shapes like rectangles for example and fill them with the image from the atlas .
You just draw shapes like rectangles for example and fill them with the image from the atlas .
Code: Select all
mCrosshair = mCrosshairLayer->createRectangle((mViewport->getActualWidth() * 0.5f) - 11, (mViewport->getActualHeight() * 0.5f) - 11, 22, 22);
mCrosshair->background_image("crosshair");
My little OGRE engine -> FrankE WIP
-
- Gnoblar
- Posts: 8
- Joined: Thu Sep 22, 2016 8:38 pm
Re: Gorilla - How can you draw 2D Sprites
Thank You
I thought it works like that, but I didn't know it very well.
I thought it works like that, but I didn't know it very well.