Fix library for GLES1
git-svn-id: https://svn.code.sf.net/p/freeglut/code/trunk@1186 7f0cb862-5218-0410-a997-914c9d46530a
This commit is contained in:
parent
b42288155e
commit
7a42e4527e
@ -153,7 +153,7 @@ IF(FREEGLUT_GLES2)
|
||||
LIST(APPEND LIBS GLESv2 EGL)
|
||||
ELSEIF(FREEGLUT_GLES1)
|
||||
ADD_DEFINITIONS(-DFREEGLUT_GLES1)
|
||||
LIST(APPEND LIBS GLESv1 EGL)
|
||||
LIST(APPEND LIBS GLESv1_CM EGL)
|
||||
ELSE()
|
||||
FIND_PACKAGE(OpenGL REQUIRED)
|
||||
LIST(APPEND LIBS ${OPENGL_gl_LIBRARY})
|
||||
@ -363,10 +363,20 @@ ENDIF()
|
||||
# Define static build dependencies
|
||||
IF(WIN32)
|
||||
SET(PC_LIBS_PRIVATE "-lopengl32 -lwinmm -lgdi32")
|
||||
ELSEIF(ANDROID)
|
||||
SET(PC_LIBS_PRIVATE "-llog -landroid -lGLESv2 -lEGL")
|
||||
ELSEIF(FREEGLUT_GLES2)
|
||||
IF(ANDROID)
|
||||
SET(PC_LIBS_PRIVATE "-llog -landroid -lGLESv2 -lEGL")
|
||||
ELSE()
|
||||
SET(PC_LIBS_PRIVATE "-lX11 -lXxf86vm -lXrandr -lGLESv2 -lEGL")
|
||||
ENDIF()
|
||||
ELSEIF(FREEGLUT_GLES1)
|
||||
IF(ANDROID)
|
||||
SET(PC_LIBS_PRIVATE "-llog -landroid -lGLESv1_CM -lEGL")
|
||||
ELSE()
|
||||
SET(PC_LIBS_PRIVATE "-lX11 -lXxf86vm -lXrandr -lGLESv1_CM -lEGL")
|
||||
ENDIF()
|
||||
ELSE()
|
||||
SET(PC_LIBS_PRIVATE "-lX11 -lXxf86vm -lXrandr -lGLESv2 -lEGL")
|
||||
SET(PC_LIBS_PRIVATE "-lX11 -lXxf86vm -lXrandr -lGL")
|
||||
ENDIF()
|
||||
# Client applications need to define FreeGLUT GLES version to
|
||||
# bootstrap headers inclusion in freeglut_std.h:
|
||||
|
@ -82,7 +82,11 @@ EGLContext fghCreateNewContextEGL( SFG_Window* window ) {
|
||||
}
|
||||
EGLint ver = -1;
|
||||
eglQueryContext(fgDisplay.pDisplay.egl.Display, context, EGL_CONTEXT_CLIENT_VERSION, &ver);
|
||||
#ifdef GL_ES_VERSION_2_0
|
||||
if (ver != 2)
|
||||
#else
|
||||
if (ver != 1)
|
||||
#endif
|
||||
fgError("Wrong GLES major version: %d\n", ver);
|
||||
|
||||
return context;
|
||||
|
Reference in New Issue
Block a user