Changeset 534 for trunk/src/gui/gui_gfx_renderer.cc
- Timestamp:
- 01/12/17 14:41:17 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/gui/gui_gfx_renderer.cc
r501 r534 109 109 { 110 110 public: 111 screen_render_data( context* actx, nv:: size_tinitial_size )111 screen_render_data( context* actx, nv::uint32 initial_size ) 112 112 : buffer( actx, VERTEX_BUFFER, DYNAMIC_DRAW, initial_size ), ctx( actx ), varray(), shader() 113 113 { … … 147 147 m_area.dim( dimension( w->get_width(), w->get_height() ) ); 148 148 region white = m_atlas.get_region( ivec2( 3, 3 ) ); 149 size_twsize = m_atlas.get_depth() * 4 * 4;149 uint32 wsize = m_atlas.get_depth() * 4 * 4; 150 150 uint8* wfill = new uint8[m_atlas.get_depth() * 4 * 4]; 151 151 raw_fill( wfill, wfill + wsize, 255 ); … … 178 178 } 179 179 180 texture_font* gfx_renderer::get_font( nv:: size_tname ) const180 texture_font* gfx_renderer::get_font( nv::uint32 name ) const 181 181 { 182 182 if ( name >= m_fonts.size() ) return nullptr; … … 184 184 } 185 185 186 const image_info* gfx_renderer::get_image( nv:: size_tname ) const186 const image_info* gfx_renderer::get_image( nv::uint32 name ) const 187 187 { 188 188 if ( name >= m_images.size() ) return nullptr; … … 190 190 } 191 191 192 nv:: size_t gfx_renderer::load_font( const string_view& filename, nv::size_tsize )192 nv::uint32 gfx_renderer::load_font( const string_view& filename, nv::uint32 size ) 193 193 { 194 194 string128 id( filename ); … … 199 199 return i->second; 200 200 } 201 size_tresult = m_fonts.size();201 uint32 result = m_fonts.size(); 202 202 texture_font* f = new texture_font( &m_atlas, filename.data(), static_cast<float>( size ) ); 203 203 f->load_glyphs( "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ " ); … … 208 208 } 209 209 210 nv:: size_tgfx_renderer::load_image( const string_view& filename )210 nv::uint32 gfx_renderer::load_image( const string_view& filename ) 211 211 { 212 212 auto i = m_image_names.find( filename ); … … 215 215 return i->second; 216 216 } 217 size_tresult = m_images.size();217 uint32 result = m_images.size(); 218 218 image_data* data = m_window->get_device()->create_image_data( filename ); 219 219 // TODO: Repitching … … 236 236 } 237 237 element_render_data* er = reinterpret_cast< element_render_data* >( e->m_render_data ); 238 size_tsize_before = er->buffer.data().size();238 uint32 size_before = er->buffer.data().size(); 239 239 240 240 vector< gui_quad >& qvec = er->buffer.lock(); … … 254 254 if ( m_style.get( e, "skin", selector, path ) ) 255 255 { 256 size_timage_id = load_image( path );256 uint32 image_id = load_image( path ); 257 257 const image_info* image = get_image( image_id ); 258 258 if ( image ) … … 319 319 if ( m_style.get( e, "text_color", selector, color ) && m_style.get( e, "text_font", selector, path ) && m_style.get( e, "text_size", selector, border ) ) 320 320 { 321 size_t font_id = load_font( path, size_t( border ) );321 uint32 font_id = load_font( path, uint32( border ) ); 322 322 texture_font* font = get_font( font_id ); 323 323 position p = abs.ul + position( 0, border );
Note: See TracChangeset
for help on using the changeset viewer.