Mercurial > hg > orthanc-stone
comparison Applications/Generic/GuiAdapter.cpp @ 853:bb88686acecc
fix OS X build
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Wed, 19 Jun 2019 12:30:20 +0200 |
parents | cdba0dbb4682 |
children | e3c56d4f863f |
comparison
equal
deleted
inserted
replaced
852:6d15261f9c99 | 853:bb88686acecc |
---|---|
18 * along with this program. If not, see <http://www.gnu.org/licenses/>. | 18 * along with this program. If not, see <http://www.gnu.org/licenses/>. |
19 **/ | 19 **/ |
20 | 20 |
21 #include "GuiAdapter.h" | 21 #include "GuiAdapter.h" |
22 | 22 |
23 #if ORTHANC_ENABLE_OPENGL == 1 | |
24 # include "../../Framework/OpenGL/OpenGLIncludes.h" | |
25 #endif | |
26 | |
23 #if ORTHANC_ENABLE_SDL == 1 | 27 #if ORTHANC_ENABLE_SDL == 1 |
24 # if ORTHANC_ENABLE_OPENGL == 1 | 28 # include <SDL_video.h> |
25 # include "../../Framework/OpenGL/OpenGLIncludes.h" | 29 # include <SDL_render.h> |
26 # include <SDL_video.h> | 30 # include <SDL.h> |
27 # include <SDL_render.h> | |
28 # include <SDL.h> | |
29 # endif | |
30 #endif | 31 #endif |
31 | 32 |
32 #if ORTHANC_ENABLE_THREADS == 1 | 33 #if ORTHANC_ENABLE_THREADS == 1 |
33 # include "../../Framework/Messages/LockingEmitter.h" | 34 # include "../../Framework/Messages/LockingEmitter.h" |
34 #endif | 35 #endif |
35 | 36 |
36 namespace OrthancStone | 37 namespace OrthancStone |
37 { | 38 { |
38 void GuiAdapter::RegisterWidget(boost::shared_ptr<IGuiAdapterWidget> widget) | 39 void GuiAdapter::RegisterWidget(boost::shared_ptr<IGuiAdapterWidget> widget) |
503 void GuiAdapter::RequestAnimationFrame(OnAnimationFrameFunc func, void* userData) | 504 void GuiAdapter::RequestAnimationFrame(OnAnimationFrameFunc func, void* userData) |
504 { | 505 { |
505 animationFrameHandlers_.push_back(std::make_pair(func, userData)); | 506 animationFrameHandlers_.push_back(std::make_pair(func, userData)); |
506 } | 507 } |
507 | 508 |
508 # if ORTHANC_ENABLE_OPENGL == 1 | 509 # if ORTHANC_ENABLE_OPENGL == 1 && !defined(__APPLE__) /* OpenGL debug is not available on OS X */ |
509 | 510 |
510 static void GLAPIENTRY | 511 static void GLAPIENTRY |
511 OpenGLMessageCallback(GLenum source, | 512 OpenGLMessageCallback(GLenum source, |
512 GLenum type, | 513 GLenum type, |
513 GLuint id, | 514 GLuint id, |
525 } | 526 } |
526 # endif | 527 # endif |
527 | 528 |
528 void GuiAdapter::Run() | 529 void GuiAdapter::Run() |
529 { | 530 { |
530 # if ORTHANC_ENABLE_OPENGL == 1 | 531 # if ORTHANC_ENABLE_OPENGL == 1 && !defined(__APPLE__) |
531 glEnable(GL_DEBUG_OUTPUT); | 532 glEnable(GL_DEBUG_OUTPUT); |
532 glDebugMessageCallback(OpenGLMessageCallback, 0); | 533 glDebugMessageCallback(OpenGLMessageCallback, 0); |
533 # endif | 534 # endif |
534 | 535 |
535 // Uint32 SDL_GetWindowID(SDL_Window* window) | 536 // Uint32 SDL_GetWindowID(SDL_Window* window) |