Hi,
I've been developing an application that uses SFML for visualizing data. I was using 2.0 RC but finally updated to the 2.0 release today and found that my code related to a fragment shader no longer works. Here is the code with the issue:
private Shader shader;
private RenderStates states;
shader = new Shader(null, "colormaps\\threshold_and_colormap.frag");
states = new RenderStates(shader);
I don't get any compile errors. This is pretty barebone, but I get an runtime error on the last line the states
EntryPointNotFoundException was unhandled: Unable to find an entry point named 'sfTransform_create' in DLL 'csfml-graphics-2'.
Also, I am not sure if it matters but here is the shader code. This worked in the RC so I dont think it is the problem.
uniform sampler2D tex;
uniform float lowThreshold;
uniform float lowColormapLimit;
uniform float highColormapLimit;
uniform sampler2D colormap;
void main()
{
//read data in
vec4 pixelIn = texture2D(tex,gl_TexCoord[0].st);
//if all all channels are 255 this is the code for no data present
if ((pixelIn[3] == 1.0) && (pixelIn[2] == 1.0) && (pixelIn[1] == 1.0) && (pixelIn[0] == 1.0))
{
gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);
}
else
{
//calculate the value of the pixel
float dataValue = pixelIn[3] * 4294967296.0 + pixelIn[2] * 16777216.0 + pixelIn[1] * 65536.0 + pixelIn[0] * 256.0;
vec4 newcolor;
//apply the low threshold
if (dataValue < lowThreshold)
{
newcolor = vec4(1.0, 0.0, 0.0, 1.0);
}
else
{
int index = int((dataValue - lowColormapLimit) * (255.0/(highColormapLimit - lowColormapLimit)));
if (index < 0)
{
index = 0;
}
else if (index > 255)
{
index = 255;
}
newcolor = texelFetch(colormap, ivec2(index, 0), 0);
}
gl_FragColor = newcolor;
}
}
So did anything change in the way shaders are used in the 2.0 release? Any help would be appreciated. Thanks