Browse Source

res tweak for web usage.

undefined
Benjamin ‘Touky’ Huet Sam Hocevar <sam@hocevar.net> 11 years ago
parent
commit
568acece6e
1 changed files with 8 additions and 3 deletions
  1. +8
    -3
      test/meshviewer.cpp

+ 8
- 3
test/meshviewer.cpp View File

@@ -24,9 +24,17 @@ using namespace lol;


static int const TEXTURE_WIDTH = 256; static int const TEXTURE_WIDTH = 256;


#define NO_NACL_EM (!__native_client__ && !EMSCRIPTEN)
#define NACL_EM (__native_client__ || EMSCRIPTEN)

#define R_M 1.f #define R_M 1.f
#if NACL_EM
#define DEFAULT_WIDTH (770.f * R_M)
#define DEFAULT_HEIGHT (200.f * R_M)
#else
#define DEFAULT_WIDTH (1200.f * R_M) #define DEFAULT_WIDTH (1200.f * R_M)
#define DEFAULT_HEIGHT (400.f * R_M) #define DEFAULT_HEIGHT (400.f * R_M)
#endif //NACL_EM
#define WIDTH ((float)Video::GetSize().x) #define WIDTH ((float)Video::GetSize().x)
#define HEIGHT ((float)Video::GetSize().y) #define HEIGHT ((float)Video::GetSize().y)
#define SCREEN_W (10.f / WIDTH) #define SCREEN_W (10.f / WIDTH)
@@ -48,9 +56,6 @@ static int const TEXTURE_WIDTH = 256;


#define WITH_TEXTURE 0 #define WITH_TEXTURE 0


#define NO_NACL_EM (!__native_client__ && !EMSCRIPTEN)
#define NACL_EM (__native_client__ || EMSCRIPTEN)

#define HAS_KBOARD (m_input_usage & (1<<IPT_MV_KBOARD)) #define HAS_KBOARD (m_input_usage & (1<<IPT_MV_KBOARD))
#define HAS_MOUSE (m_input_usage & (1<<IPT_MV_MOUSE)) #define HAS_MOUSE (m_input_usage & (1<<IPT_MV_MOUSE))




Loading…
Cancel
Save