Changeset 2758


Ignore:
Timestamp:
Jun 21, 2013, 6:27:50 PM (6 years ago)
Author:
benlitz
Message:

Added mipmap generation function for textures (i lied, it was easy with d3d9 <3)

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gpu/texture.cpp

    r2743 r2758  
    292292}
    293293
     294void Texture::GenerateMipmaps()
     295{
     296#if defined _XBOX || defined USE_D3D9
     297    m_data->m_texture->GenerateMipSubLevels();
     298#else
     299    glBindTexture(GL_TEXTURE_2D, m_data->m_texture);
     300    glGenerateMipmap(GL_TEXTURE_2D);
     301#endif
     302}
     303
    294304Texture::~Texture()
    295305{
  • trunk/src/lol/gpu/texture.h

    r2743 r2758  
    101101    void SetMagFiltering(TextureMagFilter filter);
    102102    void SetMinFiltering(TextureMinFilter filter);
     103        void GenerateMipmaps();
    103104
    104105    ShaderTexture GetTexture() const;
Note: See TracChangeset for help on using the changeset viewer.