8 #ifndef META_OCEAN_RENDERING_GLES_TEXTURE_FRAMEBUFFER_H
9 #define META_OCEAN_RENDERING_GLES_TEXTURE_FRAMEBUFFER_H
19 #ifdef OCEAN_PLATFORM_BUILD_APPLE_IOS_ANY
20 #include <CoreVideo/CoreVideo.h>
29 namespace GLESceneGraph
60 bool resize(
const unsigned int width,
const unsigned int height)
override;
72 inline unsigned int width()
const;
78 inline unsigned int height()
const;
153 inline GLuint colorTextureId()
const;
159 inline GLuint depthTextureId()
const;
190 #ifdef OCEAN_PLATFORM_BUILD_APPLE_IOS_ANY
208 GLuint framebufferObjectId_ = 0u;
211 GLuint colorTextureId_ = 0u;
214 GLuint depthTextureId_ = 0u;
217 unsigned int width_ = 0u;
220 unsigned int height_ = 0u;
223 unsigned int framebufferMultisamples_ = 1u;
247 std::string textureName_ = std::string(
"primaryTexture");
249 #ifdef OCEAN_PLATFORM_BUILD_APPLE_IOS_ANY
252 CVOpenGLESTextureCacheRef iosTextureCache_ =
nullptr;
255 CVPixelBufferRef iosPixelBuffer_ =
nullptr;
258 CVOpenGLESTextureRef iosTexture_ =
nullptr;
262 #ifdef OCEAN_PLATFORM_BUILD_WINDOWS
265 PFNGLBLITFRAMEBUFFERPROC glBlitFramebuffer_ =
nullptr;
This class implements Ocean's image class.
Definition: Frame.h:1792
PixelFormat
Definition of all pixel formats available in the Ocean framework.
Definition: Frame.h:183
@ FORMAT_RGBA32
Pixel format with byte order RGBA and 32 bits per pixel.
Definition: Frame.h:382
This class implements a class factory for all GLESceneGraph objects.
Definition: GLESFactory.h:30
This class implements a container for an OpenGL ES shader program.
Definition: GLESShaderProgram.h:53
This class is the base class for all GLESceneGraph texture framebuffer objects.
Definition: GLESTextureFramebuffer.h:39
bool setWrapTypeT(const WrapType type) override
Sets the texture wrap type in t direction.
bool bindFramebuffer()
Binds the framebuffer.
bool setPixelFormat(const FrameType::PixelFormat pixelFormat) override
Sets the texture framebuffer's internal pixel format.
GLuint depthTextureId_
The id of the depth texture.
Definition: GLESTextureFramebuffer.h:214
bool setWrapTypeS(const WrapType type) override
Sets the texture wrap type in s direction.
ShaderProgramRef shaderProgramForOneSample_
The optional shader program object, needed when copying the content of the multi sample framebuffer (...
Definition: GLESTextureFramebuffer.h:238
GLuint colorTextureId() const
Returns the id of the color texture.
Definition: GLESTextureFramebuffer.h:280
VertexSetRef vertexSetForOneSample_
The optional vertex set object, needed when copying the content of the multi sample framebuffer (or d...
Definition: GLESTextureFramebuffer.h:241
GLESTextureFramebuffer()
Creates a new GLESceneGraph texture object.
unsigned int height() const
Returns the height of this framebuffer.
Definition: GLESTextureFramebuffer.h:275
unsigned int width_
The width of the texture framebuffer in pixel, with range [0, infinity).
Definition: GLESTextureFramebuffer.h:217
bool copyDepthTextureToFrame(Frame &frame, const CV::PixelBoundingBox &subRegion=CV::PixelBoundingBox()) override
Copies the image content of the depth texture to a given frame.
void unbindFramebuffer()
Unbinds the framebuffer.
TextureFramebufferRef textureFramebufferOneSample_
The optional texture with one samples, needed when copying the content of the multi sample framebuffe...
Definition: GLESTextureFramebuffer.h:235
FrameType::PixelFormat pixelFormat() const override
Returns the texture framebuffer's internal pixel format.
WrapType wrapTypeT() const override
Returns the texture wrap type in t direction.
unsigned int width() const
Returns the width of this framebuffer.
Definition: GLESTextureFramebuffer.h:270
GLuint depthTextureId() const
Returns the id of the depth texture.
Definition: GLESTextureFramebuffer.h:285
WrapType wrapTypeS() const override
Returns the texture wrap type in s direction.
GLuint colorTextureId_
The id of the color texture.
Definition: GLESTextureFramebuffer.h:211
std::string textureName() const override
Returns the name of the texture e.g., in a shader.
~GLESTextureFramebuffer() override
Destructs a GLESceneGraph texture object.
unsigned int bindTexture(GLESShaderProgram &shaderProgram, const unsigned int id) override
Binds this texture.
bool copyColorTextureToFrame(Frame &frame, const CV::PixelBoundingBox &subRegion=CV::PixelBoundingBox()) override
Copies the image content of the color texture to a given frame.
bool createTextureForFramebufferAppleIOS(const unsigned int width, const unsigned int height, const GLint textureInternalFormat, const GLenum textureFormat, const GLenum textureType)
Creates a texture for the framebuffer on iOS platforms.
TrianglesRef trianglesForOneSample_
The optional triangles object, needed when copying the content of the multi sample framebuffer (or de...
Definition: GLESTextureFramebuffer.h:244
bool isValid() const override
Returns whether the texture framebuffer is ready for use.
bool setMultisamples(const unsigned int multisamples)
Sets the number of multi-samples.
bool setTextureName(const std::string &name) override
Sets the name of the texture e.g., in a shader.
void createMipmap() override
Updates the mipmap for this texture.
bool resize(const unsigned int width, const unsigned int height) override
Resizes the texture framebuffer.
unsigned int height_
The height of the texture framebuffer in pixel, with range [0, infinity).
Definition: GLESTextureFramebuffer.h:220
void release()
Releases this texture framebuffer.
This class is the base class for all GLESceneGraph texture objects.
Definition: GLESTexture.h:37
This class is the base class for all textures based on a framebuffer.
Definition: rendering/TextureFramebuffer.h:39
WrapType
Definition of different texture wrapping types.
Definition: rendering/Texture.h:96
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15