Gorilla - How can you draw 2D Sprites

Problems building or running the engine, queries about how to use features etc.
Post Reply
PucklaMotzer09
Gnoblar
Posts: 8
Joined: Thu Sep 22, 2016 8:38 pm

Gorilla - How can you draw 2D Sprites

Post by PucklaMotzer09 »

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.
User avatar
devxkh
Halfling
Posts: 84
Joined: Tue Aug 02, 2016 6:07 pm
Location: Germany
x 12

Re: Gorilla - How can you draw 2D Sprites

Post by devxkh »

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 :) .

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
PucklaMotzer09
Gnoblar
Posts: 8
Joined: Thu Sep 22, 2016 8:38 pm

Re: Gorilla - How can you draw 2D Sprites

Post by PucklaMotzer09 »

Thank You
I thought it works like that, but I didn't know it very well.
Post Reply