Paul Chote
3e404f6ac2
Remove HSLColor.
2019-03-04 18:26:42 +00:00
Paul Chote
ab4a7e3558
Replace System.Drawing primitives with our own.
2019-03-04 18:26:42 +00:00
Paul Chote
094c8b6432
Use Color.ToString() in perf logs.
2019-03-04 18:26:42 +00:00
Paul Chote
94f7f6fd2e
Remove obsolete code.
2019-02-24 14:02:19 +01:00
Paul Chote
5a1124426d
Rewrite screenshot saving.
2019-02-24 14:02:19 +01:00
Paul Chote
82fade25a6
Replace Sheet.AsBitmap with Sheet.AsPng.
2019-02-24 14:02:19 +01: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
b1e87e4f60
Remove System.Bitmap from ITexture.
2019-01-08 21:20:06 +00:00
Paul Chote
84e965835b
Remove System.Bitmap from badge and mod icons.
2019-01-08 21:20:06 +00:00
Paul Chote
f65a777366
Remove System.Bitmap from map preview loading.
2019-01-08 21:20:06 +00:00
Paul Chote
4f10d4a302
Remove System.Bitmap from UI artwork loading.
2019-01-08 21:20:06 +00:00
Paul Chote
98b80d44eb
Remove legacy workaround that crashes modern Mono.
2018-12-15 23:35:29 +01:00
Andre Mohren
b1a44086a0
Removed unused using directives.
2018-11-17 17:23:22 +00:00
Chris Forbes
d653614e75
Replicate palette high bits into the low bits
...
Previously we didn't quite get the full range -- the most intense value we
could produce was 0xfc.
2018-11-04 15:06:50 +01:00
Paul Chote
95c5c683e3
Limit samplers to 8 in combined.frag.
...
The additional palette sampler wasn't accounted
for in the original PR.
2018-11-01 14:38:57 +01:00
Paul Chote
dee6d03626
Allow sprites to store custom metadata.
2018-10-28 20:55:40 +00:00
Paul Chote
a06cfb4004
Move TerrainRenderer to a mod-defined trait.
2018-10-13 18:16:56 +02:00
Andre Mohren
450dc70375
Refactored cursors.yaml to use palettes from rules.
2018-10-07 19:28:11 +02:00
Andre Mohren
3f81df9c52
Fixed backwards animation playback.
2018-08-04 20:58:02 +02:00
reaperrr
b2a069f8ab
Add FillTriangle support
2018-07-28 21:35:42 +02:00
Paul Chote
1ac13de4b2
Remove byte order marks from C# files.
2018-07-01 11:08:32 +02:00
Paul Chote
8c0f4fde81
Fix newlines in C# files.
2018-07-01 11:08:32 +02: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
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
28c8089bc7
Rename IGraphicsDevice to IPlatformWindow.
2018-06-13 18:45:21 +01:00
Paul Chote
8461a82577
Remove requirement for depth sprites to share color sheet.
2018-06-04 23:33:57 +02:00
Paul Chote
bfcbe8c004
Improve batching by binding up to 8 simultaneous textures.
2018-06-04 23:33:57 +02:00
Paul Chote
131496ebf8
Merge RGBA sprite rendering into SpriteRenderer.
...
Renderer.RgbaSpriteRenderer is kept as a thin
wrapper to maintain compatibility with consumer
code.
2018-06-04 23:33:57 +02:00
Paul Chote
ba38878933
Add TextureChannel.RGBA for RBGA sprites.
2018-06-04 23:33:57 +02:00
Paul Chote
c307b3e291
Encode channel attributes in a more sensible way.
2018-06-04 23:33:57 +02: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
RoosterDragon
8ec90525e3
Change Shader.Render to Shader.PrepareRender.
...
Instead of running the shader operation as an action, just run it after the shader is prepared.
2018-05-29 23:05:39 +01:00
RoosterDragon
95ac1aa5b2
Avoid redundant property sets in WorldRenderer.Draw.
2018-05-29 23:05:39 +01:00
RoosterDragon
296c732525
Avoid redundant implicit float3 conversions.
2018-05-29 23:05:39 +01:00
Paul Chote
a329711011
Render lines using SpriteRenderer without breaking the batch.
2018-05-23 23:28:22 +02:00
Paul Chote
bf4b91741a
Ignore unused frames when loading Sequences into Sheets.
2018-05-02 09:59:03 +02:00
Paul Chote
d9fd0f272c
Add support on-demand sprite frame loading.
...
Passing the getUsedFrames argument will cause frames to be buffered
locally (and not added to the SheetBuilder) until they are explicitly
requested. This allows unused frames in sprite files to be skipped
instead of wasting space in GPU memory.
2018-05-02 09:59:03 +02:00
Paul Chote
952f41b4e4
Add --dump-sequence-sheets Utility command.
...
This can be used to debug and optimize the texture
data that is uploaded to VRAM.
2018-04-30 02:05:43 +02:00
RoosterDragon
7bc5bd5791
Force buffered sheets to commit data to a texture on buffer release.
...
Previously ReleaseBuffer did not immediately null out the buffer, instead the releaseBufferOnCommit flag allows it to be nulled when the texture is next access and the pending changes from the buffer are committed to it. Now the texture is committed immediately, thus the buffer is null once ReleaseBuffer returns.
Once loaded, we force a GC to reclaim temporary memory used during loading. Previously the buffer would not be null as it was pending commit to the texture and thus could not be reclaimed. As soon as we rendered the first frame, the buffer is nulled but we are now in a low GC state - and the buffer will not be reclaimed until the next gen 2 GC which may be dozens of minutes away.
This change ensures the buffer is null in time for the post-load GC, and thus can be reclaimed before we start rendering.
2018-04-29 18:11:48 +02:00
RoosterDragon
f6471d411e
Reuse set when rendering actors in the world to avoid allocations.
2018-03-22 23:32:03 -03:00
RoosterDragon
e17ede34ef
Add Int32Matrix4x4 struct.
...
This allows matrices to be represented as a value type, and additionally allows avoiding array allocations when calculating rotations.
2018-03-21 12:07:53 +01:00
RoosterDragon
f2e270ce06
Return IRenderable[] rather than IEnumerable<IRenderable> for animations.
...
Since some callers now know they have an array, then can enumerate it more efficiently and without allocating an enumerator.
2018-03-17 17:51:16 +01:00
Arular101
8a60918841
Update copyright notice year to 2018
2018-01-17 00:47:34 +01:00
RoosterDragon
e42e766bb6
Prevent incorrect usage of ModelRenderer.
...
Force BeginFrame/EndFrame to be called correctly, and prevent calls to RenderAsync when outside of a frame.
2017-12-23 22:58:17 +01:00
reaperrr
fbc18dfb18
Use HashSet instead of IEnumerable to pass actors to renderable lists
2017-12-23 17:56:11 +00:00
reaperrr
04fb0f209d
Spatially partition some actor overlays
2017-12-23 17:56:11 +00:00
reaperrr
6ef95405bf
Split overlay renderable generation to separate list
...
To make the code a bit more readable and consistent with normal renderables.
2017-12-23 17:56:11 +00:00
RoosterDragon
a9d1d374b8
Remove draw line 2D helper method.
...
Callers can provide 3D points easily, and this avoids the need to allocate and slow down enumeration via the points.Select(p => new float3(p, 0)) wrapper.
2017-12-17 01:51:51 +01:00