OSD Debug text can now be used by the host application.
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -236,6 +236,12 @@ void kraken::set_parameter(const std::string ¶meter_name, float parameter_va
|
||||
return 49;
|
||||
}
|
||||
|
||||
|
||||
-(KRRenderSettings *)settings
|
||||
{
|
||||
return &_settings;
|
||||
}
|
||||
|
||||
-(NSString *)getParameterNameWithIndex: (int)i
|
||||
{
|
||||
return [[self.parameter_names allKeysForObject:[NSNumber numberWithInt:i]] objectAtIndex:0];
|
||||
|
||||
Reference in New Issue
Block a user