Commit Graph

11 Commits

Author SHA1 Message Date
RoosterDragon
7030d8b2b6 Changed HardwarePalette.ApplyModifiers to be more efficient.
- Add separate ImmutablePalette and MutablePalette classes since the distinction is extremely important to HardwarePalette.
- Keep a cache of palettes in HardwarePalette to avoid reallocation them every time ApplyModifiers is called.
- Palettes that are not allowed to be modified are copied to the buffer once when added, rather than every time ApplyModifiers is called.
- The AdjustPalette method now takes a read-only dictionary to prevent the dictionary being messed with.
- Added a constant for the palette size to remove its usage as a magic number in several areas.
- The ColorPreviewManagerWidget is annoying in that it needs to actually permanently update a palette after it has been added. To allow this, HardwarePalette now allows a palette to be replaced after initialization. The WorldRenderer therefore now also updates the PaletteReference it created earlier with the new palette to prevent stale data being used elsewhere.
2014-06-28 01:11:48 +01:00
Paul Chote
c5337cdcf3 Reimplement voxel rendering with a FBO. 2013-06-15 19:31:52 +12:00
Paul Chote
7d09e78655 Add WorldRgbaSpriteRenderer. 2013-06-15 19:16:08 +12:00
Paul Chote
a00696ec3b Add core voxel rendering code. 2013-06-04 20:40:24 +12:00
Paul Chote
a166815348 Remove duplication between world/chrome shaders. 2013-02-23 09:53:46 +13:00
Paul Chote
926b396605 Fix bogus naming of Shaders/Renderers. Split LineRenderer into world and chrome variants. 2011-07-25 22:23:16 +12:00
Paul Chote
493631cd90 Switch to the ARB apis and add capability and compile/link status checking. 2010-11-21 13:10:19 +13:00
Paul Chote
37edd072a6 shp shaders 2010-11-21 13:10:18 +13:00
Paul Chote
00358e9fe8 Working line shader 2010-11-21 13:10:18 +13:00
Paul Chote
518e00c78a Fix setting uniforms; chrome-rgba shader works, but lacks alpha blending. 2010-11-21 13:10:18 +13:00
Paul Chote
f2a20a182e Begin work on the glsl renderer. Renders blue blocks for chrome-rgba. 2010-11-21 13:10:18 +13:00