Properly take into consideration that VERTEX must be written to in opaque pre pass, does some speed up to scenes using triplanar.
This commit is contained in:
@ -69,8 +69,26 @@ __attribute__((visibility("default"))) DWORD NvOptimusEnablement = 0x00000001;
|
||||
#define WM_TOUCH 576
|
||||
#endif
|
||||
|
||||
static String format_error_message(DWORD id) {
|
||||
|
||||
LPWSTR messageBuffer = NULL;
|
||||
size_t size = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
|
||||
NULL, id, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), (LPWSTR)&messageBuffer, 0, NULL);
|
||||
|
||||
String msg = "Error "+itos(id)+": "+String(messageBuffer,size);
|
||||
|
||||
LocalFree(messageBuffer);
|
||||
|
||||
return msg;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
extern HINSTANCE godot_hinstance;
|
||||
|
||||
|
||||
|
||||
void RedirectIOToConsole() {
|
||||
|
||||
int hConHandle;
|
||||
@ -1604,7 +1622,7 @@ Error OS_Windows::open_dynamic_library(const String p_path, void *&p_library_han
|
||||
}
|
||||
|
||||
if (!p_library_handle) {
|
||||
ERR_EXPLAIN("Can't open dynamic library: " + p_path + ". Error: " + String::num(GetLastError()));
|
||||
ERR_EXPLAIN("Can't open dynamic library: " + p_path + ". Error: " + format_error_message(GetLastError()));
|
||||
ERR_FAIL_V(ERR_CANT_OPEN);
|
||||
}
|
||||
return OK;
|
||||
|
||||
Reference in New Issue
Block a user