Commit Graph

16 Commits

Author SHA1 Message Date
RoosterDragon
92389916a6 Cache the simpler delegates used in IShader.Render calls. 2015-07-15 21:09:11 +01:00
RoosterDragon
1e60a0ca76 Create only one scratch vertex buffer for rendering.
Previously several buffers were created but only one was ever used.
2015-06-05 21:32:07 +01:00
Matthias Mailänder
96e2c9bb79 use premultiplied alpha on geometric renderers
to fix transparency again
2015-05-25 13:39:38 +02:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Hellhake
fa72e04042 Remove BOM 2015-01-01 22:51:12 +01:00
RoosterDragon
9cbac2d5e1 Clean up style of files affected by the last commit. 2014-12-22 17:34:02 +00:00
RoosterDragon
f0f02dff5c Dispose of graphics resources deterministically.
Textures, FrameBuffers and VertexBuffers allocated by the Sdl2 Renderer were only being released via finalizers. This could lead to OpenGL out of memory errors since resources may not be cleaned up in a timely manner. To avoid this, IDisposable has been implemented and transitively applied to classes that use these resources.

As a side-effect some static state is no longer static, particularly in Renderer, in order to facilitate this change and just for nicer design in general.

Also dispose some bitmaps.
2014-12-22 17:34:01 +00:00
RoosterDragon
69125989ab Changed Vertex constructors to pass more parameters as plain floats.
This avoids callers having to construct a float2 struct, only to have the Vertex constructor unwrap it into individual components again.
2014-10-10 09:38:14 +01:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
RoosterDragon
a2ed4fd5f9 Avoid redundantly setting viewport parameters in BeginFrame.
- Cache the old resolution, scroll and zoom in BeginFrame, and don't bother updating the viewport parameters again until they change.
- Pass around scroll as an int2 to reduce the number of back-and-forth casts.
2014-06-10 17:06:25 +01:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Paul Chote
a1dd7cff7b Support additive blending for D2K explosions. 2013-08-14 17:31:02 +12:00
Paul Chote
52335a37bf Allow/require renderers to enable alpha blending when needed. Fixes voxel shadow issues. 2013-06-15 19:31:52 +12:00
Matthias Mailänder
6c6f5601d8 make PaletteTexture private and only use it for sprite renders 2013-04-06 08:44:32 +02:00
Matthias Mailänder
1a6a7da9c1 apply recent refactoring to quad renderer 2013-03-10 07:47:00 +01:00
Matthias Mailänder
7d0de5645f Added QuadRenderer to render shaded/colored quads. Added DebugOverlay to World to show A* bidi search cost per cell. 2013-03-10 07:32:35 +01:00