Hi
In the custom scene node tutorial the vertices are defined like this:
Vertices[0] = video::S3DVertex(0,0,10, 1,1,0, video::SColor(255,0,255,255), 0, 1);
If the values in the alpha channel are changed nothing happens, so it it necessary here? If it is not necessary shouldn't there be an SColor construcor like this SColor(f32 r, f32 g, f32 b) ? Could a 24 bit format be used?
I'm new here so I don't really know...
Cheers
Alpha channel
Try change the code to
and then transparency will work i suppose... Not tested though.
Code: Select all
SceneManager->registerNodeForRendering(this, ESNRP_TRANSPARENT)
Ok thanks, now I've got:
Unfortunately it hasn't changed, what've I done wrong?
Cheers
Code: Select all
Vertices[0] = video::S3DVertex(0,0,10, 1,1,0, video::SColor(0,0,255,255), 0, 1);
Vertices[1] = video::S3DVertex(10,0,-10, 1,0,0, video::SColor(0,255,0,255), 1, 1);
Vertices[2] = video::S3DVertex(0,20,0, 0,1,1, video::SColor(0,255,255,0), 1, 0);
Vertices[3] = video::S3DVertex(-10,0,-10, 0,0,1, video::SColor(0,0,255,0), 0, 0);
SceneManager->registerNodeForRendering(this, ESNRP_TRANSPARENT) ;
Cheers