- Timestamp:
- 07/03/13 23:38:00 (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/nv/gfx/texture_atlas.hh
r121 r142 4 4 // This file is part of NV Libraries. 5 5 // For conditions of distribution and use, see copyright notice in nv.hh 6 // 7 // TODO: fix behavior for exact fits (1024^2 atlas with border 0 only holds 9 256^2 images...) 6 8 7 9 #ifndef NV_TEXTURE_ATLAS_HH … … 19 21 { 20 22 public: 21 texture_atlas( ivec2 size, size_t depth );23 texture_atlas( ivec2 size, size_t depth, size_t border = 1 ); 22 24 region get_region( ivec2 size ); 23 25 void clear(); -
trunk/nv/interface/mesh.hh
r141 r142 94 94 { 95 95 map::iterator i = m_map.find( attr ); 96 if ( i != m_map.end() && i->second->get_type() != type_to_enum<T>::type )96 if ( i != m_map.end() && i->second->get_type() == type_to_enum<T>::type ) 97 97 { 98 98 return ((vertex_attribute<T>*)(i->second)); -
trunk/src/gfx/texture_atlas.cc
r121 r142 12 12 using namespace nv; 13 13 14 texture_atlas::texture_atlas( glm::ivec2 size, size_t depth )14 texture_atlas::texture_atlas( glm::ivec2 size, size_t depth, size_t border /*= 1*/ ) 15 15 : image( size, depth ), m_used( 0 ) 16 16 { 17 m_nodes.push_back( glm::ivec3( 1, 1, m_size.x - 2) );17 m_nodes.push_back( glm::ivec3( border, border, m_size.x - 2 * border ) ); 18 18 fill( 0 ); 19 19 } … … 79 79 } 80 80 merge(); 81 m_used += static_cast<uint 16>(size.x * size.y);81 m_used += static_cast<uint32>(size.x * size.y); 82 82 return r; 83 83 }
Note: See TracChangeset
for help on using the changeset viewer.