Feature: #7: VSync
- Add VSync feature. 3 possible VSync methods available: "sw" (software, not too reliable, but at least you have something to fallback to), "drm" (using DRM_IOCTL_WAIT_VBLANK, should work only on DRI drivers), "opengl" (using SGI_swap_control extension OpenGL, might work on more drivers than the DRM method). "sw" and "opengl" are briefly tested, "drm" received utterly no test (because I use the nVidia binary blob). They are enabled with "--vsync sw" / "--vsync drm" / "--vsync opengl". - Add --refresh-rate to let user specify a refresh rate for software VSync, in case the automatic refresh rate detection does not work well. - Seemingly the automatic refresh rate detection using X RandR in software VSync detects refresh rate incorrectly. Need further investigation. - Fix a few bugs in fading timing. - Add a workaround for client window detection on Fluxbox, as Fluxbox (incorrectly?) sets the override-redirect flag upon all frame windows. - Software VSync adds dependency on librt (a part of glibc) for nanosecond-level timing functions, and libXrandr for automatic refresh rate detection; DRM VSync adds dependency on libdrm to use its drm.h, but does not link to libdrm; OpenGL VSync adds dependency on libGL. - Print timing information on DEBUG_REPAINT.
This commit is contained in:
13
Makefile
13
Makefile
@ -4,8 +4,8 @@ PREFIX ?= /usr
|
||||
BINDIR ?= $(PREFIX)/bin
|
||||
MANDIR ?= $(PREFIX)/share/man/man1
|
||||
|
||||
PACKAGES = x11 xcomposite xfixes xdamage xrender xext
|
||||
LIBS = -lm
|
||||
PACKAGES = x11 xcomposite xfixes xdamage xrender xext xrandr
|
||||
LIBS = -lm -lrt
|
||||
INCS =
|
||||
|
||||
# Parse configuration flags
|
||||
@ -29,6 +29,15 @@ ifeq "$(NO_REGEX_PCRE)" ""
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq "$(NO_VSYNC_DRM)" ""
|
||||
CFG += -DCONFIG_VSYNC_DRM
|
||||
endif
|
||||
|
||||
ifeq "$(NO_VSYNC_OPENGL)" ""
|
||||
CFG += -DCONFIG_VSYNC_OPENGL
|
||||
LIBS += -lGL
|
||||
endif
|
||||
|
||||
CFLAGS += $(CFG)
|
||||
|
||||
LIBS += $(shell pkg-config --libs $(PACKAGES))
|
||||
|
Reference in New Issue
Block a user