Changeset 70 for trunk/src/gl
- Timestamp:
- 06/01/13 00:24:07 (12 years ago)
- Location:
- trunk/src/gl
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gl/gl_device.cc
r62 r70 67 67 } 68 68 69 texture2d* gl_device::create_texture2d( ivec2 size, image_format aformat, etype adatatype, sampler asampler, void* data /*= nullptr */ )69 texture2d* gl_device::create_texture2d( ivec2 size, image_format aformat, datatype adatatype, sampler asampler, void* data /*= nullptr */ ) 70 70 { 71 71 return new gl_texture2d( size, aformat, adatatype, asampler, data ); -
trunk/src/gl/gl_enum.cc
r68 r70 185 185 } 186 186 187 unsigned int nv:: type_to_gl_enum( etype type )187 unsigned int nv::datatype_to_gl_enum( datatype type ) 188 188 { 189 189 switch( type ) … … 213 213 } 214 214 215 nv:: etype nv::gl_enum_to_type( unsigned int gl_enum )215 nv::datatype nv::gl_enum_to_datatype( unsigned int gl_enum ) 216 216 { 217 217 switch( gl_enum ) … … 233 233 case GL_INT_VEC3 : return INT_VECTOR_3; 234 234 case GL_INT_VEC4 : return INT_VECTOR_4; 235 default : return etype(0); // TODO: throw!236 } 237 } 235 default : return datatype(0); // TODO: throw! 236 } 237 } -
trunk/src/gl/gl_program.cc
r62 r70 156 156 int attr_loc = glGetAttribLocation( m_name.get_value(), name.c_str() ); 157 157 158 m_attribute_map[ name ] = new attribute( name, attr_loc, gl_enum_to_ type( attr_type ), attr_len );158 m_attribute_map[ name ] = new attribute( name, attr_loc, gl_enum_to_datatype( attr_type ), attr_len ); 159 159 } 160 160 } … … 180 180 181 181 int uni_loc = glGetUniformLocation( m_name.get_value(), name.c_str() ); 182 etype utype = gl_enum_to_type( uni_type );182 datatype utype = gl_enum_to_datatype( uni_type ); 183 183 m_uniform_map[ name ] = create_uniform( utype, name, uni_loc, uni_len ); 184 184 } -
trunk/src/gl/gl_texture2d.cc
r62 r70 10 10 using namespace nv; 11 11 12 nv::gl_texture2d::gl_texture2d( ivec2 size, image_format aformat, etype adatatype, sampler asampler, void* data /*= nullptr */ )12 nv::gl_texture2d::gl_texture2d( ivec2 size, image_format aformat, datatype adatatype, sampler asampler, void* data /*= nullptr */ ) 13 13 : texture2d( size, aformat, adatatype, asampler ), m_name() 14 14 { … … 31 31 { 32 32 glBindTexture( GL_TEXTURE_2D, m_name.get_value() ); 33 glTexImage2D( GL_TEXTURE_2D, 0, nv::image_format_to_enum(m_format), m_size.x, m_size.y, 0, nv::image_format_to_enum(m_format), nv:: type_to_gl_enum(m_datatype), data );33 glTexImage2D( GL_TEXTURE_2D, 0, 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 ); 34 34 glBindTexture( GL_TEXTURE_2D, 0 ); 35 35 } -
trunk/src/gl/gl_vertex_buffer.cc
r44 r70 89 89 location, 90 90 va->get_components(), 91 nv:: type_to_gl_enum( va->get_datatype() ),91 nv::datatype_to_gl_enum( va->get_datatype() ), 92 92 GL_FALSE, 93 93 va->get_stride(),
Note: See TracChangeset
for help on using the changeset viewer.