Start a new topic

Attr reading failure

Original Post by: marnas Thu Apr 4 14:08:15 2013


Hi!


I have one rgb texture with type format RGB-ALPHA but when I try to read the attr values using "mgGetAttList" function, it returns RGB type (4) instead of RGB-ALPHA.

I use the version 4.2 to the API.


Could anyone give me a solution?


Thanks in advance.


Original Post by: ChrisRogers Thu Apr 4 15:18:35 2013


I did a quick test in 4.2 and it looks like everything is working for me... Can you give me a little more information about what you are doing?


I have tried taking a file with R, G, B and A channels and checking the attributes in creator's texture attributes dialog as well as with the api, and both come back as the correct type. I renamed this file to have the .rgb extension, and still the UI and API come back with the correct type of RGBA. I have also repeated this process with textures that do not have an alpha channel and I get the expected results as well.


Ok, so my question is, how do you know this texture has an alpha channel? Is it by the extension, or have you verified this inside of e editor?


Does the Creator UI for texture attributes match what the API returns as the type?

Original Post by: marnas Fri Apr 5 07:04:27 2013


I know the texture has alpha channel because I can see this channel with other programs and, at Creator, I open the Attr window and says that the format is RGB-Alpha.


Attache the Attr window.

Original Post by: SteveThompson Fri Apr 5 15:38:21 2013


That's very odd that mgGetAttList reports something different than Creator since they both use the same underlying code to get the texture attribute values.


Could you zip up both the texture and .attr file and attach here on the fourm? Then we could have a look and try to get to the bottom of this. Thanks.

Original Post by: marnas Wed Apr 10 12:56:24 2013


Hi.

I've found my problem.

The path of the texture at the palette did not correspond with the texture and the .attr and therefore could not read, but as I read the texture on the other hand, I hadn't problems with that.


Thank you very much for your time.

Login to post a comment