Loading...
Searching...
No Matches
glDebugWindow.h
1//
2// Copyright 2016 Pixar
3//
4// Licensed under the terms set forth in the LICENSE.txt file available at
5// https://openusd.org/license.
6//
7#ifndef PXR_IMAGING_GARCH_GL_DEBUG_WINDOW_H
8#define PXR_IMAGING_GARCH_GL_DEBUG_WINDOW_H
9
10#include "pxr/pxr.h"
11#include "pxr/imaging/garch/api.h"
12#include <string>
13
14PXR_NAMESPACE_OPEN_SCOPE
15
16
17class Garch_GLPlatformDebugWindow;
18
24public:
25 GARCH_API
26 GarchGLDebugWindow(const char *title, int width, int height);
27 GARCH_API
28 virtual ~GarchGLDebugWindow();
29
30 GARCH_API
31 void Init();
32 GARCH_API
33 void Run();
34 GARCH_API
35 void ExitApp();
36
37 int GetWidth() const { return _width; }
38 int GetHeight() const { return _height; }
39
40 enum Buttons {
41 MyButton1 = 0,
42 MyButton2 = 1,
43 MyButton3 = 2
44 };
45 enum ModifierKeys {
46 NoModifiers = 0,
47 Shift = 1,
48 Alt = 2,
49 Ctrl = 4
50 };
51
52 GARCH_API
53 virtual void OnInitializeGL();
54 GARCH_API
55 virtual void OnUninitializeGL();
56 GARCH_API
57 virtual void OnResize(int w, int h);
58 GARCH_API
59 virtual void OnIdle();
60 GARCH_API
61 virtual void OnPaintGL();
62 GARCH_API
63 virtual void OnKeyRelease(int key);
64 GARCH_API
65 virtual void OnMousePress(int button, int x, int y, int modKeys);
66 GARCH_API
67 virtual void OnMouseRelease(int button, int x, int y, int modKeys);
68 GARCH_API
69 virtual void OnMouseMove(int x, int y, int modKeys);
70
71private:
72 Garch_GLPlatformDebugWindow *_private;
73 std::string _title;
74 int _width, _height;
75};
76
77
78PXR_NAMESPACE_CLOSE_SCOPE
79
80#endif // PXR_IMAGING_GARCH_GL_DEBUG_WINDOW_H
Platform specific minimum GL widget for unit tests.
Definition: glDebugWindow.h:23