Ignore:
Timestamp:
07/26/14 04:25:23 (11 years ago)
Author:
epyon
Message:
  • nmd_loader now (temporarily) holds nmd dump code
  • image_data now holds pixel format information
  • minor cleanups
File:
1 edited

Legend:

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

    r204 r292  
    1010using namespace nv;
    1111
    12 nv::gl_texture2d::gl_texture2d( ivec2 size, image_format aformat, datatype adatatype, sampler asampler, void* data /*= nullptr */ )
     12nv::gl_texture2d::gl_texture2d( ivec2 size, pixel_format aformat, datatype adatatype, sampler asampler, void* data /*= nullptr */ )
    1313        : texture2d( size, aformat, adatatype, asampler ), m_name()
    1414{
     
    3838{
    3939        glBindTexture( GL_TEXTURE_2D, m_name.get_value() );
    40         glTexImage2D( GL_TEXTURE_2D, 0, (GLint)nv::image_format_to_enum(m_format), m_size.x, m_size.y, 0, nv::image_format_to_enum(m_format), nv::datatype_to_gl_enum(m_datatype), data );
     40        glTexImage2D( GL_TEXTURE_2D, 0, (GLint)nv::image_format_to_enum(m_format.format), m_size.x, m_size.y, 0, nv::image_format_to_enum(m_format.format), nv::datatype_to_gl_enum(m_format.type), data );
    4141        glBindTexture( GL_TEXTURE_2D, 0 );
    4242}
Note: See TracChangeset for help on using the changeset viewer.