Commit Graph

30 Commits

Author SHA1 Message Date
RoosterDragon
b2b639434c ThreadedGraphicsContext improvements.
- VertexBuffer interface redefined to remove an IntPtr overload for SetData. This removes some unsafe code in TerrainSpriteLayer. This also allows the ThreadedVertexBuffer to use a buffer and post these calls, meaning the SetData call can now be non-blocking.
- ThreadedTexture SetData now checks the incoming array size. As the arrays sent here are usually large (megabytes) this allows us to avoid creating temp arrays in the LOH and skip Array.Copy calls on large arrays. This means the call is now blocking more often, but significantly reduces memory churn and GC Gen2 collections.
2020-10-13 15:54:53 +02:00
Paul Chote
01e955ca37 Implement TS-style terrain lighting. 2020-07-13 14:02:02 +02:00
Paul Chote
fdb66c769c Change terrain layers to track sequences instead of sprites. 2020-07-13 14:02:02 +02:00
Paul Chote
ac7eda8ca2 Add support for rendering tinted artwork. 2020-07-13 14:02:02 +02:00
Paul Chote
626b40f31b Account for ramps in terrain height calculations. 2020-05-28 09:41:55 -05:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Paul Chote
9ff177359b Split IGraphicsContext from IPlatformWindow. 2018-06-13 18:45:21 +01:00
Paul Chote
ab14a86d39 Rename Renderer.Device to Renderer.Window. 2018-06-13 18:45:21 +01:00
Paul Chote
bfcbe8c004 Improve batching by binding up to 8 simultaneous textures. 2018-06-04 23:33:57 +02:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
a266dc6639 Fix shroud rendering outside the map cordon. 2016-11-19 18:10:12 +00:00
Paul Chote
4db93f70c7 Add a cell sanity check to TerrainSpriteLayer. 2016-11-05 17:44:02 +00:00
Paul Chote
756d2428d9 Add depth support to TileSet. 2016-04-21 17:23:08 +01:00
Paul Chote
7c67b10d28 Add a secondary texture coordinate to Vertex. 2016-04-15 16:46:47 -04:00
Paul Chote
c00ef40151 Add float3 support to TerrainSpriteLayer. 2016-04-10 09:41:01 -04:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
RoosterDragon
8e89a6a696 Simplify names, remove unused usings, remove redundant casts. 2016-01-17 21:35:36 +00:00
Paul Chote
a754a96b77 Convert SpriteRenderer to TriangleList. 2015-12-26 12:46:54 +00:00
RoosterDragon
c562b8c51e Detach event handlers on dispose in TerrainSpriteLayer.
The WorldRenderer outlives the TerrainSpriteLayer and thus keeps it alive longer than expected via the event handler. We detach it to allow the GC to reclaim it.
2015-11-04 23:09:30 +00:00
Pavel Penev
642468ce0c Add MapGrid class
MapGrid is a mod Manifest field which includes (and thus makes redundant) TileSize, TileShape, SubCells info and MaximumTerrainHeight.
2015-09-27 04:14:43 +03:00
Paul Chote
e8794032e0 Introduce initial PPos plumbing.
PPos is best thought of as a cell grid applied in
screen space.  Multiple cells with different
terrain heights may be projected to the same PPos,
or to multiple PPos if they do not align with the
screen grid.

PPos coordinates are used primarily for map edge
checks and shroud / visibility queries.
2015-07-27 19:34:49 +01:00
Paul Chote
971d1c1388 Fix a NRE in TerrainSpriteLayer. 2015-07-06 19:54:44 +01:00
Paul Chote
f93ad2a9c1 Expose TerrainSpriteLayer.Sheet and BlendMode. 2015-07-06 19:54:43 +01:00
Paul Chote
2156a234db Render shroud outside map bounds.
Fixes a regression from #8337.
2015-06-15 18:06:43 +01:00
Paul Chote
486bf14669 Relax screen clipping bounds.
Fixes missing tiles in TS.
2015-06-11 21:27:33 +01:00
Paul Chote
629f877032 Extract terrain vertex buffer into a reusable class. 2015-05-29 19:06:11 +01:00