Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

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.


Messages - name9006

Pages: [1]
1
Window / Do draw calls with same Texture affect performance?
« on: May 30, 2022, 02:34:48 am »
I am trying to go about rendering in the fastest way possible because I want the highest FPS possible. I use a sf::RenderTexture to combine multiple textures into one so I can pass them to a draw call as such:

sf::VertexBuffer buffer;
sf::RenderTexture textureAtlas;

...

// if I do multiple draw calls but use the same texture, does it treat it the same as an entirely new texture?

sf::RenderStates states(&textureAtlas.getTexture());
window.draw(buffer, start1, count1, states);

std::size_t start2 = start1 + count1;
window.draw(buffer, start2, count2, states);


My question is the above comment; if I do multiple draw calls but use the same texture, does it treat it the same as an entirely new texture and texture switch? Or would it treat it the same as the statement below?


window.draw(buffer, start1, count1 + count2, states);

Pages: [1]
anything