Project
Loading...
Searching...
No Matches
GPUDisplayFrontendGlut.h
Go to the documentation of this file.
1// Copyright 2019-2020 CERN and copyright holders of ALICE O2.
2// See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3// All rights not expressly granted are reserved.
4//
5// This software is distributed under the terms of the GNU General Public
6// License v3 (GPL Version 3), copied verbatim in the file "COPYING".
7//
8// In applying this license CERN does not waive the privileges and immunities
9// granted to it by virtue of its status as an Intergovernmental Organization
10// or submit itself to any jurisdiction.
11
14
15#ifndef GPUDISPLAYFRONTENDGLUT_H
16#define GPUDISPLAYFRONTENDGLUT_H
17
18#include "GPUDisplayFrontend.h"
19
20namespace o2::gpu
21{
23{
24 public:
26 ~GPUDisplayFrontendGlut() override = default;
27
28 void StopDisplayA() override;
29 void SwitchFullscreen(bool set) override;
30 void ToggleMaximized(bool set) override;
31 void SetVSync(bool enable) override;
32 bool canSetVSync() override;
33 void OpenGLPrint(const char* s, float x, float y, float r, float g, float b, float a, bool fromBotton = true) override;
34
35 private:
36 int32_t FrontendMain() override;
37
38 static void displayFunc();
39 static void glutLoopFunc();
40 static void keyboardUpFunc(uint8_t key, int32_t x, int32_t y);
41 static void keyboardDownFunc(uint8_t key, int32_t x, int32_t y);
42 static void specialUpFunc(int32_t key, int32_t x, int32_t y);
43 static void specialDownFunc(int32_t key, int32_t x, int32_t y);
44 static void mouseMoveFunc(int32_t x, int32_t y);
45 static void mMouseWheelFunc(int32_t button, int32_t dir, int32_t x, int32_t y);
46 static void mouseFunc(int32_t button, int32_t state, int32_t x, int32_t y);
47 static void ResizeSceneWrapper(int32_t width, int32_t height);
48 static int32_t GetKey(int32_t key);
49 static void GetKey(int32_t keyin, int32_t& keyOut, int32_t& keyPressOut, bool special);
50
51 int32_t mWidth = INIT_WIDTH;
52 int32_t mHeight = INIT_HEIGHT;
53 bool mFullScreen = false;
54};
55} // namespace o2::gpu
56
57#endif
SurfaceTrackState state
StringRef key
~GPUDisplayFrontendGlut() override=default
void OpenGLPrint(const char *s, float x, float y, float r, float g, float b, float a, bool fromBotton=true) override
static constexpr int32_t INIT_WIDTH
static constexpr int32_t INIT_HEIGHT
GLint GLenum GLint x
Definition glcorearb.h:403
GLint GLsizei GLsizei height
Definition glcorearb.h:270
GLint GLsizei width
Definition glcorearb.h:270
GLboolean GLboolean GLboolean b
Definition glcorearb.h:1233
GLint y
Definition glcorearb.h:270
GLboolean GLboolean g
Definition glcorearb.h:1233
GLboolean enable
Definition glcorearb.h:3991
GLboolean r
Definition glcorearb.h:1233
GLboolean GLboolean GLboolean GLboolean a
Definition glcorearb.h:1233