Commit Graph

177 Commits

Author SHA1 Message Date
Christian Semmler
b69687d2f1
Update renderer.cpp (#643) 2025-07-23 22:24:21 +00:00
Christian Semmler
1a2e03de47
Make Anisotropic filtering configurable (#641) 2025-07-23 20:18:05 +00:00
Anders Jenbo
a9db8d321e
Add MSAA support to OpenGL 1.1 (#640) 2025-07-23 18:30:05 +00:00
Christian Semmler
a5a3c4ec83
Upgrade OpenGL ES renderer to 3.0, add option for MSAA (#636) 2025-07-23 18:00:48 +00:00
Christian Semmler
e86fd71560
Handle SDL_EVENT_FINGER_CANCELED (#633) 2025-07-20 16:33:53 +00:00
VoxelTek
bf3820c054
Fix debug mode when OpenGL is set as graphics device (#615) 2025-07-16 08:22:36 +00:00
Christian Semmler
7c91a14875
Extended full screen capabilities for Web port (#584)
* Extended full screen capabilities for Web port

* Add Emscripten patches

* Add back newline
2025-07-12 03:05:33 +02:00
Christian Semmler
0e95e6d521
Fix ConvertEventToRenderCoordinates for mouse button events (#582) 2025-07-11 19:45:10 +02:00
olebeck
b26a707db2
put ifdefs around every d3drm backend so that any can be disabled (#569)
* put ifdefs around every d3drm backend so that any can be disabled

* make clang-format happy

* move backend selection and enum to its own functions
2025-07-10 18:19:21 +02:00
Helloyunho
4e8ac86415
Dynamically on/off virtual cursor (#567)
*  feat: eliminate need of draw_cursor config

* 🩹 fix: type mismatch
2025-07-10 08:58:17 +02:00
olebeck
4446aaaf53
translate and scale touch coordinates to the viewport (#565) 2025-07-09 12:55:26 +00:00
Anders Jenbo
b8e7c8f774
Fix uninitialized ddpfPixelFormat in VTable0x44 (#563) 2025-07-09 05:40:24 +00:00
Christian Semmler
4dc8bfc0ac
Add full screen support (#560) 2025-07-09 00:17:20 +02:00
Anders Jenbo
da2a06ed2b
Use minimal test for SDL_GPU on macOS (#552) 2025-07-08 05:16:48 +02:00
Anders Jenbo
33f3bb29cf
Clear screen when resizing (#551) 2025-07-07 23:23:58 +00:00
Anders Jenbo
f8cc5b9651
Use FBO in WebGL (#547) 2025-07-08 00:48:00 +02:00
Anders Jenbo
6df6ae407c
Fix transition on software rendere (#543) 2025-07-07 02:43:25 +02:00
Anders Jenbo
9e14aac98a
Implement real transition for 3DS (#538) 2025-07-06 15:00:39 +00:00
Helloyunho
04bcfde38b
Add Xbox One/Series X|S port (#526)
* chore: update README.md

*  feat: got the audio working

* 🔧 feat: add appxmanifest

* 🩹 fix: remove opengl stuff

* ⚗️ feat: add button support

* ⚗️ chore: try to make less modification from upstream

* 🩹 fix: doesnt compile

*  feat: forcibly draw cursor and map right joystick to cursor

* 🩹 fix: remap joystick

* 🎨 fix: formatting

* 🎨 fix: cmakelists formatting

* 🩹 fix: 3ds build

* 👷 feat: add xbox one ci build

* 💚 fix: github hates xbox series naming

* 💚 fix: dont run cpack for xbox one, vs does that for you

* 💚 fix: xbox one need to use vs as generator

* 💚 fix: please

* 💚 fix: it could be msix not bundle

* 💚 fix: try recursive directory search when upload release

* 🔨 feat: support cpack

* 👷 feat: better packaging

* 💚 fix: ignore if mv fails

* 🔧 feat: add mouse sensitivity config

* 🔥 chore: dont need you

* ⚗️ chore: use d3d11

*  feat: hardware acceleration!!

* 🚸 chore: change default cd path so user can easily copy the assets to xbox

* 🧑‍💻 chore: improve reusability

* 🚨 fix: formatting error

* 🚸 chore: draw cursor by default

* 🎨 chore: cmakelists formatting

* chore: match with upstream

* chore: more matching with upstream

* chore: don't need you

* 🩹 fix: apply changes

* 🔥 fix: we don't need controller map anymore

* 🩹 fix: use isle style include guard

* 🩹 fix: last newline fix

* 👷 chore: use cpack

* 💚 fix: try to fix ci

* 💚 fix: i tried my best...
2025-07-06 07:28:00 -07:00
Anders Jenbo
58338fecfc
Faster and cleaner mosaic transition (#530) 2025-07-06 05:17:06 +00:00
Anders Jenbo
6b446d242f
SDL_GPU: Fix transitions on scenes with 2D overlay (#529) 2025-07-05 22:01:21 +00:00
Anders Jenbo
af9f7cd791
3DS: Account for sprite scaling when resizing UI (#503) 2025-07-05 01:48:13 +02:00
Anders Jenbo
4983da422c
OpenGL: Respect max supported texture size (#518) 2025-07-04 14:47:24 +02:00
Anders Jenbo
c63d725b64
Port WipeDown and Window to use DDBLT_COLORFILL (#506) 2025-07-03 22:20:31 +00:00
Anders Jenbo
e2eda71883
Yet another clearscreen ported to use COLORFILL (#508) 2025-07-03 22:04:21 +02:00
Joshua Peisach
fde5e6ced3
citro3d: Let SDL3 take care of initiatizing/deinitializing GFX (#500) 2025-07-03 10:43:27 +00:00
Anders Jenbo
cb6fcd4194
Remove dead debug features (#471) 2025-07-02 14:52:24 +02:00
Anders Jenbo
4c0035fa74
Stip out more unnecessary OpenGL calls (#476) 2025-07-02 14:50:45 +02:00
Anders Jenbo
55c13cd140
Implement dithering where relevant (#473) 2025-07-02 12:07:20 +02:00
Anders Jenbo
cca65ba178
Remove unused function from OpenGL renderer (#475) 2025-07-02 12:07:04 +02:00
Christian Semmler
e7c7ecf510
Add experimental WebGL support to Emscripten (#440)
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
2025-07-02 06:15:15 +00:00
Anders Jenbo
7b06ee5ae6
Add support for POT-only GPUs, fix VBO (#468) 2025-07-02 00:45:25 +02:00
Joshua Peisach
1ff768935e
3DS Port (#450)
* [WIP] 3ds port

Recommit of everything after the 2d renderer merge

* VERY AWESOME FEATURE FRFR

* Stopped CPU suicide and app crashing for now

* put in Texture3DS function thing

* Fix clear color

* Implement 2D rendering via Citro3D

* Set 3dsx smdh metadata

* Render world content, sort of

* Push mesh dynamically

* Remove Citro3D init hacks

* Clean up Citro3D implementation

* Try to upload meshes and convert matricies

* Fix 3D rendering

* Apply optimizations

* Implement lighting

* Set 3dsx smdh metadata

* Revert "Apply optimizations"

This reverts commit 6660082fef.

* Apply optimizations

* Added a cleaner icon (#4)

* Fix pure buffer clear frames (#9)

* Disable OpenGL on 3DS (#10)

* Fix tiled textures and improve UI image quality (#11)

* Create 3DS default config overrides

* 3ds: implement apt hooks

* remove unused import

* Apply suggestions from code review

Co-authored-by: Christian Semmler <mail@csemmler.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>

* Update miniwin/src/d3drm/backends/citro3d/renderer.cpp

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>

* Separate 3DS apt hook code + move cmake 3ds into ISLE_BUILD_APP

* miniwin: use citro3dd if debugging

* Optimize texture encoding (#12)

* Cleanup

* Set correct mipmap level for UI textures (#13)

* cpack: include the .3dsx

* Add 3DS CI

* Fix CI

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>

* syntax

* Refactor c3d renderer (#14)

* Refactor c3d renderer

* format

* Apply suggestions from code review

Co-authored-by: Anders Jenbo <anders@jenbo.dk>

---------

Co-authored-by: Anders Jenbo <anders@jenbo.dk>

* n3ds: just distribute the .3dsx

* upload 3dsx

* Skip uploading 3DS artifacts

* Update ci.yml

* Update ci.yml

* Remove extraneous ifdef

---------

Co-authored-by: MaxBrick <maximusbrick@gmail.com>
Co-authored-by: Anders Jenbo <anders@jenbo.dk>
Co-authored-by: Steven <139715581+StevenSYS@users.noreply.github.com>
Co-authored-by: Christian Semmler <mail@csemmler.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2025-07-01 02:43:10 +00:00
Anders Jenbo
586327b584
Destry shader before the context (#463) 2025-07-01 04:15:02 +02:00
Anders Jenbo
e2ff65cf91
Expose window during device probing (#462) 2025-07-01 02:23:13 +02:00
Anders Jenbo
ab48ce60b0
OpenGL ES 2.0 Only lookup shader locations once (#460) 2025-06-30 23:38:44 +02:00
Anders Jenbo
225adda309
Rendering refactoring (#459)
* Hint texture intent to renderer

* improve transparancy for 32bit rendering

* Align OpenGL ES 2.0 with SDL_GPU's 2D rendering
2025-06-30 22:51:26 +02:00
David Gow
e87184b502
Fix the OpenGL backends on non-glx Linux platforms (and remove GLEW dependency) (#446)
* Work around issues with depth-buffer size on EGL-based platforms

The OpenGL 1.1 and OpenGL ES 2.0 backends can break on EGL-based platforms,
such as Wayland, or X11 with SDL_VIDEO_FORCE_EGL=1. One of the reasons for
this (the other being glew on the GL1.1 backend) is that SDL/egl get very
confused by the way we set OpenGL attributes, particularly SDL_GL_DEPTH_SIZE,
resulting in SDL_GL_CreateContext() failing with EGL_BAD_MATCH.

The exact cause of this is unknown, but it seems to be a combination of:
- SDL_GL_SetAttribute() is supposed to be called _before_ the window is
  created, and we're calling it afterward.
- Creating several test windows during the enumeration process, mixing
  and matching between OpenGL and OpenGL ES profiles.

The "most correct" solution is probably to delay creating the game window
until the backend creation process, rather than before the enumeration
occurs. But that's a real refactor, which could cause other issues.

Instead, set the 24-bit bit depth (which we've hardcoded anyway) before
creating the window, and use SDL_GL_ResetAttributes() when creating backends.

This seems to work here in all of the cases I was able to try (modulo the GLEW
dependency, which is removed in the next patch).

* miniwin: Remove GLEW dependency for OpenGL 1.1

GLEW normally backs directly onto glXGetProcAddress on Linux, which is broken
on non-GLX setups, such as Wayland (but also X11 with EGL, and presumably KMSDRM).

Replace it with manual calls to SDL_GL_GetProcAddress() for the VBO path.

Note, however, that SDL_opengl.h includes "windows.h", so conflicts with the
miniwin implementation, which breaks builds on windows.

In order to work around this, we do what the Direct3D9 implementation does and
push all of the OpenGL calls to a separate file, actual.cpp.

Going forward, it may make sense to load _all_ OpenGL entry points via SDL,
which would allow us to avoid linking directly with libGL/libOpenGL, and
therefore eliminate the separate build dependency altogether, as well as
allowing more runtime configurability as to the OpenGL library to load.

(But that's definitely a bit uglier, and also useful very rarely.)
2025-06-29 17:47:09 +02:00
Danct12
a782c48980
miniwin: Use PRIu32 for printing uint32_t (#436)
Some architecture uses different type for uint32_t.

For example:
x86_64 | aarch64 = unsigned int
xtensa | riscv32 = long unsigned int
arm              = long unsigned int
2025-06-26 19:41:46 +02:00
Anders Jenbo
dcacdcc711
Fix d3drmmesh type error (#433) 2025-06-26 02:46:10 +02:00
Anders Jenbo
b65284a7a0
Move 2D drawing and upscaling to the renderer (#348) 2025-06-25 19:45:26 +02:00
Anders Jenbo
c8bb0da5a7
Implement DrawFPS (#420) 2025-06-23 21:04:52 +00:00
dcd4262f76
miniwin: fix OpenGL include on macOS (#350) 2025-06-20 22:54:05 +02:00
Anders Jenbo
ff03ffcc5a
Correct types for IDirect3DRMMesh::AddGroup (#345) 2025-06-19 04:55:33 +00:00
Anders Jenbo
6b2db2d85b
Correct some types for IDirect3DRMMesh (#344) 2025-06-19 04:40:03 +00:00
Anders Jenbo
a0c896a0b8
Fix a couple of memory leaks (#342) 2025-06-19 03:55:22 +00:00
Anders Jenbo
ea4b9ab1c9
Implement DirectX 9 backend (#332) 2025-06-18 18:10:48 +02:00
Anders Jenbo
e9c5e5b9ba
Use extensions to probe for 24 or 32bit depth buffer (#329) 2025-06-17 17:50:36 +02:00
Christian Semmler
3cfa3f5bec
Hotfix: reserve instead of resize 2025-06-16 21:00:12 -07:00
Christian Semmler
83205e2e4e
Fix UB in software renderer (#322)
* Fix UB in software renderer

One cannot access elements of the vector that don't exist. `reserve` allocates memory, but doesn't add elements.

`D3DRMVERTEX& dst = m_transformedVerts[i];` is UB and crashes on Windows debug build

* Update renderer.cpp
2025-06-17 05:25:34 +02:00