Dynamic Texture Pixel Format Problem

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
faraklit
Greenskin
Posts: 109
Joined: Mon Jul 03, 2006 3:08 pm
Location: Turkey

Dynamic Texture Pixel Format Problem

Post by faraklit »

Hi,

I've created a dynamic texture with pixel type PF_BYTE_RGBA
but it works as if it is PF_BYTE_BGRA,
if I change it to PF_BYTE_BGRA, no change occurs.
Even if I change to PF_BYTE_RGB it acts as if PF_BYTE_BGRA
and it allocates 4 bytes per pixel.

How can I solve this problem?

Thanks in advance..
User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

You have to use PixelUtil::bulkPixelConversion to modify it as Ogre can use an internal format different from the one you specify for speed/hardware reasons ?
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

yep, if your card doesn't support the requested texture format, it selects another, that's a very annoying hardware thing you have to live with
BGRA seems to be supported by all hardware and render systems though.
Post Reply