comparison Samples/Sdl/FusionMprSdl.cpp @ 897:9c2f6d6b9f4a am-dev

Merge
author Alain Mazy <alain@mazy.be>
date Tue, 16 Jul 2019 12:37:29 +0200
parents 6e79e8c9021c 0aff28f15ea2
children f9ae731fdc25
comparison
equal deleted inserted replaced
896:875bd6aca5e6 897:9c2f6d6b9f4a
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 "FusionMprSdl.h" 21 #include "FusionMprSdl.h"
22 22
23 #include "../../Applications/Sdl/SdlOpenGLWindow.h" 23 #include "../../Applications/Sdl/SdlOpenGLContext.h"
24 24
25 #include "../../Framework/StoneInitialization.h" 25 #include "../../Framework/StoneInitialization.h"
26 26
27 #include "../../Framework/Scene2D/CairoCompositor.h" 27 #include "../../Framework/Scene2D/CairoCompositor.h"
28 #include "../../Framework/Scene2D/ColorTextureSceneLayer.h" 28 #include "../../Framework/Scene2D/ColorTextureSceneLayer.h"
585 585
586 void FusionMprSdlApp::Run() 586 void FusionMprSdlApp::Run()
587 { 587 {
588 // False means we do NOT let Windows treat this as a legacy application 588 // False means we do NOT let Windows treat this as a legacy application
589 // that needs to be scaled 589 // that needs to be scaled
590 SdlOpenGLWindow window("Hello", 1024, 1024, false); 590 SdlOpenGLContext window("Hello", 1024, 1024, false);
591 591
592 controller_->FitContent(window.GetCanvasWidth(), window.GetCanvasHeight()); 592 controller_->FitContent(window.GetCanvasWidth(), window.GetCanvasHeight());
593 593
594 glEnable(GL_DEBUG_OUTPUT); 594 glEnable(GL_DEBUG_OUTPUT);
595 glDebugMessageCallback(OpenGLMessageCallback, 0); 595 glDebugMessageCallback(OpenGLMessageCallback, 0);
704 } 704 }
705 else if (event.type == SDL_WINDOWEVENT && 705 else if (event.type == SDL_WINDOWEVENT &&
706 event.window.event == SDL_WINDOWEVENT_SIZE_CHANGED) 706 event.window.event == SDL_WINDOWEVENT_SIZE_CHANGED)
707 { 707 {
708 DisableTracker(); // was: tracker.reset(NULL); 708 DisableTracker(); // was: tracker.reset(NULL);
709 compositor_->UpdateSize();
710 } 709 }
711 else if (event.type == SDL_KEYDOWN && 710 else if (event.type == SDL_KEYDOWN &&
712 event.key.repeat == 0 /* Ignore key bounce */) 711 event.key.repeat == 0 /* Ignore key bounce */)
713 { 712 {
714 switch (event.key.keysym.sym) 713 switch (event.key.keysym.sym)