1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-10-06 06:10:45 +00:00

Implement multi-pass postprocessing shader.

This allows attaching multiple shader programs, processing the entire
screen as texture. Chaining shaders works, each shader will use
the output of the previous shader as input.
This commit is contained in:
fgenesis 2013-06-15 02:38:49 +02:00
commit 836de14093
3 changed files with 96 additions and 73 deletions

View file

@ -192,6 +192,13 @@ unsigned int Shader::_compileShader(int type, const char *src, char *errbuf, siz
#ifdef BBGE_BUILD_SHADERS
GLint compiled = 0;
GLhandleARB handle = glCreateShaderObjectARB(type);
if(!handle)
{
std::ostringstream os;
os << "Failed to create shader object of type " << type;
debugLog(os.str());
return 0;
}
glShaderSourceARB( handle, 1, &src, NULL );
glCompileShaderARB( handle);