The texture is in RGBA8 format using GL_UNSIGNED_BYTE
my kernel:
__constant sampler_t smp = CLK_NORMALIZED_COORDS_FALSE|CLK_ADDRESS_REPEAT|CLK_FILTER_LINEAR;
__kernel void draw( __read_only image2d_t screen)
{
float4 sample = read_imagef(heightmap, smp, samplepos); // returns a number far larger than 1.0
}
Here I set up the image and arguments:heightmapimage = cl::Image2DGL(compute->getContext(), CL_MEM_READ_ONLY, GL_TEXTURE_2D, 0, tex1.texPointer, &err);
VECTOR_CLASS<cl::Memory> mem_objects;
mem_objects.push_back(heightmapimage);
compute->getCommandQueue().enqueueAcquireGLObjects(&mem_objects);
raycaster.setArg(0, heightmapimage);
Is this a bug? If not where did I screw up?