Commit b0f14b97 authored by Ronan's avatar Ronan
Browse files

fix compilation with glew in generic_opengl_display

parent 1b08cc54
......@@ -34,6 +34,7 @@
#include <GL/gl.h>
#elif !defined(QOPENGLFUNCTIONS_H) // glew is already included by QT.
#include <GL/glew.h>
#define GLEW_ENABLED 1
#endif
// =============================================================================
......
......@@ -18,8 +18,6 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include <GL/glew.h>
#include "mediastreamer2/msfilter.h"
#include "mediastreamer2/msogl.h"
#include "mediastreamer2/msvideo.h"
......@@ -58,11 +56,15 @@ typedef struct _FilterData FilterData;
static void ogl_init (MSFilter *f) {
FilterData *data = ms_new0(FilterData, 1);
#ifdef GLEW_ENABLED
if (glewInit() != GLEW_OK)
ms_error("glew init error");
else if (!GLEW_VERSION_2_0)
ms_error("glew 2.0 is required");
#endif
data->display = ogl_display_new();
data->show_video = TRUE;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment