OSD Debug text can now be used by the host application.
This commit is contained in:
@@ -658,11 +658,13 @@ void KRCamera::renderPost()
|
|||||||
|
|
||||||
const char *szText = settings.m_debug_text.c_str();
|
const char *szText = settings.m_debug_text.c_str();
|
||||||
|
|
||||||
bool show_active_textures = true;
|
std::string debug_text;
|
||||||
std::string debug_text = getDebugText();
|
if(settings.debug_display != KRRenderSettings::KRENGINE_DEBUG_DISPLAY_NONE) {
|
||||||
|
debug_text = getDebugText();;
|
||||||
if(debug_text.length() > 0) {
|
if(debug_text.length() > 0) {
|
||||||
szText = debug_text.c_str();
|
szText = debug_text.c_str();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(*szText) {
|
if(*szText) {
|
||||||
int row_count = 1;
|
int row_count = 1;
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ namespace kraken {
|
|||||||
@property(nonatomic, readonly) NSDictionary *parameter_names;
|
@property(nonatomic, readonly) NSDictionary *parameter_names;
|
||||||
@property(nonatomic, assign) KRContext *context;
|
@property(nonatomic, assign) KRContext *context;
|
||||||
@property(nonatomic, retain) NSString *debug_text;
|
@property(nonatomic, retain) NSString *debug_text;
|
||||||
|
@property(nonatomic, assign, readonly) KRRenderSettings *settings;
|
||||||
|
|
||||||
- (id)init;
|
- (id)init;
|
||||||
- (BOOL)loadResource:(NSString *)path;
|
- (BOOL)loadResource:(NSString *)path;
|
||||||
|
|||||||
@@ -236,6 +236,12 @@ void kraken::set_parameter(const std::string ¶meter_name, float parameter_va
|
|||||||
return 49;
|
return 49;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-(KRRenderSettings *)settings
|
||||||
|
{
|
||||||
|
return &_settings;
|
||||||
|
}
|
||||||
|
|
||||||
-(NSString *)getParameterNameWithIndex: (int)i
|
-(NSString *)getParameterNameWithIndex: (int)i
|
||||||
{
|
{
|
||||||
return [[self.parameter_names allKeysForObject:[NSNumber numberWithInt:i]] objectAtIndex:0];
|
return [[self.parameter_names allKeysForObject:[NSNumber numberWithInt:i]] objectAtIndex:0];
|
||||||
|
|||||||
Reference in New Issue
Block a user