glTexDirectVIVMap using GL_RGB

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

glTexDirectVIVMap using GL_RGB

1,821 Views
weihuawang
Contributor I

Does glTexDirectVIVMap support GL_RGB format?

I found some document did say it supported it. I tried and did not work. Any samples for it?

Labels (3)
0 Kudos
Reply
2 Replies

1,012 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Weihua,

You can choose the format of the pixel data from the following formats: GL_VIV_YV12, GL_VIV_NV12, GL_VIV_NV21, GL_VIV_YUY2, GL_VIV_UYVY, GL_RGBA , and  GL_BGRA_EXT:

Example: If Format is GL_RGBA, glTexDirectVIV creates a pixel array with four GL_UNSIGNED_BYTE components: the first byte for red pixels, the second byte for green pixels, the third byte for blue, and the fourth byte for alpha. ? If Format is GL_BGRA_EXT, glTexDirectVIV creates a pixel array with four GL_UNSIGNED_BYTE components: the first byte for blue pixels, the second byte for green pixels, the third byte for red, and the fourth byte for alpha.

First, call glTexDirectVIVMap to map Logical and Physical address to the texture.

Second, you can modify Logical and Physical data. Then, call glTexDirectInvalidateVIV to apply the texture before you draw something with that texture.

...

char *Logical = (char*) malloc (sizeof(char)*size);

Gluint physical = ~0U;

glTexDirectVIVMap(GL_TEXUTURE_2D, 512, 512, GL_VIV_YV12,

     (void**)&Logical, &25hysical);

....

GlTexDirectInvalidateVIV(GL_TEXTURE_2D);

....

glDrawArrays(...);

Hope this helps

0 Kudos
Reply

1,012 Views
weihuawang
Contributor I

Thanks for the reply.

I was wondering why GL_RGB is not supported. I don't have GL_RGBA texture. To convert to RGBA is a lot of overhead.

Any comment?

0 Kudos
Reply