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:
parent
2ac3ad9fb1
commit
8c80cf6318
3 changed files with 102 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
|
@ -125,6 +125,7 @@ public:
|
|||
int textureWidth, textureHeight;
|
||||
|
||||
Shader blurShader, bwShader, washoutShader, motionBlurShader, glowShader;
|
||||
Shader *scriptShader;
|
||||
|
||||
Vector ** drawGrid;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue