Skip to content
Permalink
Browse files

Some Windows-related fixes.

  • Loading branch information...
steiner- authored and eile committed Sep 6, 2017
1 parent 21b3de0 commit df077e1444ffc54ff3045ef8e180fa76a61966ae
@@ -54,6 +54,12 @@ if(APPLE)
include_directories(SYSTEM /opt/X11/include /usr/X11R6/include)
endif()

if(MSVC)
include(UseGnuWin32)
else()
set(PTHREAD_LIBRARIES pthread)
endif()

common_find_package(Boost REQUIRED COMPONENTS
program_options filesystem system thread)
common_find_package(BISON REQUIRED)
@@ -154,12 +160,6 @@ endif()

list(APPEND CPPCHECK_EXTRA_ARGS -DEQUALIZERFABRIC_STATIC=)

if(MSVC)
include(UseGnuWin32)
else()
set(PTHREAD_LIBRARIES pthread)
endif()

if(APPLE)
add_definitions(-DDarwin)
endif(APPLE)
@@ -16,13 +16,11 @@
*/

#include "projection.h"
#include "vmmlib.h"
#include "wall.h"

#include <lunchbox/log.h>

#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif
#define DEG2RAD(angle) ((angle) * static_cast<float>(M_PI) / 180.f)
#define RAD2DEG(angle) ((angle)*180.f / static_cast<float>(M_PI))

@@ -18,6 +18,19 @@
#ifndef EQFABRIC_VMMLIB_H
#define EQFABRIC_VMMLIB_H

#if defined(_MSC_VER)
//can otherwise cause problems with, e.g., M_PI under Windows.
#define _USE_MATH_DEFINES
#include <cmath>
#ifndef M_PI
#include <corecrt_math_defines.h>
#endif
#else
#ifndef M_PI
#define M_PI 3.1415926535897932
#endif
#endif

#include <eq/fabric/types.h>
#include <lunchbox/bitOperation.h>

@@ -17,14 +17,12 @@
*/

#include "wall.h"
#include "vmmlib.h"
#include "pixelViewport.h"
#include "projection.h"

#include <lunchbox/log.h>

#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif
#define DEG2RAD(angle) ((angle) * static_cast<float>(M_PI) / 180.f)

namespace eq
@@ -19,10 +19,10 @@
#ifndef EQFABRIC_WALL_H
#define EQFABRIC_WALL_H

#include <iostream>
#include <eq/fabric/api.h>
#include <eq/fabric/types.h>
#include <eq/fabric/vmmlib.h>
#include <iostream>

namespace eq
{
@@ -18,11 +18,9 @@
#include "frustumData.h"

#include <eq/fabric/projection.h>
#include <eq/fabric/vmmlib.h>
#include <eq/fabric/wall.h>

#ifndef M_PI
#define M_PI 3.14159265358979323846264338327
#endif
#define DEG2RAD(angle) ((angle) * static_cast<float>(M_PI) / 180.f)

namespace eq
@@ -28,6 +28,7 @@
#include <eq/pipe.h>

#include <lunchbox/log.h>
#include <lunchbox/debug.h>

namespace eq
{
@@ -842,8 +843,11 @@ HGLRC Window::createWGLContext()
}

// share context
if (!coreContext && shareCtx && !wglShareLists(shareCtx, context))
LBWARN << "Context sharing failed: " << lunchbox::sysError << std::endl;
if (!coreContext && shareCtx && !wglShareLists(shareCtx, context))
{
LBWARN << "Context sharing failed: " << lunchbox::sysError
<< lunchbox::backtrace << std::endl;
}

return context;
}
@@ -43,7 +43,6 @@
#endif
#ifdef WINOS
#define NOMINMAX
#include <winbase.h>
#include <windows.h>
#endif

0 comments on commit df077e1

Please sign in to comment.
You can’t perform that action at this time.