Question

Using OpenGL and CVOpenGLESTextureCacheCreateTextureFromImage:

In the docs here it says that the target can be GL_TEXTURE2D or GL_RENDERBUFFER: what does that mean? Can a renderbuffer bound to the framebuffer at color_attachment_0 be used to get an image?

Était-ce utile?

La solution

Your question is slightly confusing.

The docs there are saying that you can push video frames into either a GL_TEXTURE2D or a GL_RENDERBUFFER.

In the first case, you can use the sampler2D in your fragment shader to look up colors from the video and put video on polyons.

In the second case, yes, you can bind the renderbuffer to your FBO there and get images using glReadPixels().

However, I wouldn't call either of these a "source" necessarily? They are targets. Unless you mean as a source for later reading?

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top