MCPcopy Create free account
hub / github.com/OpenKinect/libfreenect2 / Image3DGL

Class Image3DGL

include/internal/CL/cl.hpp:4335–4414  ·  view source on GitHub ↗

! \brief Class interface for GL 3D Image Memory objects. * * This is provided to facilitate interoperability with OpenGL. * * See Memory for details about copy semantics, etc. * * \see Memory */

Source from the content-addressed store, hash-verified

4333 * \see Memory
4334 */
4335class Image3DGL : public Image3D
4336{
4337public:
4338 /*! \brief Constructs an Image3DGL in a specified context, from a given
4339 * GL Texture.
4340 *
4341 * Wraps clCreateFromGLTexture3D().
4342 */
4343 Image3DGL(
4344 const Context& context,
4345 cl_mem_flags flags,
4346 cl_GLenum target,
4347 cl_GLint miplevel,
4348 cl_GLuint texobj,
4349 cl_int * err = NULL)
4350 {
4351 cl_int error;
4352 object_ = ::clCreateFromGLTexture3D(
4353 context(),
4354 flags,
4355 target,
4356 miplevel,
4357 texobj,
4358 &error);
4359
4360 detail::errHandler(error, __CREATE_GL_TEXTURE_3D_ERR);
4361 if (err != NULL) {
4362 *err = error;
4363 }
4364 }
4365
4366 //! \brief Default constructor - initializes to NULL.
4367 Image3DGL() : Image3D() { }
4368
4369 /*! \brief Constructor from cl_mem - takes ownership.
4370 *
4371 * See Memory for further details.
4372 */
4373 __CL_EXPLICIT_CONSTRUCTORS Image3DGL(const cl_mem& image) : Image3D(image) { }
4374
4375 /*! \brief Assignment from cl_mem - performs shallow copy.
4376 *
4377 * See Memory for further details.
4378 */
4379 Image3DGL& operator = (const cl_mem& rhs)
4380 {
4381 Image3D::operator=(rhs);
4382 return *this;
4383 }
4384
4385 /*! \brief Copy constructor to forward copy to the superclass correctly.
4386 * Required for MSVC.
4387 */
4388 Image3DGL(const Image3DGL& img) : Image3D(img) {}
4389
4390 /*! \brief Copy assignment to forward copy to the superclass correctly.
4391 * Required for MSVC.
4392 */

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected