2d images PLEASE HELP!!!!
-
- Posts: 25
- Joined: Mon Sep 27, 2010 6:51 pm
- Location: United Kingdom
2d images PLEASE HELP!!!!
hey everyone,
I have looked at the tutorials but im lost within the code!
I am trying to make a 2d image appear on my program screen.
I am using the following code:
driver->draw2DRectangle(video::SColor(0,255,0,0),
core::rect<s32>(100,20,200,40));
but it doesn't seem to work.
any advice/guidance or a perfect code sample on how to put a rectangle in my program would be great.
Thanks
I have looked at the tutorials but im lost within the code!
I am trying to make a 2d image appear on my program screen.
I am using the following code:
driver->draw2DRectangle(video::SColor(0,255,0,0),
core::rect<s32>(100,20,200,40));
but it doesn't seem to work.
any advice/guidance or a perfect code sample on how to put a rectangle in my program would be great.
Thanks
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
-
- Posts: 25
- Joined: Mon Sep 27, 2010 6:51 pm
- Location: United Kingdom
-
- Posts: 1215
- Joined: Tue Jan 09, 2007 7:03 pm
- Location: Leuven, Belgium
-
- Posts: 25
- Joined: Mon Sep 27, 2010 6:51 pm
- Location: United Kingdom
no worries, i have now got a square placed in my window
i started messing around with the numbers in here:
core::rect<s32>(100,390,210,440));
however i am now confused as to what each number does.
As i thought maybe the (1,2 were x and y
and 3,4)); were size
but this doesn't seem to be the case.
so what do they do??
thanks
i started messing around with the numbers in here:
core::rect<s32>(100,390,210,440));
however i am now confused as to what each number does.
As i thought maybe the (1,2 were x and y
and 3,4)); were size
but this doesn't seem to be the case.
so what do they do??
thanks
-
- Posts: 25
- Joined: Mon Sep 27, 2010 6:51 pm
- Location: United Kingdom
-
- Posts: 1186
- Joined: Fri Dec 29, 2006 12:04 am
Position and position + size. Have a look at the constructor: irr::core::rectonly1skingle wrote:no worries, i have now got a square placed in my window
i started messing around with the numbers in here:
core::rect<s32>(100,390,210,440));
however i am now confused as to what each number does.
As i thought maybe the (1,2 were x and y
and 3,4)); were size
but this doesn't seem to be the case.
so what do they do??
thanks
So a box with width 100 and height 10 at postion 10,1 would be like
Code: Select all
irr::core::rect<irr::s32>(10, 1, 10 + 100, 1 + 10)
Last edited by randomMesh on Mon Feb 14, 2011 5:40 pm, edited 1 time in total.
"Whoops..."
-
- Posts: 25
- Joined: Mon Sep 27, 2010 6:51 pm
- Location: United Kingdom
-
- Posts: 237
- Joined: Mon Jan 16, 2006 1:18 pm
- Location: Odessa,Russian Federation