对不起,我的英语的OpenGL ES(iphone)从文件渲染
我想从一个文件中显示视频,其中的每像素4个字节,BRGA,1280×720的框架?
在Mac上我只是拿出框架,并绘制了这个glDrawPixels,在Mac上运行,但在opengl es所有不同。
这里的代码从MAC
int pos = 0;
NSData *data = [[NSData alloc] initWithContentsOfFile:@"video.raw"];
glViewport(0,0,width,height);
glLoadIdentity();
glOrtho(0, width, 0, height, -1.0, 1.0);
glPixelZoom(1, -1);
glClear(GL_COLOR_BUFFER_BIT);
//glRasterPos2i(0, height);
glRasterPos2i(0, 0);
glDrawPixels(1280, 720, GL_BGRA, GL_UNSIGNED_BYTE, [data bytes]+pos);
glFinish();
如何获取文件。 H264?然后到另一个,并使用Linux! – user1881371