Added file/line argument to fatal callback.

This commit is contained in:
Branimir Karadžić
2018-09-19 17:54:51 -07:00
parent 7ed47a3507
commit 99e6da5b50
12 changed files with 57 additions and 48 deletions

View File

@@ -430,7 +430,12 @@ namespace bgfx
///
/// @attention C99 equivalent is `bgfx_callback_vtbl.fatal`.
///
virtual void fatal(Fatal::Enum _code, const char* _str) = 0;
virtual void fatal(
const char* _filePath
, uint16_t _line
, Fatal::Enum _code
, const char* _str
) = 0;
/// Print debug message.
///

View File

@@ -567,7 +567,7 @@ typedef struct bgfx_callback_interface_s
/**/
typedef struct bgfx_callback_vtbl_s
{
void (*fatal)(bgfx_callback_interface_t* _this, bgfx_fatal_t _code, const char* _str);
void (*fatal)(bgfx_callback_interface_t* _this, const char* _filePath, uint16_t _line, bgfx_fatal_t _code, const char* _str);
void (*trace_vargs)(bgfx_callback_interface_t* _this, const char* _filePath, uint16_t _line, const char* _format, va_list _argList);
void (*profiler_begin)(bgfx_callback_interface_t* _this, const char* _name, uint32_t _abgr, const char* _filePath, uint16_t _line);
void (*profiler_begin_literal)(bgfx_callback_interface_t* _this, const char* _name, uint32_t _abgr, const char* _filePath, uint16_t _line);

View File

@@ -6,7 +6,7 @@
#ifndef BGFX_DEFINES_H_HEADER_GUARD
#define BGFX_DEFINES_H_HEADER_GUARD
#define BGFX_API_VERSION UINT32_C(82)
#define BGFX_API_VERSION UINT32_C(83)
/// Color RGB/alpha/depth write. When it's not specified write will be disabled.
#define BGFX_STATE_WRITE_R UINT64_C(0x0000000000000001) //!< Enable R write.