Shipwright/libultraship/libultraship/Lib/Fast3D
Kenix3 51e4485966
LUS Cleanup: Merge Window and GlobalCtx2 classes. (#1259)
* Merges GlobalCtx2 and Window classes.

* Includes condition variable in File.

* add mac specific include

* sstream to get past "implicit instantiation of undefined template" error

* switch/wiiu includes

* that file doesn't exist

* more wii u globalctx2 stuff

Co-authored-by: briaguya <briaguya@alice>
2022-08-21 21:08:01 -04:00
..
U64/PR/ultra64 Make libultra OSContPad struct consistent with the one from libultraship 2022-08-11 19:41:53 -04: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 Moved grayscale effect to the gpu and replaced some texture loads (#221) 2022-04-25 22:19:00 +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 Removed ternary operator 2022-04-25 19:14:46 -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 LUS Cleanup: Merge Window and GlobalCtx2 classes. (#1259) 2022-08-21 21:08:01 -04:00
gfx_gx2.h Wii U support (#1097) 2022-08-14 22:57:24 -04:00
gfx_opengl.cpp LUS Cleanup: Merge Window and GlobalCtx2 classes. (#1259) 2022-08-21 21:08:01 -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 LUS Cleanup: Merge Window and GlobalCtx2 classes. (#1259) 2022-08-21 21:08:01 -04: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 SDL/OpenGL - actually use the window resolution from the json (#1082) 2022-08-08 19:46:37 -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 support (#1097) 2022-08-14 22:57:24 -04:00
gx2_shader_gen.h Wii U support (#1097) 2022-08-14 22:57:24 -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.