mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-03-22 15:05:03 +01:00
build 170810. multi-texture materials, reflection map support
This commit is contained in:
@@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user