mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-22 20:59:19 +02:00
Merge branch 'milek-dev' into gfx-work
This commit is contained in:
16
PyInt.cpp
16
PyInt.cpp
@@ -30,8 +30,22 @@ void render_task::run() {
|
|||||||
// upload texture data
|
// upload texture data
|
||||||
if( ( outputwidth != nullptr )
|
if( ( outputwidth != nullptr )
|
||||||
&& ( outputheight != nullptr ) ) {
|
&& ( outputheight != nullptr ) ) {
|
||||||
|
const opengl_material &material = GfxRenderer.Material(m_target);
|
||||||
|
if (material.textures[0] != null_handle)
|
||||||
|
{
|
||||||
|
GLuint id = GfxRenderer.Texture(material.textures[0]).id;
|
||||||
|
glBindTexture(GL_TEXTURE_2D, id);
|
||||||
|
}
|
||||||
|
|
||||||
GfxRenderer.Bind_Material( m_target );
|
// setup texture parameters
|
||||||
|
::glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE );
|
||||||
|
::glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );
|
||||||
|
::glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR );
|
||||||
|
if( GLEW_EXT_texture_filter_anisotropic ) {
|
||||||
|
// anisotropic filtering
|
||||||
|
::glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, Global.AnisotropicFiltering );
|
||||||
|
}
|
||||||
|
::glTexEnvf( GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, -1.0 );
|
||||||
// build texture
|
// build texture
|
||||||
glTexImage2D(
|
glTexImage2D(
|
||||||
GL_TEXTURE_2D, 0,
|
GL_TEXTURE_2D, 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user