OSD Debug text can now be used by the host application.

This commit is contained in:
2013-03-22 18:16:44 -07:00
parent b34d90f41d
commit fb23c8ef78
3 changed files with 13 additions and 4 deletions

View File

@@ -658,10 +658,12 @@ void KRCamera::renderPost()
const char *szText = settings.m_debug_text.c_str();
bool show_active_textures = true;
std::string debug_text = getDebugText();
if(debug_text.length() > 0) {
szText = debug_text.c_str();
std::string debug_text;
if(settings.debug_display != KRRenderSettings::KRENGINE_DEBUG_DISPLAY_NONE) {
debug_text = getDebugText();;
if(debug_text.length() > 0) {
szText = debug_text.c_str();
}
}
if(*szText) {

View File

@@ -54,6 +54,7 @@ namespace kraken {
@property(nonatomic, readonly) NSDictionary *parameter_names;
@property(nonatomic, assign) KRContext *context;
@property(nonatomic, retain) NSString *debug_text;
@property(nonatomic, assign, readonly) KRRenderSettings *settings;
- (id)init;
- (BOOL)loadResource:(NSString *)path;

View File

@@ -236,6 +236,12 @@ void kraken::set_parameter(const std::string &parameter_name, float parameter_va
return 49;
}
-(KRRenderSettings *)settings
{
return &_settings;
}
-(NSString *)getParameterNameWithIndex: (int)i
{
return [[self.parameter_names allKeysForObject:[NSNumber numberWithInt:i]] objectAtIndex:0];