@@ -100,12 +100,7 @@ if test "x${ac_cv_my_stop_looking_for_gl}" = "xno"; then | |||||
LIBS="$LIBS_save"]) | LIBS="$LIBS_save"]) | ||||
fi | fi | ||||
if test "${ac_cv_my_have_gl}" = "no"; then | |||||
AC_MSG_ERROR([[No OpenGL or OpenGL ES implementation found]]) | |||||
fi | |||||
dnl Use Glew? | |||||
dnl Use Glew? | |||||
ac_cv_my_have_glew="no" | ac_cv_my_have_glew="no" | ||||
PKG_CHECK_MODULES(GLEW, glew, | PKG_CHECK_MODULES(GLEW, glew, | ||||
[ac_cv_my_have_glew="yes" | [ac_cv_my_have_glew="yes" | ||||
@@ -130,12 +125,17 @@ if test "${ac_cv_my_have_glew}" != "no"; then | |||||
fi | fi | ||||
AM_CONDITIONAL(USE_GLEW, test "${ac_cv_my_have_glew}" != "no") | AM_CONDITIONAL(USE_GLEW, test "${ac_cv_my_have_glew}" != "no") | ||||
dnl Poor man's GL feature detection if all else failed. | |||||
dnl Poor man's GL feature detection if all else failed. | |||||
save_LIBS="${LIBS}" | save_LIBS="${LIBS}" | ||||
LIBS="${LIBS} ${GL_LIBS} ${GLES2_LIBS}" | LIBS="${LIBS} ${GL_LIBS} ${GLES2_LIBS}" | ||||
AC_CHECK_FUNCS(glBegin) | AC_CHECK_FUNCS(glBegin) | ||||
LIBS="${save_LIBS}" | LIBS="${save_LIBS}" | ||||
dnl Warn if we couldn't find an OpenGL-like API | |||||
if test "${ac_cv_my_have_gl}" = "no"; then | |||||
AC_MSG_WARN([[No OpenGL or OpenGL ES implementation found]]) | |||||
fi | |||||
])# LOL_CHECK_OPENGL | ])# LOL_CHECK_OPENGL | ||||
@@ -21,9 +21,10 @@ class Enum | |||||
{ | { | ||||
public: | public: | ||||
template<typename T> | template<typename T> | ||||
static String EnumToString(T& parameter) | |||||
static String EnumToString(T const& parameter) | |||||
{ | { | ||||
//Create your own | |||||
UNUSED(parameter); | |||||
// Create your own | |||||
ASSERT(0); | ASSERT(0); | ||||
return String(); | return String(); | ||||
} | } | ||||
@@ -302,9 +302,11 @@ void Scene::RenderTiles() // XXX: rename to Blit() | |||||
rc.SetAlphaFunc(AlphaFunc::GreaterOrEqual, 0.01f); | rc.SetAlphaFunc(AlphaFunc::GreaterOrEqual, 0.01f); | ||||
#if defined USE_D3D9 || defined _XBOX | #if defined USE_D3D9 || defined _XBOX | ||||
#elif !defined HAVE_GLES_2X | |||||
/* TODO */ | |||||
#elif (defined USE_GLEW || defined HAVE_GL_2X) && !defined HAVE_GLES_2X | |||||
glEnable(GL_TEXTURE_2D); | glEnable(GL_TEXTURE_2D); | ||||
#endif | #endif | ||||
if (!data->m_tile_shader) | if (!data->m_tile_shader) | ||||
data->m_tile_shader = Shader::Create(LOLFX_RESOURCE_NAME(tile)); | data->m_tile_shader = Shader::Create(LOLFX_RESOURCE_NAME(tile)); | ||||
if (!data->m_palette_shader) | if (!data->m_palette_shader) | ||||
@@ -400,7 +402,7 @@ void Scene::RenderTiles() // XXX: rename to Blit() | |||||
#if defined USE_D3D9 || defined _XBOX | #if defined USE_D3D9 || defined _XBOX | ||||
/* TODO */ | /* TODO */ | ||||
#elif !defined HAVE_GLES_2X | |||||
#elif (defined USE_GLEW || defined HAVE_GL_2X) && !defined HAVE_GLES_2X | |||||
glDisable(GL_TEXTURE_2D); | glDisable(GL_TEXTURE_2D); | ||||
#endif | #endif | ||||
} | } | ||||
@@ -65,7 +65,7 @@ void Video::SetDebugRenderMode(DebugRenderMode d) | |||||
{ | { | ||||
#if defined USE_D3D9 || defined _XBOX | #if defined USE_D3D9 || defined _XBOX | ||||
#elif defined HAVE_GLES_2X | #elif defined HAVE_GLES_2X | ||||
#else | |||||
#elif defined USE_GLEW || defined HAVE_GL_2X | |||||
glEnable(GL_CULL_FACE); | glEnable(GL_CULL_FACE); | ||||
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); | glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); | ||||
#endif | #endif | ||||
@@ -75,7 +75,7 @@ void Video::SetDebugRenderMode(DebugRenderMode d) | |||||
{ | { | ||||
#if defined USE_D3D9 || defined _XBOX | #if defined USE_D3D9 || defined _XBOX | ||||
#elif defined HAVE_GLES_2X | #elif defined HAVE_GLES_2X | ||||
#else | |||||
#elif defined USE_GLEW || defined HAVE_GL_2X | |||||
glDisable(GL_CULL_FACE); | glDisable(GL_CULL_FACE); | ||||
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); | glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); | ||||
#endif | #endif | ||||
@@ -105,7 +105,7 @@ void Video::Capture(uint32_t *buffer) | |||||
{ | { | ||||
#if defined USE_D3D9 || defined _XBOX | #if defined USE_D3D9 || defined _XBOX | ||||
/* TODO */ | /* TODO */ | ||||
#else | |||||
#elif defined USE_GLEW || defined HAVE_GL_2X || defined HAVE_GLEX_2X | |||||
GLint v[4]; | GLint v[4]; | ||||
# if defined __CELLOS_LV2__ | # if defined __CELLOS_LV2__ | ||||
// FIXME: use psglCreateDeviceAuto && psglGetDeviceDimensions | // FIXME: use psglCreateDeviceAuto && psglGetDeviceDimensions | ||||