Skip to content

Commit

Permalink
update Eigen dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
wjakob committed Aug 25, 2017
1 parent d8903a4 commit 17492d3
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
2 changes: 1 addition & 1 deletion ext/eigen
Submodule eigen updated 1144 files
21 changes: 11 additions & 10 deletions include/nanogui/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,17 @@

#pragma once

#if defined(_WIN32)
# if defined(NANOGUI_BUILD)
/* Quench a few warnings on when compiling NanoGUI on Windows */
# pragma warning(disable : 4127) // warning C4127: conditional expression is constant
# pragma warning(disable : 4244) // warning C4244: conversion from X to Y, possible loss of data
# endif
# pragma warning(disable : 4251) // warning C4251: class X needs to have dll-interface to be used by clients of class Y
# pragma warning(disable : 4714) // warning C4714: function X marked as __forceinline not inlined
# pragma warning(disable : 4127) // warning C4127: conditional expression is constant
#endif

#include <Eigen/Core>
#include <stdint.h>
#include <array>
Expand Down Expand Up @@ -85,16 +96,6 @@
#define NANOGUI_FORCE_DISCRETE_GPU()
#endif

#if defined(_WIN32)
#if defined(NANOGUI_BUILD)
/* Quench a few warnings on when compiling NanoGUI on Windows */
#pragma warning(disable : 4127) // warning C4127: conditional expression is constant
#pragma warning(disable : 4244) // warning C4244: conversion from X to Y, possible loss of data
#endif
#pragma warning(disable : 4251) // warning C4251: class X needs to have dll-interface to be used by clients of class Y
#pragma warning(disable : 4714) // warning C4714: function X marked as __forceinline not inlined
#endif

// These will produce broken links in the docs build
#ifndef DOXYGEN_SHOULD_SKIP_THIS

Expand Down
8 changes: 4 additions & 4 deletions src/common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
#include <nanogui/screen.h>

#if defined(_WIN32)
#include <windows.h>
# include <windows.h>
#endif

#include <nanogui/opengl.h>
Expand All @@ -22,9 +22,9 @@
#include <iostream>

#if !defined(_WIN32)
#include <locale.h>
#include <signal.h>
#include <sys/dir.h>
# include <locale.h>
# include <signal.h>
# include <sys/dir.h>
#endif

NAMESPACE_BEGIN(nanogui)
Expand Down
4 changes: 2 additions & 2 deletions src/screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -376,8 +376,8 @@ void Screen::drawWidgets() {
glfwGetWindowSize(mGLFWWindow, &mSize[0], &mSize[1]);

#if defined(_WIN32) || defined(__linux__)
mSize = (mSize / mPixelRatio).cast<int>();
mFBSize = (mSize * mPixelRatio).cast<int>();
mSize = (mSize.cast<float>() / mPixelRatio).cast<int>();
mFBSize = (mSize.cast<float>() * mPixelRatio).cast<int>();
#else
/* Recompute pixel ratio on OSX */
if (mSize[0])
Expand Down

0 comments on commit 17492d3

Please sign in to comment.