Cleanup: capitalization of the term "VSync"
Follow the convention widely used by AMD/Intel/Nvidia.
This commit is contained in:
@@ -143,7 +143,7 @@ void GHOST_Context::initClearGL()
|
||||
}
|
||||
#endif
|
||||
|
||||
const char *GHOST_Context::getEnvVarVsyncString()
|
||||
const char *GHOST_Context::getEnvVarVSyncString()
|
||||
{
|
||||
const char *ghost_vsync_string = getenv("BLENDER_VSYNC");
|
||||
return ghost_vsync_string;
|
||||
|
||||
@@ -169,8 +169,8 @@ class GHOST_Context : public GHOST_IContext {
|
||||
static void initClearGL();
|
||||
#endif
|
||||
|
||||
/** For performance measurements with vsync disabled. */
|
||||
static const char *getEnvVarVsyncString();
|
||||
/** For performance measurements with VSync disabled. */
|
||||
static const char *getEnvVarVSyncString();
|
||||
|
||||
MEM_CXX_CLASS_ALLOC_FUNCS("GHOST:GHOST_Context")
|
||||
};
|
||||
|
||||
@@ -626,7 +626,7 @@ GHOST_TSuccess GHOST_ContextEGL::initializeDrawingContext()
|
||||
}
|
||||
|
||||
{
|
||||
const char *ghost_vsync_string = getEnvVarVsyncString();
|
||||
const char *ghost_vsync_string = getEnvVarVSyncString();
|
||||
if (ghost_vsync_string) {
|
||||
int swapInterval = atoi(ghost_vsync_string);
|
||||
setSwapInterval(swapInterval);
|
||||
|
||||
@@ -280,8 +280,8 @@ GHOST_TSuccess GHOST_ContextGLX::initializeDrawingContext()
|
||||
|
||||
glXMakeCurrent(m_display, m_window, m_context);
|
||||
|
||||
/* For performance measurements with vsync disabled. */
|
||||
const char *ghost_vsync_string = getEnvVarVsyncString();
|
||||
/* For performance measurements with VSync disabled. */
|
||||
const char *ghost_vsync_string = getEnvVarVSyncString();
|
||||
if (ghost_vsync_string) {
|
||||
int swapInterval = atoi(ghost_vsync_string);
|
||||
setSwapInterval(swapInterval);
|
||||
|
||||
@@ -88,7 +88,7 @@ GHOST_ContextMTL::GHOST_ContextMTL(bool stereoVisual,
|
||||
m_metalLayer.device = metalDevice;
|
||||
m_metalLayer.allowsNextDrawableTimeout = NO;
|
||||
|
||||
const char *ghost_vsync_string = getEnvVarVsyncString();
|
||||
const char *ghost_vsync_string = getEnvVarVSyncString();
|
||||
if (ghost_vsync_string) {
|
||||
int swapInterval = atoi(ghost_vsync_string);
|
||||
m_metalLayer.displaySyncEnabled = swapInterval != 0 ? YES : NO;
|
||||
|
||||
@@ -134,7 +134,7 @@ GHOST_TSuccess GHOST_ContextSDL::initializeDrawingContext()
|
||||
|
||||
success = (SDL_GL_MakeCurrent(m_window, m_context) < 0) ? GHOST_kFailure : GHOST_kSuccess;
|
||||
|
||||
const char *ghost_vsync_string = getEnvVarVsyncString();
|
||||
const char *ghost_vsync_string = getEnvVarVSyncString();
|
||||
if (ghost_vsync_string) {
|
||||
int swapInterval = atoi(ghost_vsync_string);
|
||||
setSwapInterval(swapInterval);
|
||||
|
||||
@@ -861,7 +861,7 @@ static GHOST_TSuccess selectPresentMode(const char *ghost_vsync_string,
|
||||
}
|
||||
}
|
||||
CLOG_WARN(&LOG,
|
||||
"Vulkan: Vsync off was requested via BLENDER_VSYNC, but "
|
||||
"Vulkan: VSync off was requested via BLENDER_VSYNC, but "
|
||||
"VK_PRESENT_MODE_IMMEDIATE_KHR is not "
|
||||
"supported.");
|
||||
}
|
||||
@@ -968,7 +968,7 @@ GHOST_TSuccess GHOST_ContextVK::recreateSwapchain(bool use_hdr_swapchain)
|
||||
}
|
||||
|
||||
VkPresentModeKHR present_mode;
|
||||
if (!selectPresentMode(getEnvVarVsyncString(), physical_device, m_surface, &present_mode)) {
|
||||
if (!selectPresentMode(getEnvVarVSyncString(), physical_device, m_surface, &present_mode)) {
|
||||
return GHOST_kFailure;
|
||||
}
|
||||
|
||||
|
||||
@@ -617,7 +617,7 @@ GHOST_TSuccess GHOST_ContextWGL::initializeDrawingContext()
|
||||
}
|
||||
|
||||
{
|
||||
const char *ghost_vsync_string = getEnvVarVsyncString();
|
||||
const char *ghost_vsync_string = getEnvVarVSyncString();
|
||||
if (ghost_vsync_string) {
|
||||
int swapInterval = atoi(ghost_vsync_string);
|
||||
setSwapInterval(swapInterval);
|
||||
|
||||
@@ -864,7 +864,7 @@ static void print_help(bArgs *ba, bool all)
|
||||
PRINT(
|
||||
" $BLENDER_CUSTOM_SPLASH_BANNER Full path to an image to overlay on the splash screen.\n");
|
||||
PRINT(
|
||||
" $BLENDER_VSYNC Set to 0 to disable Vsync.\n"
|
||||
" $BLENDER_VSYNC Set to 0 to disable VSync.\n"
|
||||
" With OpenGL, other values set the swap interval.\n");
|
||||
|
||||
if (defs.with_opencolorio) {
|
||||
|
||||
Reference in New Issue
Block a user