1
General / New to SFML, game design questions
« on: September 06, 2011, 11:06:13 am »
Yes which is what it appeard from the docs I read on SFML. And as such I'm still not surehow Laurent intends the Sprite object to be used exactly.
Previously in other stuff Ive just had a Sprite as a collection of graphical data (1 or more texture subrects, multiple being used in the case of animations, and the origin point), then there were methods like DrawSprite(spr, frame, x, y, angle), so it was clear that I had one Sprite object per different "visuals". SFML seems to have put that positional data into the Sprite objects itself, but one still doesnt use that data for logic, some I'm not entirly sure where that leaves sf::Sprite?
Well I guess batching isnt needed in the same form as D3D requires it since you havnt got this massive per call overhead that (the older versions at least) D3D has due to Kernel mode transitions. The graphics card still likes to render lots of vertices without constantly being asked to change state, but I'm not sure if in OpenGL/SFML you might actually get that by just drawing the same sf::Texture (with same blend etc) in a row (not sure, but whatever SFML is doing it passed my previous 200line d3d quad renderer I made at uni last year for a particle engine expierment in performance by a huge margin, and I know OpenGL and D3D should be near equals when you do things the right way ).
Previously in other stuff Ive just had a Sprite as a collection of graphical data (1 or more texture subrects, multiple being used in the case of animations, and the origin point), then there were methods like DrawSprite(spr, frame, x, y, angle), so it was clear that I had one Sprite object per different "visuals". SFML seems to have put that positional data into the Sprite objects itself, but one still doesnt use that data for logic, some I'm not entirly sure where that leaves sf::Sprite?
Well I guess batching isnt needed in the same form as D3D requires it since you havnt got this massive per call overhead that (the older versions at least) D3D has due to Kernel mode transitions. The graphics card still likes to render lots of vertices without constantly being asked to change state, but I'm not sure if in OpenGL/SFML you might actually get that by just drawing the same sf::Texture (with same blend etc) in a row (not sure, but whatever SFML is doing it passed my previous 200line d3d quad renderer I made at uni last year for a particle engine expierment in performance by a huge margin, and I know OpenGL and D3D should be near equals when you do things the right way ).