Ignore:
Timestamp:
05/28/13 18:08:27 (12 years ago)
Author:
epyon
Message:
  • cleaned up commented out code
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/render_test/rl.cc

    r46 r47  
    8787};
    8888
    89 application* g_application;
    90 
    9189application::application()
    9290{
     
    210208                m_window->get_context()->clear( m_clear_state );
    211209
    212                 //              float d = -4.0f;
    213                 float angle = (float)(SDL_GetTicks() / 1000.0 * 45);  // 45° per second
    214                 glm::vec3 axis_y(0.0, 1.0, 0.0);
    215                 glm::mat4 anim  = glm::rotate(glm::mat4(1.0f), angle, axis_y);
    216 
    217                 //                      glm::mat4 model = glm::translate(glm::mat4(1.0f), glm::vec3(0.0, 0.0, d));
    218                 //                      glm::mat4 view  = glm::lookAt(glm::vec3(0.0, 2.0, 0.0), glm::vec3(0.0, 0.0, d), glm::vec3(0.0, 1.0, 0.0));
    219 
    220210                glm::mat4 model = glm::translate(glm::mat4(1.0f), glm::vec3(-8.5, 0.0, -8.0));
    221211                glm::mat4 view  = glm::lookAt(glm::vec3(0.0, 20.0, 5.0) + move, glm::vec3(0.0, 4.0, 0.0) + move, glm::vec3(0.0, 1.0, 0.0));
    222212                glm::mat4 projection = glm::perspective(25.0f, 1.0f*800.0f/600.0f, 0.1f, 100.0f);
    223                 //projection = glm::ortho(-10.0f, 10.0f, -10.0f, 10.0f, 0.1f, 100.0f);
    224213                glm::mat4 mv         = view * model;
    225                 glm::mat3 N          = glm::transpose(glm::inverse(glm::mat3(mv)));
    226214
    227215                m_texture->bind( 0 );
     
    272260}
    273261
    274 /*
    275 class test_resource : public nv::resource
    276 {
    277 public:
    278         typedef std::shared_ptr< test_resource > ptr;
    279 public:
    280         test_resource() {}
    281         virtual bool load() { return true; };
    282         virtual bool unload() { return true; };
    283 };
    284 */
    285 //      nv::resource_manager::pointer()->register_resource_type<test_resource>("test");
    286 
    287 
    288262
    289263int main(int, char* [])
     
    294268       
    295269        NV_LOG( nv::LOG_NOTICE, "Logging started" );
    296 
    297 //      nv::load_freetype_library();
    298 //
    299 //      size_t depth = 3;
    300 //      nv::texture_atlas tex( glm::ivec2( 512, 512 ), depth );
    301 //      for ( nv::uint16 i = 10; i < 32; i += 2 )
    302 //      {
    303 //              nv::texture_font font( &tex, "aero.ttf", i );
    304 //              font.load_glyphs( "!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" );
    305 //      }
    306 
    307         g_application = new application();
    308 
    309 //      SDL_Surface* s = SDL_CreateRGBSurfaceFrom( (void*)tex.get_data(), 512, 512, depth * 8, 512 * depth,0,0,0,0);
    310 //      SDL_SaveBMP_RW( s, SDL_RWFromFile("test.bmp", "wb"), 1);
    311 
    312         if ( g_application->initialize() )
     270        application app;
     271        if ( app.initialize() )
    313272        {
    314                 g_application->run();
    315         }
    316         delete g_application;
    317 
     273                app.run();
     274        }
    318275        NV_LOG( nv::LOG_NOTICE, "Logging stopped" );
    319276
Note: See TracChangeset for help on using the changeset viewer.