Changeset 28 for trunk


Ignore:
Timestamp:
05/20/13 22:22:36 (12 years ago)
Author:
melon
Message:

Just some reformating, got rid of compiler warnings.

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/nv/gl/texture_font.hh

    r24 r28  
    1919        struct texture_glyph
    2020        {
    21             uint16 charcode;
     21                uint16 charcode;
    2222                glm::ivec2 size;
    23             glm::ivec2 offset;
    24             glm::vec2 advance;
    25             glm::vec2 tl;
    26             glm::vec2 br;
     23                glm::ivec2 offset;
     24                glm::vec2 advance;
     25                glm::vec2 tl;
     26                glm::vec2 br;
    2727                std::unordered_map< uint16, float > kerning;
    2828
     
    3333        class texture_font
    3434        {
    35         public:
    36                 texture_font( texture_atlas* atlas, const char * filename, float size );
    37                 const texture_glyph* get_glyph( uint16 charcode ) const;
    38                 bool load_glyphs( const std::string& codes );
    39                 ~texture_font();
    40         private:
    41                 void generate_kerning();
    42         private:
    43                 std::unordered_map< uint16, texture_glyph > m_glyphs;
    44                 texture_atlas* m_atlas;
    45                 std::string m_filename;
    46                 float m_size;
    47             float m_height;
    48             float m_linegap;
    49             float m_ascender;
    50             float m_descender;
    51                 bool m_hinting;
    52                 bool m_filtering;
    53                 uint8 m_lcd_weights[5];
    54                 void* m_rlibrary;
    55                 void* m_rface;
     35                public:
     36                        texture_font( texture_atlas* atlas, const char * filename, float size );
     37                        const texture_glyph* get_glyph( uint16 charcode ) const;
     38                        bool load_glyphs( const std::string& codes );
     39                        ~texture_font();
     40                private:
     41                        void generate_kerning();
     42                private:
     43                        std::unordered_map< uint16, texture_glyph > m_glyphs;
     44                        texture_atlas* m_atlas;
     45                        std::string m_filename;
     46                        float m_size;
     47                        float m_height;
     48                        float m_linegap;
     49                        float m_ascender;
     50                        float m_descender;
     51                        bool m_hinting;
     52                        bool m_filtering;
     53                        uint8 m_lcd_weights[5];
     54                        void* m_rlibrary;
     55                        void* m_rface;
    5656        };
    5757}
    5858
    5959#endif // NV_GL_TEXTURE_FONT_HH
     60
  • trunk/src/gl/texture_atlas.cc

    r27 r28  
    88
    99#include "nv/logging.hh"
     10#include <iostream>
    1011
    1112using namespace nv;
     
    2526        int best_index  = -1;
    2627        int best_width  = INT_MAX;
     28        std::cout << "The size is: " << m_nodes.size() << std::endl;
    2729        for( size_t i=0; i < m_nodes.size(); ++i )
    2830        {
  • trunk/src/gl/texture_font.cc

    r25 r28  
    2626        : m_atlas( atlas ), m_filename(filename), m_size( size ),
    2727        m_height(0), m_linegap(0), m_ascender(0), m_descender(0),
    28         m_rlibrary( nullptr ), m_rface( nullptr ), m_hinting( true ), m_filtering( true )
     28        m_hinting( true ), m_filtering( true ), m_rlibrary( nullptr ), m_rface( nullptr )
    2929{
    3030        size_t hres = 64;
Note: See TracChangeset for help on using the changeset viewer.