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:
parent
3485199bec
commit
836de14093
3 changed files with 96 additions and 73 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue