Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/Rinnegatamante/vitaGL

openGL wrapper for PSVITA.
https://github.com/Rinnegatamante/vitaGL

Last synced: about 1 month ago
JSON representation

openGL wrapper for PSVITA.

Awesome Lists containing this project

README

        


vitaGL is an opensource openGL driver for PSVITA development. It acts as a wrapper between openGL and sceGxm and allows to use a subset of openGL functions with full hardware acceleration by translating the code to sceGxm equivalent.

# Prerequisites
In order to run an homebrew made with vitaGL, you are going to need libshacccg.suprx extracted and decrypted on your console. You can refer to this guide for more details about its extraction: https://samilops2.gitbook.io/vita-troubleshooting-guide/shader-compiler/extract-libshacccg.suprx

If you want your homebrew to not be hard dependant from libshacccg.suprx, you can either:
- Stick to fixed function pipeline features (GL1) while using this old legacy version of the library: https://github.com/Rinnegatamante/vitaGL/tree/legacy_precompiled_ffp

# Build Instructions
In order to build vitaGL use the following command: `make install`.

These are all the available flags usable when compiling the library:

### Debug Flags
| Flag | Description |
| --- | --- |
| `HAVE_SHARK_LOG=1`| Enables logging support in runtime shader compiler.|
|`LOG_ERRORS=1`| Errors will be logged with sceClibPrintf.|
|`LOG_ERRORS=2`| Errors will be logged to ux0:data/vitaGL.log.|
|`HAVE_DEBUGGER=1`| Enables lightweighted on screen debugger interface.|
|`HAVE_DEBUGGER=2`| Enables lightweighted on screen debugger interface with extra information (devkit only).|
|`HAVE_RAZOR=1`| Enables debugging features through Razor debugger (retail and devkit compatible).|
|`HAVE_RAZOR=2`| Enables debugging features through Razor debugger (retail and devkit compatible) with ImGui interface.|
|`HAVE_DEVKIT=1`| Enables extra debugging features through Razor debugger available only for devkit users.|
|`HAVE_DEVKIT=2`| Enables extra debugging features through Razor debugger available only for devkit users with ImGui interface.|
### Compatibility Flags
| Flag | Description |
| --- | --- |
|`HAVE_CUSTOM_HEAP=1`| Replaces sceClib heap implementation with custom one (Less efficient but safer).|
|`HAVE_GLSL_SUPPORT=1`| Enables experimental GLSL to CG auto translation for shader sources.|
|`SOFTFP_ABI=1`| Compiles the library in soft floating point compatibility mode.|
|`STORE_DEPTH_STENCIL=1`| Makes all framebuffers depth/stencil surfaces to be load/stored on memory. Makes the rendering slower but more compliant with OpenGL standards.|
|`HAVE_HIGH_FFP_TEXUNITS=1`| Enables support for more than 2 texunits for fixed function pipeline at the cost of some performance loss.|
|`HAVE_DISPLAY_LISTS=1`| Enables support for display lists at the cost of some performance loss.|
|`SAFE_ETC1=1`| Disables hardware support for ETC1 textures. Makes ETC1 textures usage less efficient but allows for proper debugging in Razor.|
|`SAFE_DRAW=1`| Makes some optimizations in the drawing pipeline less efficient but can solve some glitches.|
|`UNPURE_TEXFORMATS=1`| Enables support for texture dimensions different than 2D (tex2D is still required in shader code).|
|`HAVE_VITA3K_SUPPORT=1`| Disables several features in order to make vitaGL compatible with Vita3K. Requires vitaShaRK compiled with https://github.com/Rinnegatamante/vitaShaRK/blob/master/source/vitashark.c#L24 uncommented.|
### Speedhack Flags
| Flag | Description |
| --- | --- |
|`NO_TEX_COMBINER=1`| Disables texture combiner support (GL_COMBINE) for faster fixed function pipeline code execution.|
|`NO_DEBUG=1`| Disables most of the error handling features (Faster CPU code execution but code may be non compliant to all OpenGL standards).|
|`BUFFERS_SPEEDHACK=1`| Enables faster vertex buffer copying. May cause crashes.|
|`DRAW_SPEEDHACK=1`| Enables faster code for draw calls. May cause crashes.|
|`MATH_SPEEDHACK=1`| Enables faster code for matrix math calls. May cause glitches.|
|`TEXTURES_SPEEDHACK=1`| Makes glTexSubImage2D/glTexSubImage1D non fully OpenGL compliant but makes rendering pipeline slightly faster. Incompatible with HAVE_TEXTURE_CACHE=1.|
|`SAMPLERS_SPEEDHACK=1`| Enables faster code for samplers resolution during shaders usage. May cause glitches.|
|`SHADER_COMPILER_SPEEDHACK=1`| Enables faster code for glShaderSource. May cause errors.|
|`PRIMITIVES_SPEEDHACK=1`| Makes draw calls more efficient but GL_LINES and GL_POINTS primitives usage may cause glitches.|
### Misc Flags
| Flag | Description |
| --- | --- |
|`HAVE_TEXTURE_CACHE=1`| Adds file caching for textures not used since a lot of time, acting like a sort of swap implementation to increase effective available memory. (Experimental)|
|`NO_DMAC=1`| Disables sceDmacMemcpy usage. In some rare instances, it can improve framerate.|
|`HAVE_UNFLIPPED_FBOS=1`| Framebuffers objects won't be internally flipped to match OpenGL standards.|
|`HAVE_WVP_ON_GPU=1`| Moves calculation of the wvp in fixed function pipeline codepath to the GPU. Reduces CPU workload and increases GPU one.|
|`SHARED_RENDERTARGETS=1`| Makes small framebuffers objects use shared rendertargets instead of dedicated ones.|
|`SHARED_RENDERTARGETS=2`| Makes small framebuffers objects use shared rendertargets instead of dedicated ones and adds a mechanism for recycling older rendertargets.|
|`CIRCULAR_VERTEX_POOL=1`| Makes temporary data buffers being handled with a circular pool.|
|`HAVE_PTHREAD=1`| Use pthread instead of sceKernel for starting garbage collector thread.|
|`SINGLE_THREADED_GC=1`| Makes the garbage collector run on main thread.|
|`PHYCONT_ON_DEMAND=1`| Makes the physically contiguous RAM be handled with separate memblocks instead of an heap.|
|`UNPURE_TEXTURES=1`| Makes legal to upload textures without base level.|
|`HAVE_WRAPPED_ALLOCATORS=1`| Allows usage of vgl allocators inside wrapped allocators.|
|`HAVE_SHADER_CACHE=1`| Enables fast automatic file caching (based on XH3 xxHash algorithm) for application provided shaders.|

# Samples

You can find samples in the *samples* folder in this repository.

# Help and Troubleshooting

If you plan to use vitaGL for one of your projects, you can find an official channel to get help with it on Vita Nuova discord server: https://discord.gg/PyCaBx9

# Projects actually using vitaGL

Here you can find a list of projects using vitaGL:

Direct OpenGL Usage:

[Aerofoil Vita](https://vitadb.rinnegatamante.it/#/info/1040) - Port of Glider PRO

[Anomaly 2 Vita](https://vitadb.rinnegatamante.it/#/info/1050) - Port of Anomaly 2

[Anomaly Defenders Vita](https://vitadb.rinnegatamante.it/#/info/1051) - Port of Anomaly Defenders

[Anomaly Korea](https://vitadb.rinnegatamante.it/#/info/1047) - Port of Anomaly Korea

[Anomaly WE Vita](https://vitadb.rinnegatamante.it/#/info/1046) - Port of Anomaly Warzone Earth HD

[AvP Gold](https://vitadb.rinnegatamante.it/#/info/569) - Port of Aliens versus Predator: Gold Edition

[Baba Is You Vita](https://vitadb.rinnegatamante.it/#/info/828) - Port of Baba Is You

[Billy Frontier Vita](https://vitadb.rinnegatamante.it/#/info/1001) - Port of Billy Frontier

[Bugdom](https://vitadb.rinnegatamante.it/#/info/841) - Port of Bugdom

[bc2_vita](https://vitadb.rinnegatamante.it/#/info/714) - Port of Battlefield Bad Company 2 Mobile

[Crazy Taxi Vita](https://vitadb.rinnegatamante.it/#/info/728) - Port of Crazy Taxi Classic

[Cro-Mag Rally Vita](https://vitadb.rinnegatamante.it/#/info/872) - Port of Cro-Mag Rally

[CrossCraft Classic](https://vitadb.rinnegatamante.it/#/info/848) - Multiplatform Minecraft Classic clone

[d3es-vita](https://github.com/Rinnegatamante/d3es-vita) - Port of Doom 3

[Daedalus X64](https://vitadb.rinnegatamante.it/#/info/553) - Port of Daedalus X64 (N64 Emulator)

[Dead Space Vita](https://vitadb.rinnegatamante.it/#/info/999) - Port of Dead Space (Android)

[Death Road to Canada Lite](https://vitadb.rinnegatamante.it/#/info/846) - Port of Death Road to Canada

[Doom64EX](https://vitadb.rinnegatamante.it/#/info/881) - Port of Doom64EX (Doom 64 sourceport)

[Fade to Black](https://vitadb.rinnegatamante.it/#/info/367) - Port of Fade to Black

[Fahrenheit Vita](https://vitadb.rinnegatamante.it/#/info/835) - Port of Fahrenheit: Indigo Prophecy

[FF3-Vita](https://vitadb.rinnegatamante.it/#/info/725) - Port of Final Fantasy III (3D Remake)

[FF4-Vita](https://vitadb.rinnegatamante.it/#/info/726) - Port of Final Fantasy IV (3D Remake)

[FF4AY_Vita](https://vitadb.rinnegatamante.it/#/info/989) - Port of Final Fantasy IV: The After Years (3D Remake)

[FF5-Vita](https://vitadb.rinnegatamante.it/#/info/733) - Port of Final Fantasy V

[Flycast](https://vitadb.rinnegatamante.it/#/info/605) - Port of Flycast (Dreamcast Emulator)

[Funky Smugglers Vita](https://vitadb.rinnegatamante.it/#/info/1044) - Port of Funky Smugglers

[Hassey Collection](https://vitadb.rinnegatamante.it/#/info/1014) - Port of Galcon 2: Galactic Conquest and BREAKFINITY

[Hurrican](https://vitadb.rinnegatamante.it/#/info/617) - Port of Hurrican

[Isotope 244 Collection](https://vitadb.rinnegatamante.it/#/info/873) - Port of Machines at War 3 and Land Air Sea Warfare

[JetMan 3D](https://vitadb.rinnegatamante.it/#/info/719) - Fanmade remake of Jetpac for ZX Spectrum

[jfduke3d-vita](https://vitadb.rinnegatamante.it/#/info/711) - Port of JFDuke3D (Duke Nukem 3D sourceport)

[jfsw-vita](https://vitadb.rinnegatamante.it/#/info/705) - Port of JFSW (Shadow Warrior Classic sourceport)

[Lugaru HD](https://vitadb.rinnegatamante.it/#/info/853) - Port of Lugaru

[Mass Effect Infiltrator Vita](https://vitadb.rinnegatamante.it/#/info/1019) - Port of Mass Effect: Infiltrator

[Nanosaur Vita](https://vitadb.rinnegatamante.it/#/info/851) - Port of Nanosaur

[Nazi Zombies Portable](https://vitadb.rinnegatamante.it/#/info/757) - Port of Nazi Zombies Portable

[Neverball Vita](https://vitadb.rinnegatamante.it/#/info/873) - Port of Neverball

[Neverputt Vita](https://vitadb.rinnegatamante.it/#/info/874) - Port of Neverputt

[Pekka Kana 2 Vita](https://vitadb.rinnegatamante.it/#/info/847) - Port of Pekka Kana 2

[Poppy Kart Collection](https://vitadb.rinnegatamante.it/#/info/1030) - Port of Poppy Kart and Poppy Kart 2

[prboom-plus](https://vitadb.rinnegatamante.it/#/info/591) - Port of PrBoom Plus (Doom engine sourceport)

[Quakespasm-Spiked](https://vitadb.rinnegatamante.it/#/info/716) - Port of Quakespasm Spiked (Limit removed Quake Engine sourceport)

[Rigel Engine](https://vitadb.rinnegatamante.it/#/info/988) - Port of Duke Nukem II

[RVGL Vita](https://vitadb.rinnegatamante.it/#/info/840) - Port of RVGL

[rvm_soniccd-vitagl](https://github.com/fgsfdsfgs/rvm_soniccd/tree/vitagl) - Port of rvm_soniccd (Sonic CD decompilation)

[Sleepwalker's Journey Vita](https://vitadb.rinnegatamante.it/#/info/1048) - Port of Sleepwalker's Journey

[sm64-vita](https://github.com/bythos14/sm64-vita) - Port of Super Mario 64

[srb2-vita](https://github.com/Rinnegatamante/srb2-vita) - Port of Sonic Robo Blast 2

[StaticJK](https://github.com/Rinnegatamante/StaticJK) - Port of Star Wars: Jedi Academy

[TheXTech Vita](https://vitadb.rinnegatamante.it/#/info/727) - Port of Super Mario Bros X

[Tomb Raider 1 & 2 Classic Collection](https://vitadb.rinnegatamante.it/#/info/845) - Port of Tomb Raider and Tomb Raider 2

[TWoM Vita](https://vitadb.rinnegatamante.it/#/info/802) - Port of This War of Mine and This War of Mine: Stories - Father's Promise

[VITA Homebrew Sorter](https://vitadb.rinnegatamante.it/#/info/655) - App to sort your app.db

[VitaDB Downloader](https://vitadb.rinnegatamante.it/#/info/877) - Homebrew store app

[VITAlbum](https://vitadb.rinnegatamante.it/#/info/566) - Filebrowser and image viewer app

[vitaET](https://github.com/Rinnegatamante/vitaET) - Port of ET: Legacy (Wolfenstein: Enemy Territory)

[vitaHexenII](https://vitadb.rinnegatamante.it/#/info/196) - Port of Hexen II

[vitaQuake](https://vitadb.rinnegatamante.it/#/info/10) - Port of Quake I and mission packs

[vitaQuakeII](https://vitadb.rinnegatamante.it/#/info/278) -Port of Quake II and mission packs

[vitaQuakeIII](https://vitadb.rinnegatamante.it/#/info/375) - Port of ioquake3 (Quake III: Arena, Quake III: Team Arena, OpenArena, Urban Terror)

[vitaRTCW](https://vitadb.rinnegatamante.it/#/info/459) - Port of iortcw (Return to Castle Wolfenstein)

[vitaVoyager](https://vitadb.rinnegatamante.it/#/info/491) - Port of lilium-voyager (Star Trek Voyager: Elite Force)

[vitaXash3D](https://vitadb.rinnegatamante.it/#/info/365) - Port of Xash3D (Half Life, Counter Strike 1.6)

[World of Goo Vita](https://vitadb.rinnegatamante.it/#/info/806) - Port of World of Goo

[YoYo Loader](https://vitadb.rinnegatamante.it/#/info/815) - Loader for Game Maker Studio made games

Libraries:

[imgui_vita](https://github.com/Rinnegatamante/imgui-vita) - Port of dear imGui

[sdl12_gl](https://github.com/Rinnegatamante/SDL-Vita/tree/sdl12_gl/src) - SDL 1.2 Vita port adapted to work with vitaGL as renderer backend

[SDL2_vitagl](https://github.com/Northfear/SDL/tree/vitagl) - SDL2 Vita port adapted to work with vitaGL as renderer backend

sdl12_gl Apps:

[Dstroy Vita](https://vitadb.rinnegatamante.it/#/info/383) - Port of Dstroy

[meritous](https://vitadb.rinnegatamante.it/#/info/411) - Port of meritous

[SuperMarioWar](https://vitadb.rinnegatamante.it/#/info/422) - Port of Super Mario War

[vitaWolfen](https://vitadb.rinnegatamante.it/#/info/31) - Port of Wolf4SDL (Wolfenstein 3D)

[Zelda3T](https://vitadb.rinnegatamante.it/#/info/334) - Port of Zelda: Time to Triumph

[ZeldaNSQ](https://vitadb.rinnegatamante.it/#/info/350) - Port of Zelda: Navi's Quest

[ZeldaOLB](https://vitadb.rinnegatamante.it/#/info/265) - Port of Zelda: Oni Link Begins

[ZeldaROTH](https://vitadb.rinnegatamante.it/#/info/109) - Port of Zelda: Return of the Hylian