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/RendererOpenGL12/RendererImpl.cpp

    r51 r149  
    4141 
    4242#include "../Common/OpenGLEx.hpp" 
     43#include "ConsoleCommands/Console.hpp" 
    4344#include "Templates/Array.hpp" 
    4445 
     
    8990    // glGetError();   // Clear the error flag manually (will set error GL_INVALID_OPERATION on invalid RC). 
    9091#ifdef DEBUG 
    91     printf("\n%s (%u): Entering RendererImplT::IsSupported().\n", __FILE__, __LINE__); 
     92    Console->Print(cf::va("\n%s (%u): Entering RendererImplT::IsSupported().\n", __FILE__, __LINE__)); 
    9293#endif 
    9394    GLenum LastError=glGetError(); 
     
    9596    { 
    9697#ifdef DEBUG 
    97         printf("%s (%u): glGetError() returned error %lu (0x%X).\n", __FILE__, __LINE__, (unsigned long)LastError, LastError); 
     98        Console->Print(cf::va("%s (%u): glGetError() returned error %lu (0x%X).\n", __FILE__, __LINE__, (unsigned long)LastError, LastError)); 
    9899#endif 
    99100        return false; 
     
    105106 
    106107#ifdef DEBUG 
    107     printf("%s (%u): GL_VERSION string is \"%s\".\n", __FILE__, __LINE__, Version==NULL ? "NULL" : Version); 
     108    Console->Print(cf::va("%s (%u): GL_VERSION string is \"%s\".\n", __FILE__, __LINE__, Version==NULL ? "NULL" : Version)); 
    108109#endif 
    109110    if (Version==NULL) return false;                    // This is another way to see if the RC is valid. 
     
    113114    cf::Init_GL_ARB_multitexture(); 
    114115#ifdef DEBUG 
    115     printf("%s (%u): GL_ARB_multitexture_AVAIL==%u.\n", __FILE__, __LINE__, cf::GL_ARB_multitexture_AVAIL); 
     116    Console->Print(cf::va("%s (%u): GL_ARB_multitexture_AVAIL==%u.\n", __FILE__, __LINE__, cf::GL_ARB_multitexture_AVAIL)); 
    116117#endif 
    117118    if (!cf::GL_ARB_multitexture_AVAIL) return false;       // Require the GL_ARB_multitexture extension.