more windows build, first cut at getting opengl working, more disabling VPX

This commit is contained in:
Brad Hefta-Gaub 2014-01-11 21:39:45 -08:00
parent cded9a1558
commit a34d4acb71
3 changed files with 96 additions and 83 deletions

View file

@ -26,14 +26,21 @@ set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} $ENV{QT_CMAKE_PREFIX_PATH})
if (APPLE)
set(GL_HEADERS "#include <GLUT/glut.h>\n#include <OpenGL/glext.h>")
else (APPLE)
# include the right GL headers for UNIX
set(GL_HEADERS "#include <GL/gl.h>\n#include <GL/glut.h>\n#include <GL/glext.h>")
endif (APPLE)
if (UNIX)
# include the right GL headers for UNIX
set(GL_HEADERS "#include <GL/gl.h>\n#include <GL/glut.h>\n#include <GL/glext.h>")
endif (UNIX)
if (WIN32)
set(GLUT_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external/glut)
set(GL_HEADERS "#define GLEW_STATIC\n#define FREEGLUT_STATIC\n#define FREEGLUT_LIB_PRAGMAS 0\n#include <GL/glew.h>\n#include <GL/wglew.h>\n#include <GL/freeglut_std.h>\n#include <GL/freeglut_ext.h>")
#set(GLUT_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/external/glut)
#set(GL_HEADERS "#define GLEW_STATIC\n#define FREEGLUT_STATIC\n#define FREEGLUT_LIB_PRAGMAS 0\n#include <GL/glew.h>\n#include <GL/wglew.h>\n#include <GL/freeglut_std.h>\n#include <GL/freeglut_ext.h>")
# this bit of #define GLdouble GLdouble is to fix up a mismatch between windows and the Qt versions of open GL.
# this will cause the QT versions to not accidentally define GLdouble as a float.
# undeffing NOMINMAX is because the Qt stuff doesn't safely check that that isn't already defined.
set(GL_HEADERS "#undef NOMINMAX\n#define GLdouble GLdouble\n#include <GL/glut.h>")
endif (WIN32)
# set up the external glm library
@ -222,9 +229,9 @@ endif (APPLE)
if (WIN32)
target_link_libraries(
${TARGET_NAME}
${CMAKE_CURRENT_SOURCE_DIR}/external/glut/Release/glew32.lib
${CMAKE_CURRENT_SOURCE_DIR}/external/glut/Release/freeglut.lib
${CMAKE_CURRENT_SOURCE_DIR}/external/glut/Release/pthread_lib.lib
#${CMAKE_CURRENT_SOURCE_DIR}/external/glut/Release/glew32.lib
#${CMAKE_CURRENT_SOURCE_DIR}/external/glut/Release/freeglut.lib
#${CMAKE_CURRENT_SOURCE_DIR}/external/glut/Release/pthread_lib.lib
wsock32.lib
)
else (WIN32)

View file

@ -8,8 +8,10 @@
#include <glm/gtx/quaternion.hpp>
#ifdef HAVE_LIBVPX
#include <vpx_decoder.h>
#include <vp8dx.h>
#endif
#include <PacketHeaders.h>

View file

@ -13,7 +13,9 @@
#include <opencv2/opencv.hpp>
#ifdef HAVE_LIBVPX
#include <vpx_codec.h>
#endif
#include "InterfaceConfig.h"
@ -62,8 +64,10 @@ private:
cv::RotatedRect _textureRect;
float _aspectRatio;
#ifdef HAVE_LIBVPX
vpx_codec_ctx_t _colorCodec;
vpx_codec_ctx_t _depthCodec;
#endif
bool _lastFullFrame;
bool _lastDepthOnly;