[Opensim-dev] UpdateTexture or UpdateTextureEntry - OpenSim 0.7

Gajananan Kugamoorthy gajananan_k at yahoo.com
Wed Aug 25 09:43:52 UTC 2010


Hello OpenSim Developers,

I am using UpdateTexture function in SceneObjectPart class of OpenSim.  I have 
RGB values in 1-255 scale, then I convert it to  0 - 1 scale in my code 

For example :
    
                             Primitive.TextureEntry tex = p.Shape.Textures; ( p 
is  a 'SceneObjectPart')
                             Color4 texcolor;
                             float r = 142,  g = 255, b = 142

                             texcolor.R = Util.Clip(r, 0.0f, 1.0f);
                             texcolor.G = Util.Clip(g, 0.0f, 1.0f);
                             texcolor.B = Util.Clip(b, 0.0f, 1.0f);

                            tex.FaceTextures[k].RGBA = texcolor;
                            p.UpdateTexture(tex);


When I used the color combination  <142, 255, 142>, I expected a light blue 
color , however what I can see in the world for the prim that I set the color is 
light green.

I noticed this problem in earlier versions of OpenSim as well.

Does anybody face problem like this ?  I would greatly appreciate if someone 
could share their experience.

Best
Gajan


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20100825/4cedfd87/attachment-0001.html>


More information about the Opensim-dev mailing list