Hi all, I’m trying to draw a point sprite from a texture that looks like:
[attachment=1:2pl8eqfp]pointSpriteImg.png[/attachment:2pl8eqfp]
and it’s showing up like:
[attachment=0:2pl8eqfp]Screen shot 2011-03-07 at 1.10.01 PM.png[/attachment:2pl8eqfp]
the draw code is pretty straightforward:
glDisable(GL_DEPTH_TEST);
pointSpriteTexture.bind();
glEnable(GL_POINT_SPRITE);
glTexEnvi(GL_POINT_SPRITE, GL_COORD_REPLACE, GL_TRUE);
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
glEnableClientState(GL_VERTEX_ARRAY);
glVertexPointer(2, GL_FLOAT, 0, posArray);
glDrawArrays(GL_POINTS, 0, PARTICLES);
glDisableClientState(GL_VERTEX_ARRAY);
pointSpriteTexture.unbind();
creating the image is pretty straightforward too:
pointSpriteTexture.allocate(128, 128, GL_RGBA, false);
ofImage loader;
loader.loadImage("pointSpriteImg.png");
pointSpriteTexture.loadData(loader.getPixels(), 128, 128, GL_RGBA);
it’s non-ARB, so I’m not sure what could be problem. Any advice?
