glTexDirectVIVMap using GL_RGB

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

glTexDirectVIVMap using GL_RGB

2,459件の閲覧回数
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?

ラベル(3)
0 件の賞賛
返信
2 返答(返信)

1,650件の閲覧回数
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 件の賞賛
返信

1,650件の閲覧回数
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 件の賞賛
返信