Commit graph

2600 commits

Author SHA1 Message Date
Clownacy
098aae8d73 Ignore Visual Studio 2019 stuff 2020-09-26 23:25:02 +01:00
Clownacy
dad9dd6421 Correct oversized OpenGL upscaled framebuffer 2020-09-26 23:19:17 +01:00
Clownacy
c2bc6c5ec2 Avoid DPI scaling on Windows
Causes ugly blurring. The window can be resized manually if it's too
small.
2020-09-26 23:17:55 +01:00
Clownacy
530dab7bab Update Wii U shader files 2020-09-23 19:56:50 +01:00
Clownacy
87da82a500 Wii U: Offload vertex transformation to GPU 2020-09-23 19:55:45 +01:00
Clownacy
663870ae76 Wii U: Offload tex-coord transformation to GPU 2020-09-23 19:05:01 +01:00
Clownacy
6b8ffe2886 More-efficient Wii U glyph fragment shader 2020-09-23 18:03:36 +01:00
Clownacy
45f2032c9a Modernise how Wii U shaders are included
Uses newer bin2h. I would be nice if this process were automated...
2020-09-23 17:53:49 +01:00
Clownacy
006091305e Fix an inconsistency 2020-09-23 17:08:07 +01:00
Clownacy
0103f2696b Better way to handle Wii U screen viewports 2020-09-23 17:07:26 +01:00
Clownacy
42f12c18d9 Wii U integer-only viewport calculation 2020-09-23 16:57:36 +01:00
Clownacy
eac417cdc1 I guess I figured out what the GX2 context is for 2020-09-23 16:52:42 +01:00
Clownacy
ab217f7f6f Document MakePixToneObject a bit more 2020-09-22 01:43:09 +01:00
Clownacy
049b5e373a Backport the portable branch's PHILOSOPHY.md 2020-09-22 00:33:50 +01:00
Clownacy
1eb1e522c8 Clarify an odd design choice 2020-09-19 21:55:40 +01:00
Clownacy
a8bcf5a6fb Orphan vertex buffers for improved performance
Bump my Raspberry Pi 3B+ from 100FPS to 120FPS.
2020-09-19 21:50:20 +01:00
Clownacy
9a990d6fa7 Correct some code indentation 2020-09-19 15:07:44 +01:00
Clownacy
5c1012aa8e Fix upscaled framebuffer skipping
Skipping it an 1x is wrong: it should only be skipped if the window
is an integer multiple of the framebuffer size
2020-09-18 21:21:28 +01:00
Clownacy
f2c0f94e42 Faster binary search 2020-09-18 02:55:45 +01:00
Clownacy
729565b5ca Might as well not obscure the code 2020-09-18 02:05:37 +01:00
Clownacy
b0974c3def Binary-search optimisations and fixes 2020-09-18 02:03:14 +01:00
Clownacy
4763aecdbd Correct Lanczos array initialisation
I must have forgotten that Lanczos reads backwards too
2020-09-18 00:59:05 +01:00
Clownacy
d3e18d795d Merge branch 'accurate' into portable 2020-09-17 22:10:24 +01:00
Clownacy
620a25d75c Made out ASM-accurate
It just so happens that a path buffer and a FILE pointer both take up
the right amount of stack space *and* have the correct stack frame
ordering, so maybe this is actually what the original source code
did.
2020-09-17 21:44:13 +01:00
Clownacy
3a3530252b Document some leftover debug-related code 2020-09-17 21:07:49 +01:00
Clownacy
c0a6441bcb Fix another typo 2020-09-17 21:07:48 +01:00
Clownacy
527328c303 Fix a typo 2020-09-17 21:07:48 +01:00
Clownacy
2882f6651a Apply some Windows types to InitBack
Thanks, Cucky
2020-09-17 21:07:43 +01:00
Clownacy
4e936d4f45 Add a todo 2020-09-17 20:13:44 +01:00
Clownacy
f61ffac785 Turns out raw unicode *is* UTF32 2020-09-17 19:43:12 +01:00
Clownacy
ada7d91f17 Tiny cleanup 2020-09-17 19:39:34 +01:00
Clownacy
79586f5b90 Speed-up glyph lookup 2020-09-17 19:34:18 +01:00
Clownacy
ff44d2fd06 Note something 2020-09-17 18:42:36 +01:00
Clownacy
83e8320d84 Fix other renderers 2020-09-17 18:26:32 +01:00
Clownacy
5c6b71e3a1 Optimise a little when using OpenGL3 2020-09-17 18:22:44 +01:00
Clownacy
b8ceefcefd Flexible OpenGL unpack alignment 2020-09-17 18:05:38 +01:00
Clownacy
86d084f750 Get OpenGL renderers working again 2020-09-17 17:39:02 +01:00
Clownacy
2b848ad16e Finally, Windows-accurate font sizing
And of course Windows has some weird bug that has to be emulated with
FreeType.
2020-09-17 15:02:42 +01:00
Clownacy
c9f17c4411 Rename FreeType font functions 2020-09-17 15:02:42 +01:00
Clownacy
9973dddbbd Restore the FreeType code
Now you can select either the FreeType fonts or the pre-rendered
fonts with CMake's 'FREETYPE_FONTS' option.
2020-09-17 15:02:42 +01:00
Clownacy
a542a5c11d Cleanup and fixes 2020-09-17 15:02:42 +01:00
Clownacy
aac1c9c844 Get 640x480 and Japanese builds working again 2020-09-17 15:02:42 +01:00
Clownacy
fe76fe6dea Big scary messy unfinished font overhaul
This is currently hardcoded to 640x480 English builds.

What I've done is temporarily gutted the FreeType2 font renderer, and
instead introduced a system where the font is read from a
pre-rendered font atlas. This allows me to get 100% accurate font
rendering to Windows XP... because I literally created these atlases
with Windows XP.

So not only does this eliminate the issue of FreeType producing
misshapen glyphs, but it also works around the copyright issue
regarding bundling the Courier New and MS Gothic fonts with CSE2.

You see, font files can be copyrighted like any old software, however
typefaces have a lot less protection - they're basically fair-game.
IANAL, of course - look it up yourself.

I don't really want to throw away the FreeType font system since I
spent a ton of time working on it, it allows you to use other font
files, and I'll probably wind up needing it for CSE2EX. I guess I'll
just have to find some way to either have the two systems coexist, or
make it so one or the other can be selected at compile-time.
2020-09-17 15:02:36 +01:00
Clownacy
febeb1b692 More-efficient way of determining atlas size 2020-09-16 18:18:37 +01:00
Clownacy
d1560da217 Fix bitmaps at 640x480 2020-09-16 17:45:15 +01:00
Clownacy
08b14fa03f Don't use upscaled framebufer if it's not needed
This matches the SDLTexture backend.

Again, it would be really nice if this code weren't duplicated.
2020-09-15 22:16:05 +01:00
Clownacy
97d5373fa5 Add smooth upscaling to the OpenGL backends
Bleh, this is kind of messy and ugly. I also don't like how much
duplicate code there is from the SDLTexture backend.
2020-09-15 22:05:58 +01:00
Clownacy
fd82adf099 Remove invalid comment 2020-09-15 21:00:27 +01:00
Clownacy
13ce62ae05 Minor cleanup 2020-09-15 20:51:04 +01:00
Clownacy
c6af61de5e Chars aren't guaranteed to overflow at 256 2020-09-15 20:49:24 +01:00