Enhancement / Feature.
1 line macro to output text to a buffer of a batching system.
Ideally we would have three separate buffers, 1 for errors, 1 for events, and one for everything else, i.e. general debugging. Separating out message types allows us to more easily filer and navigate the output. The batching system would collect all of these and then output them at the end of the frame to wherever we want, based of those filters. This way, all text output can easily be switched to or additionally output to a log file, or any other source we desire on the file without editing any of the individual lines feeding the buffers.
Potential Examples:
//usage
ERROR_TEXT("Graphics failed to initialize! value of window handle: ", pWindow);
DEBUG_TEXT("Just checking to see if the code hits this line.");
EVENT_TEXT("Model loaded: ", m_name);
implement for integral types now, but provide way for user-defined types to be added once reflection is in
4, example call: for inline comma style:
ERROR_TEXT("Graphics failed to initialize! value of window handle: ", pWindow, "."); //comma delimiter
user must be allowed to provide custom targets such as pWindow
Enhancement / Feature. 1 line macro to output text to a buffer of a batching system.
Ideally we would have three separate buffers, 1 for errors, 1 for events, and one for everything else, i.e. general debugging. Separating out message types allows us to more easily filer and navigate the output. The batching system would collect all of these and then output them at the end of the frame to wherever we want, based of those filters. This way, all text output can easily be switched to or additionally output to a log file, or any other source we desire on the file without editing any of the individual lines feeding the buffers.
Potential Examples: //usage ERROR_TEXT("Graphics failed to initialize! value of window handle: ", pWindow); DEBUG_TEXT("Just checking to see if the code hits this line."); EVENT_TEXT("Model loaded: ", m_name);
//directing output TextBatcher.eventBuffer.outputMode = TextBatcher::eOutputModes::Logfile; TextBatcher.errorBuffer.outputMode = TextBatcher::eOutputModes::Screen; TextBatcher.debugBuffer.outputMode = TextBatcher::eOutputModes::Console;
This would replace all std::cout text output currently in the engine and eliminate a building tech debt in this area.