layouted codes.added ShaderString.

This commit is contained in:
hyzboy 2023-12-24 01:34:45 +08:00
parent 466cb4109d
commit 9eb928dc3a
No known key found for this signature in database
GPG Key ID: 067EE4525D4FB6D3
2 changed files with 3 additions and 1 deletions

View File

@ -62,7 +62,7 @@ namespace hgl
#define LOG_ERROR(str) {Log(LogLevel::Error, str);}
#define RETURN_FALSE {DebugLog(LogLevel::Log,OS_TEXT("return(false)"), __FILE__,__LINE__,__HGL_FUNC__);return(false);}
#define RETURN_ERROR(v) {DebugLog(LogLevel::Log,OS_TEXT("return error(")+OSString::numberOf(v)+OS_TEXT(")"), __FILE__,__LINE__,__HGL_FUNC__);return(v);}
#define RETURN_ERROR(v) {DebugLog(LogLevel::Log,OS_TEXT("return error(")+OSString::numberOf(v)+OS_TEXT(")"),__FILE__,__LINE__,__HGL_FUNC__);return(v);}
#define RETURN_ERROR_NULL {DebugLog(LogLevel::Log,OS_TEXT("return error(nullptr)"), __FILE__,__LINE__,__HGL_FUNC__);return(nullptr);}
#define RETURN_BOOL(proc) {if(proc)return(true);RETURN_FALSE}

View File

@ -1344,6 +1344,8 @@ namespace hgl
using OSString =String<os_char>;
using WideString =String<wchar_t>;
using ShaderString =UTF8String;
template<typename C> bool ToNumber(const String<C> &str,int &value){return str.ToInt(value);}
template<typename C> bool ToNumber(const String<C> &str,uint &value){return str.ToUint(value);}
template<typename C> bool ToNumber(const String<C> &str,float &value){return str.ToFloat(value);}