Is ofDisableArbTex() required to get point sprites to work? I can’t get anything to show up when I call ofDisableArbTex() before loading my image.
In my setup() i have:
ofDisableArbTex();
ofLoadImage(mTex,"texture.png");
in draw():
mTex.bind();
shader.begin();
ofEnablePointSprites();
mesh.draw(ofPolyRenderMode::OF_MESH_POINTS);
shader.end();
mTex.unbind();
In my fragment shader, no matter what I put for the texture coord, my points are black
uniform sampler2DRect tex0;
out vec4 outputColor;
void main()
{
// outputColor = texture(tex0, gl_PointCoord)
// outputColor = texture(tex0, vec2(200,200))
outputColor = texture(tex0, vec2(.5,.5));
}
If I don’t call ofDisableArbTex(), I can retrieve colors using the pixel coordinates, but my points draw as a single color, not the entire texture image.
Is there a bug here or am I doing something wrong? Edit: I am setting the point size in my vertex shader already.
1 post - 1 participant