Changeset 498 for trunk/src/gl


Ignore:
Timestamp:
06/03/16 16:24:49 (9 years ago)
Author:
epyon
Message:
  • ecs implementation
  • mipmapping by default for material manager
  • minor fixes
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gl/gl_device.cc

    r493 r498  
    109109
    110110        // Detect if mipmapping was requested
    111         if ( gl_type == GL_TEXTURE_2D && gl_enum != GL_RED_INTEGER && asampler.filter_min != sampler::LINEAR && asampler.filter_min != sampler::NEAREST )
    112         {
    113                 // TODO: This should not be done if we use framebuffers!
    114                 glTexParameteri( gl_type, GL_GENERATE_MIPMAP, GL_TRUE);
    115         }
     111//      if ( gl_type == GL_TEXTURE_2D && gl_enum != GL_RED_INTEGER && asampler.filter_min != sampler::LINEAR && asampler.filter_min != sampler::NEAREST )
     112//      {
     113//              // TODO: This should not be done if we use framebuffers!
     114//              glTexParameteri( gl_type, GL_GENERATE_MIPMAP, GL_TRUE);
     115//      }
    116116
    117117        if ( asampler.filter_max != sampler::NEAREST )
     
    154154        else
    155155                glTexImage2DMultisample( gl_type, 4, gl_internal, size.x, size.y, 1 );
     156
     157        if ( gl_type == GL_TEXTURE_2D && gl_enum != GL_RED_INTEGER && asampler.filter_min != sampler::LINEAR && asampler.filter_min != sampler::NEAREST )
     158        {
     159                // TODO: This should not be done if we use framebuffers!
     160                glGenerateMipmap( gl_type );
     161        }
     162
    156163
    157164        glBindTexture( gl_type, 0 );
Note: See TracChangeset for help on using the changeset viewer.