46
Graphics / Re: sf::RenderTexture clearing part of it
« on: April 02, 2012, 06:30:49 pm »
Nevermind, wrong vertex order *facepalmultimate*
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
I think you did something wrong, it's not expected, especially if it's slower than rendering sprites.
The one I mentioned above, so that you could use the src alpha as a mask.No I mean like (GL_ZERO, GL_ONE_MINUS_SCR_ALPHA), basically the texture would be used as a hole-cutter
Source alpha is used as a mask in BlendAlpha.
Today's graphics cards (and even older ones) can render millions of triangles per second.Well, unless its an Intel graphics card like I have on my laptop. I used a vertexarray, but the framerate is horrible(rendering 7500 sprites was actually faster) and I think I screwed up the texCoords. Are the texture coordinates in pixels or relative to the texture (like in standard opengl, from 0 to 1)? (I tried both ways, still the texture was screwed up )
Nop. What other blending mode do you need?The one I mentioned above, so that you could use the src alpha as a mask.
I'm not sure it's the best solution. Have you tried to use a vertex array instead? So changing a tile would be as simple as changing the texture coordinates of 4 vertices in the array.
But what do you want to do? Create "holes" in your render texture ?