← Back to team overview

widelands-dev team mailing list archive

[Merge] lp:~widelands-dev/widelands/render_queue into lp:widelands

 

The proposal to merge lp:~widelands-dev/widelands/render_queue into lp:widelands has been updated.

Commit Message changed to:

- Implemented a RenderQueue. All drawing operations during drawing only
  register an item into the queue, at the end of the frame, the RenderQueue
  will draw everything onto the screen all at once. This leads to significant
  less OpenGL state changes, but will only make a really big difference when
  all graphics land in texture atlases.
- Textures internal format is now OpenGL ordered (i.e. bottom line is y = 0).
  This needs swapping of rows for pictures on load, but Textures are no longer
  upside down on the GPU which makes working with OpenGL coordinates easier.
- Made all drawing programs z-layer aware and enabled depth testing for OpenGL.
- Made all programs batch aware: The renderqueue batches items for the same
  program into a vector which is passed to the programs. They can then batch
  them together into fewer draw calls if possible.
- An ImageCache now has a compactify() method that builds a texture atlas out
  of all the image that are cached in it while having all Image pointers it
  handed out before staying valid. This was only used for debugging, but in a
  followup branch I will change the ImageTexture to be backed by a texture
  atlas by default.
- Refactored minimap renderer to have less repeated code.
- Remove Texture::get_pixels() and format() and let the (set|get)_pixels pass
  RGBAColor instead of uint32_t for clr.
- RenderTarget::draw_line() and derived methods now take two Points instead of
  4 integers which are inclusive to the line.
- Only reallocate OpenGL buffers if we need more space.
- Small refactorings in src/graphics/CMakeLists.txt.

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/render_queue/+merge/250524
-- 
Your team Widelands Developers is subscribed to branch lp:~widelands-dev/widelands/render_queue.


References