| View previous topic :: View next topic |
| Author |
Message |
anmabagima
Joined: 01 Oct 2009 Posts: 96
|
Posted: Sun Dec 13, 2009 6:29 am Post subject: Change Color during rendering with fixed mesh |
|
|
Hi there,
I've a sphere in my scene which usually is white. The scene consists of an white light source. The Spheres Material is set as following:
| Code: | | sceGuColorMaterial(GU_DIFFUSE); |
Depending on condition I would like to render the sphere in red, but I do not want to manipulate the color in each vertex of the mesh.
I tried the following methods of GU, but no one seem to do the job:
| Code: | sceGuMaterial(GU_DIFFUSE | GU_AMBIENT, 0xff0000ff);
sceGuModelColor(0xff0000ff, 0xff0000ff, 0xff0000ff, 0xff0000ff);
sceGuColor(0xf0000ff); |
any help would be much appriciated
Regards... |
|
| Back to top |
|
 |
jsharrad
Joined: 20 Oct 2005 Posts: 102
|
Posted: Sun Dec 13, 2009 7:21 am Post subject: |
|
|
| If the entire sphere mesh is white and you want to change the whole thing at once you could just drop the colour information out of the mesh and use sceGuColor before each render of it. |
|
| Back to top |
|
 |
anmabagima
Joined: 01 Oct 2009 Posts: 96
|
Posted: Sun Dec 13, 2009 7:42 am Post subject: |
|
|
Hi,
thanks for the tip. I guess sceGuModelColor(0xff0000ff, 0xff0000ff, 0xff0000ff, 0xff0000ff); does also the trick. I've had a mistake in my code. Thanks. I will try out your solution as well as I feel difficult to set the ModelColor back to the previus color as I do not want to get the effect on subsequentially rendered objects as well.... |
|
| Back to top |
|
 |
|