In 1.4.2 the color is right,but in 1.7.2 color is error
please help me
my code
IAnimatedMesh* mesh = smgr->getMesh("body.b3d");
if (!mesh)
{
device->drop();
return 1;
}
IAnimatedMeshSceneNode* node = smgr->addAnimatedMeshSceneNode( mesh );
if (node)
{
node->setMaterialFlag(EMF_LIGHTING, false);
}
smgr->addCameraSceneNodeFPS();
while(device->run())
{
driver->beginScene(true, true, SColor(255,100,101,140));
smgr->drawAll();
guienv->drawAll();
driver->endScene();
}
right in CopperCube 2.2 and 1.4.2
error in 1.7.2
irrlicht 1.72 color is error
-
- Posts: 194
- Joined: Thu Mar 18, 2010 3:31 am
- Contact:
SColor takes it's arguments like this: 'SColor(Alpha, Red, Green, Blue)'.
When I created a color in GIMP where 100 is the red value, 101 is green
and 140 is blue, I get the same color you have in your second screenshot.
So my guess is that in 1.4.2 the alpha value comes last rather than first
like it does in 1.7.2. My recommendation is that you use GIMP or MS Paint
or photoshop or anything like that to try your color values before you
code them in 1.7.2.
When I created a color in GIMP where 100 is the red value, 101 is green
and 140 is blue, I get the same color you have in your second screenshot.
So my guess is that in 1.4.2 the alpha value comes last rather than first
like it does in 1.7.2. My recommendation is that you use GIMP or MS Paint
or photoshop or anything like that to try your color values before you
code them in 1.7.2.
LazerBlade
When your mind is racing, make sure it's not racing in a circle.
3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
When your mind is racing, make sure it's not racing in a circle.
3d game engine: http://sites.google.com/site/lazerbladegames/home/ray3d
lazerBlade blog: http://lazerbladegames.blogspot.com/
-
- Posts: 237
- Joined: Mon Jan 16, 2006 1:18 pm
- Location: Odessa,Russian Federation
-
- Posts: 126
- Joined: Wed Sep 29, 2010 8:23 pm
Wait... are you sure? I thought it was SColor(r, g, b, a)lazerblade wrote:SColor takes it's arguments like this: 'SColor(Alpha, Red, Green, Blue)'.
When I created a color in GIMP where 100 is the red value, 101 is green
and 140 is blue, I get the same color you have in your second screenshot.
So my guess is that in 1.4.2 the alpha value comes last rather than first
like it does in 1.7.2. My recommendation is that you use GIMP or MS Paint
or photoshop or anything like that to try your color values before you
code them in 1.7.2.
*checking one sec*
Oh wait you're right, Oh ok nevermind SColorf(r, g, b, a) SColor(a, r, g, b)
-
- Admin
- Posts: 14143
- Joined: Wed Apr 19, 2006 9:20 pm
- Location: Oldenburg(Oldb), Germany
- Contact:
The beginScene works correct, the transparency settings and parameters to SColor have not changed in any version. The blue background in the Irrlicht screenshot should be expected (because blue value is a little higher than the others).
The problem with the mesh seems to be the vertex color support which has been added in one of the latter versions of Irrlicht's b3d loader. You should make the vertex colors white, or try to change the color material to ECM_NONE for the mesh.
The problem with the mesh seems to be the vertex color support which has been added in one of the latter versions of Irrlicht's b3d loader. You should make the vertex colors white, or try to change the color material to ECM_NONE for the mesh.