Some UI code cleanup. Another variant of ease curve function. RebindTexture.

This commit is contained in:
Henrik Rydgard committed 2012-11-22 18:41:04 +01:00
1 parent 16e3d67063
commit 8677fac72c
14 files changed
+193 -102

No files matched your search

+40 -5
View File
@@ -23,19 +23,54 @@ void UIContext::Begin()
uidrawbufferTop_->Begin();*/
}
void UIContext::End()
void UIContext::RebindTexture()
{
if (uitexture_)
uitexture_->Bind(0);
}
void UIContext::Flush()
{
UIEnd();
if (uidrawbuffer_)
{
uidrawbuffer_->End();
if (uishader_)
if (uishader_) {
glsl_bind(uishader_);
uidrawbuffer_->Flush(uishader_);
}
}
if (uidrawbufferTop_)
{
uidrawbuffer_->End();
if (uishader_)
uidrawbufferTop_->End();
if (uishader_) {
glsl_bind(uishader_);
uidrawbufferTop_->Flush(uishader_);
}
}
}
void UIContext::FlushNoTex()
{
if (uidrawbuffer_)
{
uidrawbuffer_->End();
if (uishadernotex_) {
glsl_bind(uishadernotex_);
uidrawbuffer_->Flush(uishadernotex_);
}
}
if (uidrawbufferTop_)
{
uidrawbufferTop_->End();
if (uishadernotex_) {
glsl_bind(uishadernotex_);
uidrawbufferTop_->Flush(uishadernotex_);
}
}
}
void UIContext::End()
{
UIEnd();
Flush();
}