mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 10:35:43 -05:00
Fixed GL Remotery.
This commit is contained in:
parent
26cbbb85b7
commit
a303759e4c
3 changed files with 8 additions and 7 deletions
12
3rdparty/remotery/lib/Remotery.c
vendored
12
3rdparty/remotery/lib/Remotery.c
vendored
|
@ -5330,7 +5330,7 @@ RMT_API void _rmt_EndD3D11Sample(void)
|
|||
#ifndef APIENTRY
|
||||
# if defined(__MINGW32__) || defined(__CYGWIN__)
|
||||
# define APIENTRY __stdcall
|
||||
# elif (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
|
||||
# elif (defined(_MSC_VER) && (_MSC_VER >= 800)) || defined(_STDCALL_SUPPORTED) || defined(__BORLANDC__)
|
||||
# define APIENTRY __stdcall
|
||||
# else
|
||||
# define APIENTRY
|
||||
|
@ -5369,7 +5369,7 @@ typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTI64VPROC) (GLuint id, GLenum pname
|
|||
typedef void (GLAPIENTRY * PFNGLGETQUERYOBJECTUI64VPROC) (GLuint id, GLenum pname, GLuint64* params);
|
||||
typedef void (GLAPIENTRY * PFNGLQUERYCOUNTERPROC) (GLuint id, GLenum target);
|
||||
|
||||
GLAPI GLenum GLAPIENTRY glGetError(void);
|
||||
GLAPI GLenum GLAPIENTRY glGetError(void) { return 0; }
|
||||
|
||||
#define GL_NO_ERROR 0
|
||||
#define GL_QUERY_RESULT 0x8866
|
||||
|
@ -5389,7 +5389,7 @@ GLAPI GLenum GLAPIENTRY glGetError(void);
|
|||
#elif defined(__native_client__)
|
||||
# define rmtGetProcAddress(name) NULL /* TODO */
|
||||
#else /* __linux */
|
||||
extern void* glXGetProcAddressARB(const GLubyte*);
|
||||
extern "C" void* glXGetProcAddressARB(const GLubyte*);
|
||||
# define rmtGetProcAddress(name) (*glXGetProcAddressARB)(name)
|
||||
#endif
|
||||
|
||||
|
@ -5591,7 +5591,7 @@ static rmtBool OpenGLTimestamp_GetData(OpenGLTimestamp* stamp, rmtU64* out_start
|
|||
typedef struct OpenGLSample
|
||||
{
|
||||
// IS-A inheritance relationship
|
||||
Sample Sample;
|
||||
Sample m_sample;
|
||||
|
||||
OpenGLTimestamp* timestamp;
|
||||
|
||||
|
@ -5604,8 +5604,8 @@ static rmtError OpenGLSample_Constructor(OpenGLSample* sample)
|
|||
|
||||
// Chain to sample constructor
|
||||
Sample_Constructor((Sample*)sample);
|
||||
sample->Sample.type = SampleType_OpenGL;
|
||||
sample->Sample.size_bytes = sizeof(OpenGLSample);
|
||||
sample->m_sample.type = SampleType_OpenGL;
|
||||
sample->m_sample.size_bytes = sizeof(OpenGLSample);
|
||||
sample->timestamp = NULL;
|
||||
|
||||
return RMT_ERROR_NONE;
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
|
||||
#if BGFX_CONFIG_PROFILER_REMOTERY_BUILD_LIB
|
||||
# define RMT_USE_D3D11 BGFX_CONFIG_RENDERER_DIRECT3D11
|
||||
# define RMT_USE_OPENGL 0
|
||||
# define RMT_USE_OPENGL BGFX_CONFIG_RENDERER_OPENGL
|
||||
# include <remotery/lib/Remotery.c>
|
||||
#endif // BGFX_CONFIG_PROFILER_REMOTERY_BUILD_LIB
|
||||
|
||||
|
|
|
@ -60,6 +60,7 @@
|
|||
# elif BGFX_CONFIG_PROFILER_REMOTERY
|
||||
# define RMT_ENABLED BGFX_CONFIG_PROFILER_REMOTERY
|
||||
# define RMT_USE_D3D11 BGFX_CONFIG_RENDERER_DIRECT3D11
|
||||
# define RMT_USE_OPENGL BGFX_CONFIG_RENDERER_OPENGL
|
||||
# include <remotery/lib/Remotery.h>
|
||||
# define BGFX_PROFILER_SCOPE(_group, _name, _color) rmt_ScopedCPUSample(_group##_##_name)
|
||||
# define BGFX_PROFILER_BEGIN(_group, _name, _color) rmt_BeginCPUSample(_group##_##_name)
|
||||
|
|
Loading…
Reference in a new issue