Hi ,

I thought that the following snippet will create an empty texture object of certain width and height. But the application terminates

Code :
cl_mem initTexture(int width,int height)
   cl_int ciErrNum;
   cl_image_format image_format;
   image_format.image_channel_order = CL_RGBA;
   image_format.image_channel_data_type = CL_UNSIGNED_INT8;
   //create an empty image 
   cl_mem imageTexture = clCreateImage2D(cxGPUContext,CL_MEM_READ_WRITE | CL_MEM_COPY_HOST_PTR,
   oclCheckErrorEX(ciErrNum, CL_SUCCESS, pCleanup);
   return imageTexture;

Any idea folks ?