No description
  • C 87.1%
  • C++ 7.6%
  • CMake 5.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-08-11 20:17:18 +03:00
.github/workflows Build docs (#49) 2024-06-24 07:54:48 +01:00
cmake Build docs (#49) 2024-06-24 07:54:48 +01:00
doc docs: add information on OpenGL 2.0+ (#102) 2025-03-24 23:51:33 +00:00
examples examples: add an OpenGL 3.0 example using FBOs 2025-04-20 22:59:32 +03:00
include include: update glext file with latest from Mesa 2025-03-15 09:53:32 +00:00
src debug: add a new debug flag to log VBO usage 2026-08-11 20:17:18 +03:00
.clang-format style: run clang-format 2024-04-27 17:14:12 +01:00
.gitignore Initial commit 2013-04-27 09:25:43 -07:00
CMakeLists.txt fbo: implement FBO API 2025-04-20 22:59:32 +03:00
opengl.pc.in pkg-config: link to libogc and libstdc++ 2025-04-20 22:59:32 +03:00
OpenGLConfig.cmake cmake: use pkg-config to check for glu 2024-05-20 17:04:17 +01:00
README.md Update README 2025-01-01 13:06:53 +00:00

OpenGX

OpenGX is an OpenGL-like wrapper which sits on GX subsystem. It implements the most common OpenGL calls such as immediate mode, texturing, array drawing (indexed and not indexed), matrix operations and basic lighting. It features some advanced stuff such as automatic texture compression (ARB extension) and mipmapping. Beware! Some parts are currently NOT opengl compilant (speaking strictly).

Current status

OpenGX should be able to cover the needs of most OpenGL 1.5 applications. Features are implemented on a per need basis: if a feature is not implemented (or not implemented correctly) the most likely reason is that the OpenGX developers haven't yet encountered an application that they wanted to port that needed it. So, if a missing feature is blocking your adoption of OpenGX, please file an issue; for a faster resolution, providing some code through which the feature can be tested will undoubtedly help.

For a list of implemented functions, please refer to the src/functions.c file.

TODO list:

  • Implement spotlights
  • Complete glGet calls

There are several limitations on the implementation of many features, mostly due to the hardware. They are detailed in the PDF documentation, but feel free to file an issue if unsure.

Design documentation

Please see the opengx.pdf file which is automatically generated with each build.

Build instructions

The project is built with cmake and requires the libogc package from devkitPro. Once these dependencies are installed, build opengx as follows:

# Use GameCube.cmake to build for the GameCube instead
cmake -S. -Bbuild -DCMAKE_TOOLCHAIN_FILE="$DEVKITPRO/cmake/Wii.cmake"
cd build
make
# Optional, to install it into devkitPro's portslib:
sudo -E PATH=$PATH make install

Running OpenGX applications in Dolphin

OpenGX makes use of some GX features which require changing specific Dolphin settings from their default values:

  • Graphics -> Hacks -> Texture Cache -> Accuracy: move it all towards "Safe"
  • Graphics -> Hacks -> Embedded Frame Buffer (EFB) -> Uncheck "Store EFB copies to texture only"
  • Graphics -> Hacks -> External Frame Buffer (XFB) -> Uncheck "Store XFB copies to texture only"
  • Graphics -> Hacks -> Other -> Uncheck "Disable Bounding Box"