mirror of
https://github.com/scratchfoundation/bgfx.git
synced 2024-11-28 18:45:54 -05:00
OSX: Fixed query counter crash.
This commit is contained in:
parent
1a3ca7d8ac
commit
10674ad181
1 changed files with 17 additions and 7 deletions
|
@ -1235,9 +1235,12 @@ namespace bgfx { namespace gl
|
|||
}
|
||||
|
||||
Frame& frame = m_frame[m_control.m_current];
|
||||
GL_CHECK(glQueryCounter(frame.m_begin
|
||||
, GL_TIMESTAMP
|
||||
) );
|
||||
if (!BX_ENABLED(BX_PLATFORM_OSX) )
|
||||
{
|
||||
GL_CHECK(glQueryCounter(frame.m_begin
|
||||
, GL_TIMESTAMP
|
||||
) );
|
||||
}
|
||||
|
||||
GL_CHECK(glBeginQuery(GL_TIME_ELAPSED
|
||||
, frame.m_elapsed
|
||||
|
@ -1264,10 +1267,17 @@ namespace bgfx { namespace gl
|
|||
|
||||
if (available)
|
||||
{
|
||||
GL_CHECK(glGetQueryObjectui64v(frame.m_begin
|
||||
, GL_QUERY_RESULT
|
||||
, &m_begin
|
||||
) );
|
||||
if (!BX_ENABLED(BX_PLATFORM_OSX) )
|
||||
{
|
||||
GL_CHECK(glGetQueryObjectui64v(frame.m_begin
|
||||
, GL_QUERY_RESULT
|
||||
, &m_begin
|
||||
) );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_begin = 0;
|
||||
}
|
||||
|
||||
GL_CHECK(glGetQueryObjectui64v(frame.m_elapsed
|
||||
, GL_QUERY_RESULT
|
||||
|
|
Loading…
Reference in a new issue