Shipwright/libultraship/libultraship/Lib/Fast3D
briaguya 350315a5d1
Merge pull request #1769 from HarbourMasters/develop-zhora
zhora -> dev
2022-10-13 14:55:19 -04:00
..
U64/PR/ultra64 Add support for extra buttons to be used as walk speed modifiers (#449) 2022-10-10 08:28:19 +02:00
dxsdk git subrepo clone https://github.com/HarbourMasters/libultraship.git 2022-03-22 02:52:44 +01:00
.gitrepo git subrepo clone https://github.com/HarbourMasters/libultraship.git 2022-03-22 02:52:44 +01:00
LICENSE.txt git subrepo clone https://github.com/HarbourMasters/libultraship.git 2022-03-22 02:52:44 +01:00
README.md git subrepo clone https://github.com/HarbourMasters/libultraship.git 2022-03-22 02:52:44 +01:00
gfx_cc.cpp Moved grayscale effect to the gpu and replaced some texture loads (#221) 2022-04-25 22:19:00 +02:00
gfx_cc.h Implement G_CCMUX_NOISE (#1731) (#1754) 2022-10-12 13:16:06 +02:00
gfx_direct3d11.cpp testing out item replacement (#416) 2022-07-11 20:11:07 -04:00
gfx_direct3d11.h git subrepo clone https://github.com/HarbourMasters/libultraship.git 2022-03-22 02:52:44 +01:00
gfx_direct3d12.cpp git subrepo clone https://github.com/HarbourMasters/libultraship.git 2022-03-22 02:52:44 +01:00
gfx_direct3d12.h git subrepo clone https://github.com/HarbourMasters/libultraship.git 2022-03-22 02:52:44 +01:00
gfx_direct3d12_guids.h git subrepo clone https://github.com/HarbourMasters/libultraship.git 2022-03-22 02:52:44 +01:00
gfx_direct3d_common.cpp Implement Color Clamping (#1753) 2022-10-13 11:15:18 -04:00
gfx_direct3d_common.h git subrepo clone https://github.com/HarbourMasters/libultraship.git 2022-03-22 02:52:44 +01:00
gfx_dxgi.cpp LUS Cleanup: Fixes SDL axis handling. (#1220) 2022-08-16 21:53:45 -04:00
gfx_dxgi.h Implement AnyFPS + option to queue one rendered frame (#401) 2022-05-29 12:16:23 -04:00
gfx_glx.cpp Nintendo switch support (#935) 2022-07-25 21:11:53 -04:00
gfx_glx.h Linux/GCC Support (#28) 2022-05-11 13:18:24 -04:00
gfx_gx2.cpp Wii U: Fix overflow for GX2CopySurfaceEx (#1655) 2022-10-01 18:06:00 +02:00
gfx_gx2.h Wii U: Several fixes and improvements (#1608) 2022-09-27 19:29:55 -04:00
gfx_opengl.cpp Implement Color Clamping (#1753) 2022-10-13 11:15:18 -04:00
gfx_opengl.h git subrepo clone https://github.com/HarbourMasters/libultraship.git 2022-03-22 02:52:44 +01:00
gfx_pc.cpp Implement G_CCMUX_NOISE (#1731) (#1754) 2022-10-12 13:16:06 +02:00
gfx_pc.h LUS Cleanup: Merge Window and GlobalCtx2 classes. (#1259) 2022-08-21 21:08:01 -04:00
gfx_rendering_api.h testing out item replacement (#416) 2022-07-11 20:11:07 -04:00
gfx_screen_config.h git subrepo clone https://github.com/HarbourMasters/libultraship.git 2022-03-22 02:52:44 +01:00
gfx_sdl.h git subrepo clone https://github.com/HarbourMasters/libultraship.git 2022-03-22 02:52:44 +01:00
gfx_sdl2.cpp Handle window closing event to stop SoH (#1556) 2022-09-25 12:12:38 -04:00
gfx_wiiu.cpp Wii U support (#1097) 2022-08-14 22:57:24 -04:00
gfx_wiiu.h Wii U support (#1097) 2022-08-14 22:57:24 -04:00
gfx_window_manager_api.h Controller Configuration UI and JSON Config (#760) 2022-07-13 23:12:11 -04:00
gx2_shader_gen.c Wii U: Several fixes and improvements (#1608) 2022-09-27 19:29:55 -04:00
gx2_shader_gen.h Wii U: Several fixes and improvements (#1608) 2022-09-27 19:29:55 -04:00
gx2_shader_inl.h Wii U support (#1097) 2022-08-14 22:57:24 -04:00

README.md

Nintendo 64 Fast3D renderer

Implementation of a Fast3D renderer for games built originally for the Nintendo 64 platform.

For rendering OpenGL, Direct3D 11 and Direct3D 12 are supported.

Supported windowing systems are GLX (used on Linux), DXGI (used on Windows) and SDL (generic).

Usage

See gfx_pc.h. You will also need a copy of PR/gbi.h, found in libultra.

First call gfx_init(struct GfxWindowManagerAPI *wapi, struct GfxRenderingAPI *rapi, const char *game_name, bool start_in_fullscreen) and supply the desired backends at program start.

Some callbacks can be set on wapi. See gfx_window_manager_api.h for more info.

Each game main loop iteration should look like this:

gfx_start_frame(); // Handles input events such as keyboard and window events
// perform game logic here
gfx_run(cmds); // submit display list and render a frame
// do more expensive work here, such as play audio
gfx_end_frame(); // this just waits until the frame is shown on the screen (vsync), to provide correct game timing

When you are ready to start the main loop, call wapi->main_loop(one_iteration_func).

For the best experience, please change the Vtx and Mtx structures to use floats instead of fixed point arithmetic (GBI_FLOATS).

License

See LICENSE.txt. Redistributions are allowed only in source form, not in binary form.