Commit Graph

28 Commits

Author SHA1 Message Date
RoosterDragon
e2296ad2d1 Fix CA2263 2024-11-15 22:28:18 +02:00
Gustas
26b6118f50 Extract vertex attributes 2023-09-23 16:46:45 +02:00
Gustas
7e9619b41b VertexBuffer should be disposable 2023-09-23 14:10:35 +02:00
abcdefg30
5bf7fe852c Remove the copyright year numbers 2023-01-11 11:58:54 +02:00
Vapre
7005da3592 SpriteRenderer, do not copy vertex array data each flush. 2022-11-14 23:33:24 +01:00
abcdefg30
6a31b1f9f3 Update the copyright header year 2022-05-28 00:35:10 -05:00
KonH
9ed809943d Just use Dispose methods without arguments (disposing always passed as true) 2021-10-02 22:14:08 +02:00
KonH
8bce6eb3ac Remove GC.SuppressFinalize calls from classes without destructors 2021-10-02 22:14:08 +02:00
Andre Mohren
6810469634 Updated copyright years. 2021-06-29 18:33:21 -05:00
Paul Chote
67754e8693 Add alpha support to SpriteRenderer. 2021-01-06 00:06:51 +01:00
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
ac7eda8ca2 Add support for rendering tinted artwork. 2020-07-13 14:02:02 +02:00
abcdefg30
23b3c237b7 Update the year numbers in all license headers to 2020 2020-01-05 17:00:34 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
RoosterDragon
bb536ee4fc Run graphics rendering on a dedicated thread.
The main game thread can offload some of the CPU cost to the rendering thread, freeing up its time to run more logic and render ticks.
2018-06-22 18:40:16 +01:00
Paul Chote
6c338eb06c Revert "Run graphics rendering on a dedicated thread."
This reverts commit b9be52c5428d4a3862d62fe3a2c01663bd3692c3.
2018-06-04 23:04:35 +02:00
RoosterDragon
b96e062a0d Run graphics rendering on a dedicated thread.
The main game thread can offload some of the CPU cost to the rendering thread, freeing up its time to run more logic and render ticks.
2018-05-29 23:05:39 +01:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
RoosterDragon
3f8c1ad5df Don't allocate a full-sized array when creating a VertexBuffer.
We can allocate a much smaller zeroed buffer and copy that multiple times in order to zero the memory. When creating large VertexBuffers, this caps our temporary allocation size significantly.
2017-12-19 00:57:02 +01:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
Paul Chote
7c67b10d28 Add a secondary texture coordinate to Vertex. 2016-04-15 16:46:47 -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
Paul Chote
e63fc00b76 Unify framebuffer api naming. 2015-12-28 14:23:44 +00:00
Paul Chote
397ca0f481 Replace MiniTK.Graphics with custom OpenGL shim. 2015-12-27 14:37:07 +00:00
Paul Chote
be29ec5342 Use explicit shader attributes. 2015-12-26 12:50:33 +00:00
RoosterDragon
fc436f1aab Added thread-affinity checks to SDL2 renderer.
If a call is made into a graphics resource that has thread-affinity, from a thread other than the one that created the graphics device, an exception will now be thrown to make debugging easier.
2015-09-18 21:04:21 +01:00
Matthias Mailänder
17f3466451 untie the engine from SDL2 and MiniTK 2015-08-23 07:58:03 +02:00