SLProject
4.2.000
A platform independent 3D computer graphics framework for desktop OS, Android, iOS and online in web browsers
|
App::run implementation from App.h for the GLFW platform. More...
#include <App.h>
#include <SLGLState.h>
#include <SLEnums.h>
#include <SLInterface.h>
#include <AppCommon.h>
#include <SLAssetManager.h>
#include <SLScene.h>
#include <SLSceneView.h>
#include <CVCapture.h>
#include <Profiler.h>
#include <SLAssetLoader.h>
#include <GLFW/glfw3.h>
Go to the source code of this file.
Macros | |
#define | GLFW_INCLUDE_NONE |
Functions | |
static SLbool | onPaint () |
Static paint function that gets called once every frame. More... | |
static void | onGLFWError (int error, const char *description) |
static void | onResize (GLFWwindow *myWindow, int width, int height) |
static void | onMouseButton (GLFWwindow *myWindow, int button, int action, int mods) |
static void | onMouseMove (GLFWwindow *myWindow, double x, double y) |
static void | onMouseWheel (GLFWwindow *myWindow, double xscroll, double yscroll) |
static void | onKey (GLFWwindow *myWindow, int GLFWKey, int scancode, int action, int mods) |
static void | onCharInput (GLFWwindow *, SLuint c) |
Event handler for GLFW character input. More... | |
static void | onClose (GLFWwindow *myWindow) |
static SLKey | mapKeyToSLKey (int key) |
Maps the GLFW key codes to the SLKey codes. More... | |
Variables | |
static GLFWwindow * | window |
The global glfw window handle. More... | |
static SLint | svIndex |
Scene view index. More... | |
static SLint | scrWidth |
Window width at start up. More... | |
static SLint | scrHeight |
Window height at start up. More... | |
static SLfloat | contentScaleX |
Content scale in X direction. More... | |
static SLfloat | contentScaleY |
Content scale in Y direction. More... | |
static SLint | dpi = 142 |
Dot per inch resolution of screen. More... | |
static SLbool | fixAspectRatio = false |
Flag if wnd aspect ratio should be fixed. More... | |
static SLint | startX |
start position x in pixels More... | |
static SLint | startY |
start position y in pixels More... | |
static SLint | mouseX |
Last mouse position x in pixels. More... | |
static SLint | mouseY |
Last mouse position y in pixels. More... | |
static SLint | lastWidth |
Last window width in pixels. More... | |
static SLint | lastHeight |
Last window height in pixels. More... | |
static SLfloat | lastMouseDownTime = 0.0f |
Last mouse press time. More... | |
static SLKey | modifiers = K_none |
last modifier keys More... | |
static SLbool | fullscreen = false |
flag if window is in fullscreen mode More... | |
static SLVec2i | windowPosBeforeFullscreen |
Window position before entering fullscreen mode. More... | |
App::run implementation from App.h for the GLFW platform.
The functions implement mostly the callbacks for the platform independent OpenGL window framework for desktop OS. For more info on how to create a new app with SLProject see: https://github.com/cpvrlab/SLProject4/wiki/Creating-a-New-App For more info about App framework see: https://cpvrlab.github.io/SLProject4/app-framework.html
Definition in file AppGLFW.cpp.
#define GLFW_INCLUDE_NONE |
Definition at line 29 of file AppGLFW.cpp.
|
static |
Event handler for GLFW character input.
Definition at line 489 of file AppGLFW.cpp.
|
static |
onClose event handler for deallocation of the scene & sceneview. onClose is called glfwPollEvents, glfwWaitEvents or glfwSwapBuffers.
Definition at line 498 of file AppGLFW.cpp.
|
static |
Error callback handler for GLFW.
Definition at line 256 of file AppGLFW.cpp.
|
static |
Key event handler sets the modifier key state & forwards the event to the slKeyPress/slKeyRelease functions.
Definition at line 420 of file AppGLFW.cpp.
|
static |
Mouse button event handler forwards the events to the slMouseDown or slMouseUp. Two finger touches of touch devices are simulated with ALT & CTRL modifiers.
Definition at line 300 of file AppGLFW.cpp.
|
static |
Mouse move event handler forwards the events to slMouseMove or slTouch2Move.
Definition at line 382 of file AppGLFW.cpp.
|
static |
Mouse wheel event handler forwards the events to slMouseWheel
Definition at line 405 of file AppGLFW.cpp.
|
static |
Static paint function that gets called once every frame.
Definition at line 222 of file AppGLFW.cpp.
|
static |
onResize: Event handler called on the resize event of the window. This event should called once before the onPaint event.
Definition at line 265 of file AppGLFW.cpp.
|
static |
Content scale in X direction.
Definition at line 39 of file AppGLFW.cpp.
|
static |
Content scale in Y direction.
Definition at line 40 of file AppGLFW.cpp.
|
static |
Dot per inch resolution of screen.
Definition at line 41 of file AppGLFW.cpp.
|
static |
Flag if wnd aspect ratio should be fixed.
Definition at line 42 of file AppGLFW.cpp.
|
static |
flag if window is in fullscreen mode
Definition at line 51 of file AppGLFW.cpp.
|
static |
Last window height in pixels.
Definition at line 48 of file AppGLFW.cpp.
|
static |
Last mouse press time.
Definition at line 49 of file AppGLFW.cpp.
|
static |
Last window width in pixels.
Definition at line 47 of file AppGLFW.cpp.
last modifier keys
Definition at line 50 of file AppGLFW.cpp.
|
static |
Last mouse position x in pixels.
Definition at line 45 of file AppGLFW.cpp.
|
static |
Last mouse position y in pixels.
Definition at line 46 of file AppGLFW.cpp.
|
static |
Window height at start up.
Definition at line 38 of file AppGLFW.cpp.
|
static |
Window width at start up.
Definition at line 37 of file AppGLFW.cpp.
|
static |
start position x in pixels
Definition at line 43 of file AppGLFW.cpp.
|
static |
start position y in pixels
Definition at line 44 of file AppGLFW.cpp.
|
static |
Scene view index.
Definition at line 36 of file AppGLFW.cpp.
|
static |
The global glfw window handle.
Definition at line 35 of file AppGLFW.cpp.
|
static |
Window position before entering fullscreen mode.
Definition at line 52 of file AppGLFW.cpp.