OpenCOVER
CudaTextureRectangle.h
Go to the documentation of this file.
1/* This file is part of COVISE.
2
3You can use it under the terms of the GNU Lesser General Public License
4version 2.1 or later, see lgpl-2.1.txt.
5
6* License: LGPL 2+ */
7
8#ifdef HAVE_CUDA
9
10#ifndef CUDATEXTURERECTANGLE_H
11#define CUDATEXTURERECTANGLE_H
12
13#include <osg/State>
14#include <osg/TextureRectangle>
15
17
18
19namespace opencover
20{
21
22class CudaTextureRectangle : public osg::TextureRectangle
23{
24public:
25
26 CudaTextureRectangle();
27 ~CudaTextureRectangle();
28
29 virtual void apply(osg::State& state) const;
30
31 void resize(osg::State* state, int w, int h, int dataTypeSize);
32 void* resourceData();
33 void clear();
34
35protected:
36
37 osg::ref_ptr<osg::PixelDataBufferObject> pbo_;
38 CudaGraphicsResource resource_;
39 int resourceDataSize_;
40};
41
42}
43
44#endif
45
46#endif
Definition: ARToolKit.h:33