mirror of
https://github.com/AquariaOSE/Aquaria.git
synced 2025-10-04 21:34:41 +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();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue