Celtoys/Remotery — pull request #30 by Skylark13 (2014-12-12 02:27:39+00:00)
Title: OpenGL profiling support + warnings fixes

I implemented OpenGL profiling the same way D3D11 was implemented (they are similar so it made sense)
Before using Remotery I had to fix various warnings because I compile with warnings as errors. If you want a pull request for just the OpenGL support and don't want to bother with the warnings fixes, I understand, I can do that.
Also, I didn't check that this compiled in pure C mode... I realize now that I may have declared some variables in the middle of scopes or things like that. Let me know and I'll fix it if you don't want to bother doing it.

- Various warning fixes for MSVC warning level 4 with warnings as errors...
- Implemented OpenGL support using glQueryCounter. This may not work on MacOS X which is a bit behind on its OpenGL support, but it was much simpler to implement -- glQueryCounter gives us a timestamp in ns, whereas GL_TIME_ELAPSED queries (which MacOS X supports) give an elapsed time only so it's more work to get accurate start, end values.
- Updated the readme to show the addition of support for OpenGL, though since it's a copy-paste of the D3D11 section you may just want to remove the OpenGL section and say it's almost the same for OpenGL (only the Bind function changes, it doesn't take any parameters).