Clownacy
073e62de46
Software renderer tweaks
2020-04-15 16:57:05 +01:00
Clownacy
c51a074fad
Big disgusting backend rework
...
We need to avoid `WindowsWrapper.h` in the backends whenever we can,
to avoid name collisions (the Wii U homebrew library) defines its own
BOOL/TRUE/FALSE, which really doesn't work with CSE2.
2020-04-13 18:19:39 +01:00
Clownacy
aa9e486086
Handle WindowBackend_Software_CreateWindow fail
...
Must have been part of that commit I reverted
2020-04-13 13:49:21 +01:00
Clownacy
4f7cc9582d
Revert "Backends: Added init/de-init messages for backends"
...
This reverts commit 9be8b9a493
.
2020-04-13 13:28:57 +01:00
Gabriel Ravier
9be8b9a493
Backends: Added init/de-init messages for backends
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 02:26:51 +02:00
Clownacy
1f06027403
Added GLFW3 support for the software renderer
...
A few things need cleaning-up
2020-04-09 19:29:45 +01:00
Clownacy
1016411fa4
Cleanup
2020-04-06 13:37:53 +01:00
Gabriel Ravier
1d9048c8a6
Merge branch 'portable' into improvePerformance2
...
# Conflicts:
# src/Backends/Rendering/Software.cpp
2020-04-05 01:16:09 +02:00
Clownacy
1ae63bea96
Move window ownership to the window backend
2020-04-04 20:51:07 +01:00
Clownacy
cdd69496c4
Fixes
2020-04-04 20:34:51 +01:00
Clownacy
135035bb1a
Change 'PlatformBackend' namespace to 'Backend'
2020-04-04 20:31:27 +01:00
Clownacy
4d322be866
Change render backend namespace to RenderBackend_
2020-04-04 20:24:34 +01:00
Clownacy
87e8a75df4
Rename GLFW3.h/SDL2.h
2020-04-04 19:18:46 +01:00
Clownacy
1543521625
Fix more errors x_x
2020-04-03 18:36:48 +01:00
Clownacy
f548044464
Cleanup
2020-04-03 18:05:41 +01:00
Clownacy
8266db3372
Shut-up another warning
2020-04-03 02:08:19 +01:00
Gabriel Ravier
f68984bd58
Merge branch 'portable' into improvePerformance2
...
# Conflicts:
# src/Backends/Audio/SDL2.cpp
2020-04-03 00:36:44 +02:00
Clownacy
49f7887930
More cleanup
2020-04-01 16:27:55 +01:00
Clownacy
ff70664604
Cleanup and fixes
2020-04-01 16:11:34 +01:00
Clownacy
142bca6578
Split SDL2 code from Draw.cpp
2020-03-31 16:11:31 +01:00
Gabriel Ravier
5d61641415
Added ATTRIBUTE_HOT to Backend_ColourFill
...
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-02-13 19:55:39 +01:00
Gabriel Ravier
f43bd4f876
Removed bad omp (it doesn't actually improve anything, i did my measurements wrong)
2020-02-13 19:55:39 +01:00
Gabriel Ravier
2adfef0035
Got Backend_Blit to go from 17% CPU usage to 11% :
...
- used __builtin_expect to get a 8.5% performance improvement
- used #pragma omp for to get a 30% performance improvement
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-02-13 19:55:39 +01:00
Gabriel Ravier
e8ec6a8ffb
Optimize Backend_Blit a bit
2020-02-13 19:55:39 +01:00
Clownacy
a767c16d83
Un-un-const a few things
2020-02-09 18:55:41 +00:00
Clownacy
d4004fe99a
Store glyph pixels as chars, not floats
...
Smaller memory footprint, and probably-insignificant performance
impact.
2020-02-09 13:56:45 +00:00
Clownacy
bb11cd567d
Software renderer cleanup
2020-02-09 13:44:02 +00:00
Clownacy
59a8c2617f
Tweak some variable naming
...
The enhanced branch calls them the 'internal *screen* width/height',
which I think is more appropriate.
2020-02-05 15:52:43 +00:00
Clownacy
1140ab0916
Clean-up renderer backend initialisation
2020-02-04 15:51:19 +00:00
Clownacy
1b2d4fdb4d
Fix the other rendering backends
...
Also finished ripping-out the sub-pixel support
2020-02-01 22:57:07 +00:00
Clownacy
eaf2de05b6
Add glyph-batching to the SDLTexture backend
...
Hope it will be this easy for the OpenGL backend
2020-02-01 17:49:26 +00:00
Clownacy
639039ce3a
Added Backend_PrepareToDrawGlyphs
...
This is to reduce OpenGL context changes, and help pave the way for
glyph-batching
2020-02-01 16:40:23 +00:00
Clownacy
e3db7749ba
Add verbose error-reporting to backends
...
Should fix #98
2020-02-01 12:22:44 +00:00
Clownacy
ed1ff2f275
Tweak MIN/MAX macros in software renderer
2020-01-29 23:45:22 +00:00
Clownacy
48b7a878ba
Convert software renderer
2020-01-22 22:24:23 +00:00
Clownacy
a0eb646a1f
Add ability to lock certain parts of a surface
...
This avoids conditional jumps based on uninitalised memory, and
should be faster, and should be lighter on memory.
2020-01-07 03:52:37 +00:00
Clownacy
011b79a051
Shut up some more Clang warnings
2019-10-29 12:20:05 +00:00
Clownacy
4b8a6849d3
Actually make the surface regeneration work
2019-09-06 22:13:00 +01:00
Clownacy
4e239c3175
Restore the rendering backend callbacks
...
Now the SDLSurface backend survives window resizes (also triggered by
alt-tabbing while in fullscreen), and the SDLTexture backend properly
regenerates its textures after a fullscreen alt-tab in DirectX mode.
2019-09-06 19:07:49 +00:00
Clownacy
fd855ee732
Restore the new renderers
2019-09-02 22:46:36 +01:00
Clownacy
f956eb9264
Mostly ASM-accurate Draw.cpp
...
See #74
2019-08-31 17:43:45 +01:00
Clownacy
ce8b5651bc
Give the FONT_PIXEL_MODE enums a type
2019-08-21 16:25:02 +00:00
Clownacy
4f057dd72a
Revert "Split glyph surface creation and pixel upload"
...
This reverts commit 5da3b72fca
.
2019-08-14 16:30:48 +00:00
Clownacy
5da3b72fca
Split glyph surface creation and pixel upload
...
When DirectX-SDL2 loses its device, it doesn't lose its textures,
just their contents, so we shouldn't remake the textures when we
regenerate the glyphs (that's coming next commit).
2019-08-13 18:02:14 +01:00
Clownacy
dddf968810
Backend_SupportsSubpixelGlyph -> Backend_SupportsSubpixelGlyphs
2019-08-13 05:14:37 +00:00
Clownacy
3f8ead09d6
Renderer backend simplification part 1: Draw.cpp and Software.cpp
...
By emulating the DirectDraw code more closely, I can simplify the
renderer backend API.
2019-08-13 01:39:08 +00:00
Clownacy
e094f2ff68
Renderer backend fixes
...
Surface-to-surface blits were broken (would draw to screen instead),
and the SDLSurface backend wouldn't even compile.
You know, I thought I tested each backend when I made those changes
to the API...
2019-08-11 05:22:02 +00:00
Clownacy
85f58d7d39
Rendering backend API naming improvements
2019-08-10 19:50:10 +01:00
Clownacy
2b86db32a0
Backend_Blit always uses a colour key
2019-08-10 19:31:45 +01:00
Clownacy
8acd46bce6
Move the font gamma-correction up to Font.cpp
...
Reduces duplicate code
2019-08-08 05:04:08 +00:00