Remove xf86vmode dependency

This commit is contained in:
Edouard Dupin 2012-02-16 12:22:05 +01:00
parent ed7eff92f8
commit 23ca4b1821
2 changed files with 4 additions and 13 deletions

View File

@ -8,7 +8,7 @@ LOCAL_STATIC_LIBRARIES := etk libfreetype tinyxml libzip libpng
LOCAL_C_INCLUDES := -I$(LOCAL_PATH) LOCAL_C_INCLUDES := -I$(LOCAL_PATH)
LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH) LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)
LOCAL_EXPORT_LDLIBS := -lGL -lGLU -lz -lX11 -lXxf86vm LOCAL_EXPORT_LDLIBS := -lGL -lGLU -lz -lX11
LOCAL_CFLAGS := -D__PLATFORM__Linux \ LOCAL_CFLAGS := -D__PLATFORM__Linux \
-Wno-write-strings \ -Wno-write-strings \
@ -29,7 +29,7 @@ LOCAL_SRC_FILES := \
#for freetype : https://github.com/cdave1/freetype2-android #for freetype : https://github.com/cdave1/freetype2-android
# Ewol Test Software : # Ewol Test Software :
LOCAL_LDLIBS := -lGL -lGLU -lz -lX11 -lXxf86vm LOCAL_LDLIBS := -lGL -lGLU -lz -lX11
include $(BUILD_STATIC_LIBRARY) include $(BUILD_STATIC_LIBRARY)

View File

@ -36,12 +36,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>
#include <GL/glx.h> #include <GL/glx.h>
#include <X11/Xatom.h> #include <X11/Xatom.h>
#include <X11/extensions/xf86vmode.h>
#include <sys/times.h> #include <sys/times.h>
@ -158,20 +154,15 @@ bool CreateX11Context(void)
EWOL_INFO("Display opened."); EWOL_INFO("Display opened.");
} }
int Xscreen = DefaultScreen(m_display); int Xscreen = DefaultScreen(m_display);
{
int32_t vmMajor, vmMinor;
XF86VidModeQueryVersion(m_display, &vmMajor, &vmMinor);
EWOL_INFO("XF86 VideoMode extension version " << vmMajor << "." << vmMinor);
}
// get an appropriate visual // get an appropriate visual
m_visual = glXChooseVisual(m_display, Xscreen, attrListDbl); m_visual = glXChooseVisual(m_display, Xscreen, attrListDbl);
if (NULL == m_visual) { if (NULL == m_visual) {
m_visual = glXChooseVisual(m_display, Xscreen, attrListSgl); m_visual = glXChooseVisual(m_display, Xscreen, attrListSgl);
m_doubleBuffered = false; m_doubleBuffered = false;
EWOL_INFO("XF86 singlebuffered rendering will be used, no doublebuffering available"); EWOL_INFO("GL-X singlebuffered rendering will be used, no doublebuffering available");
} else { } else {
m_doubleBuffered = true; m_doubleBuffered = true;
EWOL_INFO("XF86 doublebuffered rendering available"); EWOL_INFO("GL-X doublebuffered rendering available");
} }
{ {
int32_t glxMajor, glxMinor; int32_t glxMajor, glxMinor;