Created by Nicolai Hähnle on 2016-01-09 and last modified on 2019-09-14
Get this branch:
bzr branch lp:~widelands-dev/widelands/better-bufferdata
Members of Widelands Developers can upload to this branch. Log in for directions.

Branch merges

Related bugs

Related blueprints

Branch information

Widelands Developers

Recent revisions

7697. By Nicolai Hähnle on 2016-01-09

Avoid inefficient use of glBufferSubData

Drivers have a hard time keeping track of when the same physical region of
memory is used with different contents. With Mesa's radeonsi driver, for
example, practically every glBufferSubData leads to a flush of the command
stream (not necessarily a stall, but high overhead nevertheless).

By using glBufferData, the driver is explicitly told that old data in the
buffer can be discarded, which leads to the driver automatically using
different memory regions from a memory pool, which allows many more draw
calls to be batched in a single command stream submission.

You can see the effect with Mesa's radeonsi driver by running with the
GALLIUM_HUD=.ddraw-calls+num-cs-flushes variable set.

7696. By Wideland's Bunnybot <email address hidden> on 2016-01-08

Merged lp:~widelands-dev/widelands/logic_directory_layout:
Created subdirectories in src/logic to make understanding and navigating the code easier.

7695. By Wideland's Bunnybot <email address hidden> on 2016-01-07

Merged lp:~widelands-dev/widelands/request_supply_opt.

7694. By Wideland's Bunnybot <email address hidden> on 2016-01-07

Merged lp:~widelands-dev/widelands/fix_overlays:
Fixes the display of the buildhelp.

This got broken in r7688 by changing the callback function of the OverlayManager to return a bool instead of a NodeCap.

7693. By Wideland's Bunnybot <email address hidden> on 2016-01-06

Merged lp:~widelands-dev/widelands/appveyor.

7692. By Wideland's Bunnybot <email address hidden> on 2016-01-06

Merged lp:~widelands-dev/widelands/render_queue:
- 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.

7691. By Wideland's Bunnybot <email address hidden> on 2016-01-06

Merged lp:~widelands-dev/widelands/bug-1530999.

7690. By Wideland's Bunnybot <email address hidden> on 2016-01-05

Merged lp:~widelands-dev/widelands/bug-1526903.

7689. By GunChleoc on 2016-01-05

Added Janosch Peters and myself to Coders.

7688. By Wideland's Bunnybot <email address hidden> on 2016-01-05

Merged lp:~janosch-peters/widelands/editor-remove-invalid-resources.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
This branch contains Public information 
Everyone can see this information.