mirror of
https://github.com/AxioDL/boo.git
synced 2025-12-13 23:26:16 +00:00
New code style refactor
This commit is contained in:
@@ -1,26 +1,23 @@
|
||||
#include "boo/graphicsdev/glxew.h"
|
||||
#include "logvisor/logvisor.hpp"
|
||||
|
||||
namespace boo
|
||||
{
|
||||
namespace boo {
|
||||
static logvisor::Module Log("boo::GLX");
|
||||
|
||||
void GLXExtensionCheck()
|
||||
{
|
||||
if (!GLXEW_SGI_video_sync)
|
||||
Log.report(logvisor::Fatal, "GLX_SGI_video_sync not available");
|
||||
if (!GLXEW_EXT_swap_control && !GLXEW_MESA_swap_control && !GLXEW_SGI_swap_control)
|
||||
Log.report(logvisor::Fatal, "swap_control not available");
|
||||
void GLXExtensionCheck() {
|
||||
if (!GLXEW_SGI_video_sync)
|
||||
Log.report(logvisor::Fatal, "GLX_SGI_video_sync not available");
|
||||
if (!GLXEW_EXT_swap_control && !GLXEW_MESA_swap_control && !GLXEW_SGI_swap_control)
|
||||
Log.report(logvisor::Fatal, "swap_control not available");
|
||||
}
|
||||
|
||||
void GLXEnableVSync(Display* disp, GLXWindow drawable)
|
||||
{
|
||||
if (GLXEW_EXT_swap_control)
|
||||
glXSwapIntervalEXT(disp, drawable, 1);
|
||||
else if (GLXEW_MESA_swap_control)
|
||||
glXSwapIntervalMESA(1);
|
||||
else if (GLXEW_SGI_swap_control)
|
||||
glXSwapIntervalSGI(1);
|
||||
void GLXEnableVSync(Display* disp, GLXWindow drawable) {
|
||||
if (GLXEW_EXT_swap_control)
|
||||
glXSwapIntervalEXT(disp, drawable, 1);
|
||||
else if (GLXEW_MESA_swap_control)
|
||||
glXSwapIntervalMESA(1);
|
||||
else if (GLXEW_SGI_swap_control)
|
||||
glXSwapIntervalSGI(1);
|
||||
}
|
||||
|
||||
}
|
||||
} // namespace boo
|
||||
|
||||
Reference in New Issue
Block a user