I have problem in s32v234 platform, I want to use glTexDirectVIV interface to show a image, and I do as below:
1. init the gpu(use glClearColor interface display color ok)
2. open a image file and read the image data to a buf
3. give the buf address to glTexDirectVIV interface
the Implement code is:
glEnable(GL_CULL_FACE);
glViewport(0, 0, mWindowWidth, mWindowHeight);
glScissor(0, 0, mWindowWidth, mWindowHeight);
glClearColor(0.0, 0.0, 0.0, 0.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT);
static int flag = 1;
if(flag == 1)
{
int ret = -1;
fd = open("/package/image0_out.yuv", O_RDWR);
if(fd < 0)
printf("open file failed!\n");
ret = read(fd, image_display, 1280 * 720);
if(ret < 0)
printf("read file failed!\n");
close(fd);
flag = 0;
printf("xixi read ok!\n");
}
glTexDirectVIV(GL_TEXTURE_2D, 1280, 720, GL_VIV_UYVY, (GLvoid**)(image_display));
But it do not work, could you give me a demo about how to user glTexDirectVIV in s32v234 platform?
Looking forward to you replay, Thank you very much!