1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-10-04 13:27:14 +00:00

Add shader interface API to Lua API

This commit is contained in:
fgenesis 2013-05-12 00:06:26 +02:00
commit 8c80cf6318
3 changed files with 102 additions and 1 deletions

View file

@ -35,6 +35,7 @@ AfterEffectManager::AfterEffectManager(int xDivs, int yDivs)
activeShader = AS_NONE;
numEffects = 0;
bRenderGridPoints = true;
scriptShader = 0;
screenWidth = core->getWindowWidth();
screenHeight = core->getWindowHeight();
@ -245,6 +246,7 @@ void AfterEffectManager::setActiveShader(ActiveShader as)
activeShader = as;
}
void AfterEffectManager::renderGrid()
{
#ifdef BBGE_BUILD_OPENGL
@ -278,11 +280,21 @@ void AfterEffectManager::renderGrid()
activeShader = &glowShader;
break;
}
if(scriptShader)
activeShader = scriptShader;
}
if (activeShader)
{
//while(glGetError() != GL_NO_ERROR) {}
activeShader->bind();
activeShader->setInt("tex", 0);
}
screenWidth = core->getWindowWidth();
screenHeight = core->getWindowHeight();

View file

@ -125,6 +125,7 @@ public:
int textureWidth, textureHeight;
Shader blurShader, bwShader, washoutShader, motionBlurShader, glowShader;
Shader *scriptShader;
Vector ** drawGrid;