Commit graph

62 commits

Author SHA1 Message Date
Clownacy
11bbad7372 Cleanup
Now RenderBackend_DrawGlyph doesn't pass an unnecessary parameter
2020-09-15 19:40:10 +01:00
Clownacy
611afe7417 Remove those annoying renderer sanity checks
Duplicate junk. If they're that important, they can go in the game,
not the backends.
2020-09-14 23:55:39 +01:00
Clownacy
37a1518056 Update SDLSurface renderer 2020-09-14 23:06:42 +01:00
Clownacy
63e4ac9aa9 Remove RenderBackend_FlushGlyphs
No longer used for anything
2020-09-14 12:25:39 +01:00
Clownacy
daa55b1a3c Allow font atlases to be non-square
Saves a little memory in some cases. It's the backend's job to decide
if this is a problem or not, and pad it if it has to.
2020-09-14 12:08:27 +01:00
Clownacy
69f3fbcd5a Change a dumb parameter 2020-09-10 17:56:22 +01:00
Clownacy
988f1128dd Convert a bunch of ints to size_t
ints are dumb - only use them when you have to
2020-09-10 17:36:21 +01:00
Clownacy
7c4a2b5caa Lock SDL_Surfaces 2020-09-08 18:53:06 +01:00
Clownacy
1d9446d425 Update SDLSurface renderer for new font batcher 2020-09-07 23:44:51 +01:00
Clownacy
dacd34072a Fix everything after the last commit 2020-05-06 22:52:11 +01:00
Clownacy
a8d0595bcd Update other backends to current API
The only other backend besides the Wii U one to use `render_target`
is the SDLTexture one.
2020-04-23 14:38:45 +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
cbb11e6270 Cleanup 2020-04-13 13:43:17 +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
Gabriel Ravier
a763984486 Backends/Rendering/SDLSurface: !x -> x == NULL
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:01:38 +02:00
Gabriel Ravier
2feba10654 Backends/Rendering/SDLSurface: Invert if and use != NULL instead of implicit conversion to bool
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 01:00:44 +02:00
Gabriel Ravier
dcd4bcf1b2 Backends: Fix some of the error handling and replaced some printf calls
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-12 00:42:24 +02:00
Gabriel Ravier
7f7c3d8434 Backends: Started adding a bunch of error handling stuff (error checking only done in SDL2 for now)
Signed-off-by: Gabriel Ravier <gabravier@gmail.com>
2020-04-10 22:32:29 +02:00
Clownacy
7d65d009ff Replace leftover SDL_ShowSimpleMessageBox calls 2020-04-07 17:22:56 +01: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
4f2f6ad4f4 More warnings 2020-04-03 02:10:28 +01: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
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
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
87b296c513 Converted SDLSurface renderer 2020-01-22 22:33:34 +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
03f797a267 Pretty sure these #includes aren't needed 2019-08-13 05:11:40 +00:00
Clownacy
5f0249de98 Render backend API simplification part 2: SDLSurface 2019-08-13 01:44:36 +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