How to make a gradient on the background color
How to make a gradient on the background color
Is possible to produce a background gradient on the scene ?
I don`t know have any idea to do.
I don`t know have any idea to do.
-
- Competition winner
- Posts: 189
- Joined: Tue Oct 16, 2007 3:53 am
- Location: Indonesia
- Contact:
make that background on adobe or what ever tools u have. use the
put this code before the smgr->drawAll();
ofcourse u cant use skydome or sky box for your scene, otherwise your background will covered.
can you please read the Irrlicht Engine 1.4 API documentation
it is located on \irrlicht-1.4\doc\irrlicht.chm , on your hardDrive.
there's also some (one may be...) example about drawing 2d image included with the engine.
Code: Select all
virtual void irr::video::IVideoDriver::draw2DImage ( const video::ITexture * texture,
const core::rect< s32 > & destRect,
const core::rect< s32 > & sourceRect,
const core::rect< s32 > * clipRect = 0,
video::SColor * colors = 0,
bool useAlphaChannelOfTexture = false
) [pure virtual]
ofcourse u cant use skydome or sky box for your scene, otherwise your background will covered.
can you please read the Irrlicht Engine 1.4 API documentation
it is located on \irrlicht-1.4\doc\irrlicht.chm , on your hardDrive.
there's also some (one may be...) example about drawing 2d image included with the engine.
So you've got your plane with the gradient coded and working? If not then get that working first, then you can tackle the problem of making it fill the background.
You could draw it by parenting the node to the camera and making it large enough to fill the view (fairly small and close to the camera should do it). When it's actually rendered you'll want to make sure the z write is disabled, that can be done in the material setting of the custom scene node, check the API for the correct way of doing this.
You could draw it by parenting the node to the camera and making it large enough to fill the view (fairly small and close to the camera should do it). When it's actually rendered you'll want to make sure the z write is disabled, that can be done in the material setting of the custom scene node, check the API for the correct way of doing this.
Holy hell. The custom scene node example is included in the Irrlicht distribution in examples/03.CustomSceneNode/main.cpp. You already have the file on your machine, you just need to look at it.
Travis
Travis