mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 04:19:19 +02:00
further pruning of legacy render code, now runs on opengl 3.3 core
profile
This commit is contained in:
18
Texture.cpp
18
Texture.cpp
@@ -613,10 +613,6 @@ opengl_texture::create() {
|
||||
|
||||
set_filtering();
|
||||
|
||||
if( data_mapcount == 1 ) {
|
||||
// fill missing mipmaps if needed
|
||||
::glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP, GL_TRUE );
|
||||
}
|
||||
// upload texture data
|
||||
int dataoffset = 0,
|
||||
datasize = 0,
|
||||
@@ -654,6 +650,11 @@ opengl_texture::create() {
|
||||
}
|
||||
}
|
||||
|
||||
if( data_mapcount == 1 ) {
|
||||
// fill missing mipmaps if needed
|
||||
glGenerateMipmap(GL_TEXTURE_2D);
|
||||
}
|
||||
|
||||
if( ( true == Global.ResourceMove )
|
||||
|| ( false == Global.ResourceSweep ) ) {
|
||||
// if garbage collection is disabled we don't expect having to upload the texture more than once
|
||||
@@ -730,15 +731,6 @@ opengl_texture::set_filtering() const {
|
||||
default: { break; }
|
||||
}
|
||||
}
|
||||
|
||||
if( true == sharpen ) {
|
||||
// #: sharpen more
|
||||
::glTexEnvf( GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, -2.0 );
|
||||
}
|
||||
else {
|
||||
// regular texture sharpening
|
||||
::glTexEnvf( GL_TEXTURE_FILTER_CONTROL, GL_TEXTURE_LOD_BIAS, -1.0 );
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user