X-Git-Url: http://git.euphorik.ch/index.cgi?a=blobdiff_plain;f=WCudaMSE%2FAPI_Bilat_Image_GL_Cuda%2FINC%2Fgpu%2FGLImages_GPU.h;fp=WCudaMSE%2FAPI_Bilat_Image_GL_Cuda%2FINC%2Fgpu%2FGLImages_GPU.h;h=1ed143a42d6bef9ffe9882c6d550ed62a84d35fe;hb=8d08c12b29c2a14684f35c023ee39e694bb80d25;hp=0000000000000000000000000000000000000000;hpb=226de81f7e1f1fbf4ac79d0d089e8a05ec7159a0;p=GPU.git diff --git a/WCudaMSE/API_Bilat_Image_GL_Cuda/INC/gpu/GLImages_GPU.h b/WCudaMSE/API_Bilat_Image_GL_Cuda/INC/gpu/GLImages_GPU.h new file mode 100755 index 0000000..1ed143a --- /dev/null +++ b/WCudaMSE/API_Bilat_Image_GL_Cuda/INC/gpu/GLImages_GPU.h @@ -0,0 +1,95 @@ +#ifndef GLIMAGES_GPU_H +#define GLIMAGES_GPU_H + +#include "envGLImageCudas.h" +#include "CudaInteropTools.h" +#include "GLImages_A.h" +#include "ImageMOOs_A_GPU.h" + +/*----------------------------------------------------------------------*\ + |* Declaration *| + \*---------------------------------------------------------------------*/ + +/*--------------------------------------*\ + |* Public *| + \*-------------------------------------*/ + +namespace gpu + { + + /** + * Data plus stocker in Central Memory, mais in GPU memory ! + */ + class CBI_GLIMAGE_CUDA GLImages: public GLImages_A + { + public: + + /*--------------------------------------*\ + |* Constructor *| + \*-------------------------------------*/ + + /** + * (dx,dy) : Size of the image + * (pxFrame,pyFrame) : The position of the upper left corner of the frame in screen space. + */ + GLImages(gpu::ImageMOOs_A* ptrImageCudaMOO, bool isAnimationEnable = true); + + virtual ~GLImages(); + + /*--------------------------------------*\ + |* Methodes *| + \*-------------------------------------*/ + + public: + + virtual void release(Panel_A &panel); + + protected: + + /** + * Override + */ + virtual void createPBO(); + + /** + * Override + */ + virtual void fillPBO(); + + /*--------------------------------------*\ + |* Get *| + \*-------------------------------------*/ + + public: + + gpu::ImageMOOs_A* getPtrImageCudaMOO(); + + /*--------------------------------------*\ + |* Set *| + \*-------------------------------------*/ + + public: + + void setStreamToSynchronize(cudaStream_t streamId); + + /*--------------------------------------*\ + |* Attributs *| + \*-------------------------------------*/ + + private: + + //Inputs + gpu::ImageMOOs_A* ptrImageCudaMOO; + + //Cuda interop + cudaGraphicsResource* cudaRessource; + cudaStream_t streamToSynchronize; + }; + + } +#endif + +/*----------------------------------------------------------------------*\ + |* End *| + \*---------------------------------------------------------------------*/ +