22 #if defined(CL_SIFTGPU_ENABLED)
24 #ifndef CL_TEX_IMAGE_H
25 #define CL_TEX_IMAGE_H
33 cl_command_queue _queue;
43 void ReleaseTexture();
46 void SetPackedSize(
int width,
int height,
int packed);
47 void InitBufferTex(
int width,
int height,
int nchannel);
48 void InitTexture(
int width,
int height,
int nchannel);
49 void InitPackedTex(
int width,
int height,
int packed);
50 void InitTextureGL(GLuint tex,
int width,
int height,
int nchannel);
51 void CopyToHost(
void* buf);
52 void CopyFromHost(
const void* buf);
54 int CopyToPBO(GLuint pbo);
55 int GetImageDataSize();
57 inline operator cl_mem(){
return _clData; }
58 inline int GetImgWidth(){
return _imgWidth;}
59 inline int GetImgHeight(){
return _imgHeight;}
60 inline int GetTexWidth(){
return _texWidth;}
61 inline int GetTexHeight(){
return _texHeight;}
62 inline int GetDataSize(){
return _bufferLen;}
63 inline bool IsImage2D() {
return _bufferLen == 0;}
64 inline int GetImgPixelCount(){
return _imgWidth*_imgHeight;}
65 inline int GetTexPixelCount(){
return _texWidth*_texHeight;}
68 CLTexImage(cl_context
context, cl_command_queue queue);
69 void SetContext(cl_context
context, cl_command_queue queue);
70 virtual ~CLTexImage();
71 friend class ProgramCL;
72 friend class PyramidCL;
73 friend class ProgramBagCL;
74 friend class ProgramBagCLN;