4 #include "../core/GLContext.h" 5 #include "../core/GLTexture.h" 7 #import <CoreVideo/CoreVideo.h> 10 CVOpenGLESTextureRef textureRef;
13 CVOpenGLESTextureCacheRef textureCache,
14 CVPixelBufferRef sourceImage,
15 GLint _filter = GL_NEAREST,
16 GLint _wrap = GL_CLAMP_TO_EDGE);
21 const CVPixelBufferRef sourceImage;
25 void map_buffer(std::function<
void(
void* buffer,
30 const Type& type)> process)
const;
32 virtual void map_read(std::function<
void(
const void* buffer,
37 const Type& type)> process)
const;
39 virtual void map_load(std::function<
void(
void* buffer,
44 const Type& type)> process)
const;
46 GLuint name()
const {
return CVOpenGLESTextureGetName(textureRef); }
47 GLenum target()
const {
return CVOpenGLESTextureGetTarget(textureRef); };
48 bool flipped()
const {
return CVOpenGLESTextureIsFlipped(textureRef); };
50 static CVPixelBufferRef createCVPixelBuffer(OSType pixelType, int32_t width, int32_t height);