Mercurial > hg > orthanc-stone
comparison Framework/StoneInitialization.cpp @ 613:412a2d01a189
automatic initialization of glew
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Apr 2019 16:44:23 +0200 |
parents | ba72bffceb7d |
children | b8b2bb75fde1 |
comparison
equal
deleted
inserted
replaced
612:ba72bffceb7d | 613:412a2d01a189 |
---|---|
26 | 26 |
27 #if !defined(ORTHANC_ENABLE_SDL) | 27 #if !defined(ORTHANC_ENABLE_SDL) |
28 # error Macro ORTHANC_ENABLE_SDL must be defined | 28 # error Macro ORTHANC_ENABLE_SDL must be defined |
29 #endif | 29 #endif |
30 | 30 |
31 | |
32 #if ORTHANC_ENABLE_SDL == 1 | 31 #if ORTHANC_ENABLE_SDL == 1 |
33 # include "../Applications/Sdl/SdlWindow.h" | 32 # include "../Applications/Sdl/SdlWindow.h" |
34 #endif | |
35 | |
36 #if ORTHANC_ENABLE_OPENGL == 1 | |
37 # include "GL/glew.h" | |
38 #endif | 33 #endif |
39 | 34 |
40 namespace OrthancStone | 35 namespace OrthancStone |
41 { | 36 { |
42 void StoneInitialize() | 37 void StoneInitialize() |
43 { | 38 { |
44 Orthanc::Logging::Initialize(); | 39 Orthanc::Logging::Initialize(); |
45 | |
46 #if 0 | |
47 #if ORTHANC_ENABLE_OPENGL == 1 | |
48 glEnable(GL_DEBUG_OUTPUT); | |
49 GLenum err = glewInit(); | |
50 if (GLEW_OK != err) | |
51 { | |
52 const char* error = | |
53 reinterpret_cast<const char*>(glewGetErrorString(err)); | |
54 std::stringstream message; | |
55 message << "Using GLEW version " << reinterpret_cast<const char*>( | |
56 glewGetString(GLEW_VERSION)); | |
57 LOG(INFO) << "Using GLEW version " << message.str(); | |
58 } | |
59 #endif | |
60 #endif | |
61 | 40 |
62 #if ORTHANC_ENABLE_SDL == 1 | 41 #if ORTHANC_ENABLE_SDL == 1 |
63 OrthancStone::SdlWindow::GlobalInitialize(); | 42 OrthancStone::SdlWindow::GlobalInitialize(); |
64 #endif | 43 #endif |
65 } | 44 } |