Show
Ignore:
Timestamp:
09/03/10 00:25:58 (21 months ago)
Author:
Carsten
Message:

Revision of Console code:

  • New "composite console" is the new default console, making it easy to add logging into a file and the graphical console during init, and making it unnecessary to reset the console pointer in DLLs that have been initialized before the graphical console.
  • Replaced several old/obsolete printf-statements (in the renderer DLLs) with their proper Console->Print() counterparts.
  • Put the Lua bindings to the global Console into separate files. This way the DLLs can include Console.hpp without being forced to link the Lua libraries in.
Files:
1 modified

Legend:

Unmodified
Added
Removed
  • cafu/trunk/Libs/MaterialSystem/RendererARBprogs/RendererImpl.cpp

    r36 r149  
    4848 
    4949#include "../Common/OpenGLEx.hpp" 
     50#include "ConsoleCommands/Console.hpp" 
    5051#include "Templates/Array.hpp" 
    5152 
     
    115116    { 
    116117#ifdef DEBUG 
    117         printf("\n%s (%u): glGetError() returned error %lu (0x%X).\n", __FILE__, __LINE__, (unsigned long)LastError, LastError); 
     118        Console->Print(cf::va("\n%s (%u): glGetError() returned error %lu (0x%X).\n", __FILE__, __LINE__, (unsigned long)LastError, LastError)); 
    118119#endif 
    119120        return false; 
     
    463464 
    464465    if (Error!=GL_NO_ERROR) 
    465         printf("glGetError()==%i\n", Error); 
     466        Console->Print(cf::va("glGetError()==%i\n", Error)); 
    466467#endif 
    467468} 
     
    472473void RendererImplT::EndFrame() 
    473474{ 
    474     // printf("%4lu", ShaderChangeCounter); 
     475    // Console->Print(cf::va("%4lu", ShaderChangeCounter)); 
    475476    // static int LineWrap=0; 
    476477    // LineWrap++; 
    477     // if (LineWrap==20) { printf("\n"); LineWrap=0; } 
     478    // if (LineWrap==20) { Console->Print("\n"); LineWrap=0; } 
    478479} 
    479480 
     
    549550    } 
    550551 
    551     // printf("%lu textures pre-cached.\n", TexMapRepository.Size()); 
     552    // Console->Print(cf::va("%lu textures pre-cached.\n", TexMapRepository.Size())); 
    552553} 
    553554