Views: 578,519 Main | Rules/FAQ | Memberlist | Active users | Last posts | Calendar | Stats | Online users | Search 06-26-17 08:08 PM

0 users reading GPU abstraction layers | 1 bot

Main - Homebrew discussion - GPU abstraction layers New reply

Posted on 12-01-14 06:36 PM Link | #41
So this thread is going to list the current known efforts for a stable 3DS graphics layer.

ctrgl by minexew

This is the most interesting I guess. ctrgl is aiming at becoming an OpenGL implementation.

There are still some nonstandard bits that could be made standard, but it's being worked on. So far it looks pretty close to standard OpenGL.

blargGL by StapleButter

(source here)

blargGL isn't aiming at being an OpenGL implementation. It's a thin wrapper around ctrulib's GPU API. Its role is mostly to hide the ugly details like the specific order in which the various GPU-related functions have to be called.

It was made for blargSNES, but could be used anywhere really (just keep in mind it's under the GPL). It also lacks a few features (like index arrays).

The blargSNES codebase also contains a simple block-based VRAM allocator in mem.c.

gs.c by smealum

This is used in smealum's 3dscraft. Not really a graphics layer per se, this code provides support for matrix stacks and VBOs.

blargSNES -- SNES emu for 3DS
More cool stuff

Posted on 12-02-14 02:45 AM Link | #42
Actually, looking at blargGL, it seems to be pretty much the same as ctrGL, except it's not trying to emulate the OpenGL API and just does its own thing. (the essence, state tracking and updating, looks very similar)

As for the nonstandard bits, please let me know if I'm missing any OpenGL functions you think I should implement. There are indeed many extension functions, but most of them should also have a standard equivalent (some functions will obviously never be implemented, e.g. glCompileShader)
Matrix setting is kinda hairy, but it is needed to enable automagic stereo.

Posted on 12-02-14 08:55 AM Link | #43
What comes to my mind is the function you coded for uploading shaders.

OpenGL has glShaderBinary.

Not that it matters much, though. That part is pretty much specific to the 3DS.

blargSNES -- SNES emu for 3DS
More cool stuff

Posted on 12-02-14 10:48 AM Link | #44
Oh right, I completely forgot this existed in GL ES. (probably because I never use ES)

Then again, this would require allocating a shader object aside from a program object, which would pretty much just add bloat for no real benefit. Also, you can't tell glShaderBinary NOT to copy any data.

Main - Homebrew discussion - GPU abstraction layers New reply

Page rendered in 0.034 seconds. (2048KB of memory used)
MySQL - queries: 26, rows: 69/69, time: 0.024 seconds.
[powered by Acmlm] Acmlmboard 2.064 (2015-10-07)
© 2005-2008 Acmlm, Xkeeper, blackhole89 et al.