build 170810. multi-texture materials, reflection map support

This commit is contained in:
tmj-fstate
2017-08-10 18:19:21 +02:00
parent bc22d582de
commit 611ebed7ab
25 changed files with 687 additions and 430 deletions

View File

@@ -216,7 +216,7 @@ ui_layer::render_background() {
if( m_background == 0 ) return;
// NOTE: we limit/expect the background to come with 4:3 ratio.
// TODO, TBD: if we expose texture width or ratio from texture object, this limitation could be lifted
GfxRenderer.Bind( m_background );
GfxRenderer.Bind_Texture( m_background );
auto const height { 768.0f };
auto const &texture = GfxRenderer.Texture( m_background );
float const width = (
@@ -239,7 +239,7 @@ ui_layer::render_texture() {
::glColor4f( 1.f, 1.f, 1.f, 1.f );
::glDisable( GL_BLEND );
GfxRenderer.Bind( NULL );
GfxRenderer.Bind_Texture( NULL );
::glBindTexture( GL_TEXTURE_2D, m_texture );
auto const size = 512.f;
@@ -254,6 +254,8 @@ ui_layer::render_texture() {
glEnd();
::glBindTexture( GL_TEXTURE_2D, NULL );
::glEnable( GL_BLEND );
}
}