Commit Graph

30 Commits

Author SHA1 Message Date
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
a6f5a21ed4 Made Sheet.Texture into Sheet.GetTexture() since we will want to call it for side-effects.
Do the same for Sheet.Data since it has the side effect of generating a buffer.
2014-11-29 12:04:50 +00:00
huwpascoe
7d96a6ac96 Fixed SpriteRenderer offset bug. 2014-08-21 20:08:33 +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
Paul Chote
2215f74959 Support rendering sprites into non-rectangular quads. 2013-06-15 19:16:09 +12:00
Paul Chote
18311be3ae Remove nearest-int position rounding from SpriteRenderer.
The things that want to be rounded already do this
much earlier (wr.ScreenPxPosition, etc).
2013-06-15 19:16:08 +12:00
Paul Chote
7beef85a64 Use PaletteReferences everywhere. 2013-06-15 19:16:08 +12:00
Paul Chote
e5bcb88b0e Support sprites with an internal offset. 2013-06-15 19:16:08 +12:00
Matthias Mailänder
6c6f5601d8 make PaletteTexture private and only use it for sprite renders 2013-04-06 08:44:32 +02:00
Paul Chote
8a53819f50 Redirect IShader calls via respective *Renderers. 2013-03-08 18:21:35 +13:00
Paul Chote
786c3b1f1a Rename uniform setters to avoid future ambiguity. 2013-03-04 19:06:42 +13:00
Paul Chote
e9665cf9f3 Remove WorldRenderer.GetPaletteIndex. 2013-02-26 09:35:41 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Chris Forbes
4d6b2c7954 IBOless rendering with quads; considerably reduces renderer complexity 2011-05-18 20:42:10 +12:00
Chris Forbes
16cb275a5f fix rendering of very large maps 2011-03-08 19:24:15 +13:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Bob
ab1e930ba3 pass worldRenderer around as necessary 2010-10-12 17:24:07 +13:00
Bob
14e517cab5 Autoflush renderer. Sprite.DrawAt convenience function. 2010-09-24 18:11:03 +12:00
Bob
cdcfeb6276 render perf improvement: BufferSubData, and don't use the same buffer back-to-back 2010-09-24 18:11:00 +12:00
Paul Chote
8e42dd95fc RGBASpriteRender doesn't care about palettes 2010-08-25 20:15:44 +12:00
alzeih
222b29cec6 Bye Bye Chrome! 2010-07-21 17:57:06 +12:00
Chris Forbes
d5f12dd8ee trim down license spam in all files 2010-07-18 16:48:21 +12:00
Bob
96af8b037a unbug prev, and remove misleading code that no longer works 2010-04-11 22:44:39 +12:00
Bob
8a3e5b8ccc remove allowAlpha from SpriteRenderer 2010-04-11 20:05:08 +12:00
alzeih
7881deca30 Everything is now OpenRA, not OpenRa 2010-02-27 21:10:22 +13:00