@@ -108,6 +108,7 @@ public:
int createInputDMABufTexture2D(eGLImage &eglImage, int fd);
int createOutputDMABufTexture2D(eGLImage &eglImage, int fd);
void createTexture2D(eGLImage &eglImage, void *data);
+ void createOutputTexture2D(eGLImage &eglImage);
int attachTextureToFBO(eGLImage &eglImage);
@@ -329,6 +329,19 @@ bool eGL::isAvailable()
return true;
}
+/**
+ * \brief Create a 2D texture attached to an FBO for render-to-texture
+ * \param[in,out] eglImage EGL image to associate with the texture
+ *
+ * Creates a 2D texture in VRAM. Subsequetly attach the texture to the
+ * texture unit specified in the eGLImage object.
+ */
+void eGL::createOutputTexture2D(eGLImage &eglImage)
+{
+ createTexture2D(eglImage, NULL);
+ attachTextureToFBO(eglImage);
+}
+
/**
* \brief Initialise the EGL context
*