Robadob / sdl_exp

Low-level graphics engine built over SDL2
MIT License
1 stars 2 forks source link

Particles #29

Open Robadob opened 8 years ago

Robadob commented 8 years ago

A (currently) non-general implementation now exists in the particles2 branch. This is currently upto date with commit 137 of master, manually merged from the particles branch where the last relevant work was Oct 2016 (before being derailed by starting Assimp in there).

Core tasks remaining for this work:

and one optional task:

Robadob commented 7 years ago

This was in the original OP, I think it has since been fixed in modern Shaders, but will leave this note here till that's confirmed.

Just noticed some concerns with the buffer binding that will need investigating prior to merging with master.

ShaderCore::setupBindings() calls glGetProgramResourceIndex() with d.type which is presumed to be GL_SHADER_STORAGE_BUFFER, this isn't a valid value as specified in documentation.

It should likely be GL_SHADER_STORAGE_BLOCK or potentially GL_BUFFER_VARIABLE.

Similarly the call to glBindBufferBase() in useProgram() is hard coded to GL_SHADER_STORAGE_BUFFER where i->second.type may be more suitable.

We should fix this now, before it ends up in a similar place to the now fixed attrib/uniform location/index confusion.

Robadob commented 7 years ago

I looked into valve .pcf particle format, it's a complicated mess with resources embedded inside valve archive files, not worth trying to support.