From f648967da53a19495af1d2d2cb5337f47a700d64 Mon Sep 17 00:00:00 2001 From: mancoast Date: Thu, 23 May 2019 20:49:34 -0400 Subject: [PATCH 1/2] Update .gitignore --- src/.gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/src/.gitignore b/src/.gitignore index 57603eaba..b7cdf7e1e 100644 --- a/src/.gitignore +++ b/src/.gitignore @@ -12,3 +12,4 @@ EyeTune/EyeTune.WindowsUniversal.Application/BundleArtifacts/Upload/x64.txt EyeTune/EyeTune.WindowsUniversal.Application/EyeTune.WindowsUniversal.Application_StoreKey.pfx EyeTune/EyeTune.WindowsUniversal.Application/BundleArtifacts/x64.txt EyeTune/EyeTune.WindowsUniversal.Application/BundleArtifacts/ +EyeTune/EyeTune.WindowsUniversal.Application/Generated Files/ From 5d73c7bac173886a9fdc0154332fe15c7795bd61 Mon Sep 17 00:00:00 2001 From: mancoast Date: Sat, 1 Jun 2019 10:47:42 -0400 Subject: [PATCH 2/2] STEREOSCOPIC_SBS --- src/projectM-sdl/pmSDL.cpp | 40 +++++++++++++--- src/projectM-sdl/pmSDL.hpp | 40 +++++++++++++--- src/projectM-sdl/projectM_SDL_main.cpp | 63 +++++++++++++++++++++----- 3 files changed, 119 insertions(+), 24 deletions(-) diff --git a/src/projectM-sdl/pmSDL.cpp b/src/projectM-sdl/pmSDL.cpp index 4a7474fe3..7857897d9 100644 --- a/src/projectM-sdl/pmSDL.cpp +++ b/src/projectM-sdl/pmSDL.cpp @@ -1,9 +1,32 @@ -// -// pmSDL.cpp -// SDLprojectM -// -// Created by Mischa Spiegelmock on 2017-09-18. -// +/** +* projectM -- Milkdrop-esque visualisation SDK +* Copyright (C)2003-2019 projectM Team +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* See 'LICENSE.txt' included within this release +* +* projectM-sdl +* This is an implementation of projectM using libSDL2 +* +* pmSDL.cpp +* Authors: Created by Mischa Spiegelmock on 2017-09-18. +* +* +* experimental Stereoscopic SBS driver functionality by +* RobertPancoast77@gmail.com +*/ #include "pmSDL.hpp" #include @@ -144,7 +167,10 @@ void projectMSDL::keyHandler(SDL_Event *sdl_evt) { case SDLK_f: if (sdl_mod & KMOD_LGUI || sdl_mod & KMOD_RGUI || sdl_mod & KMOD_LCTRL) { // command-f: fullscreen - toggleFullScreen(); + // Stereo requires fullscreen +#ifndef STEREOSCOPIC_SBS + toggleFullScreen(); +#endif return; // handled } break; diff --git a/src/projectM-sdl/pmSDL.hpp b/src/projectM-sdl/pmSDL.hpp index cf226163a..862d37100 100644 --- a/src/projectM-sdl/pmSDL.hpp +++ b/src/projectM-sdl/pmSDL.hpp @@ -1,13 +1,41 @@ -// -// pmSDL.hpp -// SDLprojectM -// -// Created by Mischa Spiegelmock on 2017-09-18. -// +/** +* projectM -- Milkdrop-esque visualisation SDK +* Copyright (C)2003-2019 projectM Team +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* See 'LICENSE.txt' included within this release +* +* projectM-sdl +* This is an implementation of projectM using libSDL2 +* +* pmSDL.hpp +* Authors: Created by Mischa Spiegelmock on 2017-09-18. +* +*/ + #ifndef pmSDL_hpp #define pmSDL_hpp + + +#define FAKE_AUDIO 1 +#define TEST_ALL_PRESETS 0 +#define STEREOSCOPIC_SBS 1 + + #include "projectM-opengl.h" #include #include diff --git a/src/projectM-sdl/projectM_SDL_main.cpp b/src/projectM-sdl/projectM_SDL_main.cpp index 73e1a66a6..b6f7c9c5c 100644 --- a/src/projectM-sdl/projectM_SDL_main.cpp +++ b/src/projectM-sdl/projectM_SDL_main.cpp @@ -1,16 +1,35 @@ -// -// main.cpp -// projectM-sdl -// -// Created by Mischa Spiegelmock on 6/3/15. -// -// This is an implementation of projectM using libSDL2 +/** +* projectM -- Milkdrop-esque visualisation SDK +* Copyright (C)2003-2019 projectM Team +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* See 'LICENSE.txt' included within this release +* +* projectM-sdl +* This is an implementation of projectM using libSDL2 +* +* main.cpp +* Authors: Created by Mischa Spiegelmock on 6/3/15. +* +* +* experimental Stereoscopic SBS driver functionality by +* RobertPancoast77@gmail.com +*/ #include "pmSDL.hpp" -#define FAKE_AUDIO 0 -#define TEST_ALL_PRESETS 0 - #if OGL_DEBUG void DebugLog(GLenum source, GLenum type, @@ -92,9 +111,27 @@ int main(int argc, char *argv[]) { SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE); #endif + SDL_Window *win = SDL_CreateWindow("projectM", 0, 0, width, height, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE); - SDL_GLContext glCtx = SDL_GL_CreateContext(win); + + +#ifdef STEREOSCOPIC_SBS + + // enable stereo + if (SDL_GL_SetAttribute(SDL_GL_STEREO, 1) == 0) + { + SDL_Log("SDL_GL_STEREO: true"); + } + + // requires fullscreen mode + SDL_ShowCursor(false); + SDL_SetWindowFullscreen(win, SDL_WINDOW_FULLSCREEN); + +#endif + + + SDL_GLContext glCtx = SDL_GL_CreateContext(win); SDL_Log("GL_VERSION: %s", glGetString(GL_VERSION)); @@ -142,6 +179,10 @@ int main(int argc, char *argv[]) { } app->init(win, &glCtx); +#ifdef STEREOSCOPIC_SBS + app->toggleFullScreen(); +#endif + #if OGL_DEBUG && !USE_GLES glEnable(GL_DEBUG_OUTPUT); glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS);