4 #include "envGLImageCudas.h"
5 #include "CudaInteropTools.h"
6 #include "GLImages_A.h"
7 #include "ImageMOOs_A_GPU.h"
9 /*----------------------------------------------------------------------*\
11 \*---------------------------------------------------------------------*/
13 /*--------------------------------------*\
15 \*-------------------------------------*/
21 * Data plus stocker in Central Memory, mais in GPU memory !
23 class CBI_GLIMAGE_CUDA GLImages
: public GLImages_A
27 /*--------------------------------------*\
29 \*-------------------------------------*/
32 * (dx,dy) : Size of the image
33 * (pxFrame,pyFrame) : The position of the upper left corner of the frame in screen space.
35 GLImages(gpu::ImageMOOs_A
* ptrImageCudaMOO
, bool isAnimationEnable
= true);
39 /*--------------------------------------*\
41 \*-------------------------------------*/
45 virtual void release(Panel_A
&panel
);
52 virtual void createPBO();
57 virtual void fillPBO();
59 /*--------------------------------------*\
61 \*-------------------------------------*/
65 gpu::ImageMOOs_A
* getPtrImageCudaMOO();
67 /*--------------------------------------*\
69 \*-------------------------------------*/
73 void setStreamToSynchronize(cudaStream_t streamId
);
75 /*--------------------------------------*\
77 \*-------------------------------------*/
82 gpu::ImageMOOs_A
* ptrImageCudaMOO
;
85 cudaGraphicsResource
* cudaRessource
;
86 cudaStream_t streamToSynchronize
;
92 /*----------------------------------------------------------------------*\
94 \*---------------------------------------------------------------------*/