1 //
2 // Copyright 2016 Pixar
3 //
4 // Licensed under the Apache License, Version 2.0 (the "Apache License")
5 // with the following modification; you may not use this file except in
6 // compliance with the Apache License and the following modification to it:
7 // Section 6. Trademarks. is deleted and replaced with:
8 //
9 // 6. Trademarks. This License does not grant permission to use the trade
10 //    names, trademarks, service marks, or product names of the Licensor
11 //    and its affiliates, except as required to comply with Section 4(c) of
12 //    the License and to reproduce the content of the NOTICE file.
13 //
14 // You may obtain a copy of the Apache License at
15 //
16 //     http://www.apache.org/licenses/LICENSE-2.0
17 //
18 // Unless required by applicable law or agreed to in writing, software
19 // distributed under the Apache License with the above modification is
20 // distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
21 // KIND, either express or implied. See the Apache License for the specific
22 // language governing permissions and limitations under the Apache License.
23 //
24 
25 #include "pxr/imaging/garch/glDebugWindow.h"
26 #include "pxr/imaging/garch/glPlatformDebugContext.h"
27 #include "pxr/base/arch/defines.h"
28 
29 #if defined(ARCH_OS_LINUX) || defined(ARCH_OS_FREEBSD)
30 #include "pxr/imaging/garch/glPlatformDebugWindowGLX.h"
31 #elif defined(ARCH_OS_DARWIN)
32 #include "pxr/imaging/garch/glPlatformDebugWindowDarwin.h"
33 #elif defined(ARCH_OS_WINDOWS)
34 #include "pxr/imaging/garch/glPlatformDebugWindowWindows.h"
35 #endif
36 
37 PXR_NAMESPACE_OPEN_SCOPE
38 
GarchGLDebugWindow(const char * title,int width,int height)39 GarchGLDebugWindow::GarchGLDebugWindow(const char *title, int width, int height)
40     : _title(title)
41     , _width(width)
42     , _height(height)
43 {
44     _private = new Garch_GLPlatformDebugWindow(this);
45 }
46 
~GarchGLDebugWindow()47 GarchGLDebugWindow::~GarchGLDebugWindow()
48 {
49     delete _private;
50 }
51 
52 void
Init()53 GarchGLDebugWindow::Init()
54 {
55     _private->Init(_title.c_str(), _width, _height);
56 }
57 
58 void
Run()59 GarchGLDebugWindow::Run()
60 {
61     _private->Run();
62 }
63 
64 void
ExitApp()65 GarchGLDebugWindow::ExitApp()
66 {
67     _private->ExitApp();
68 }
69 
70 /* virtual */
71 void
OnInitializeGL()72 GarchGLDebugWindow::OnInitializeGL()
73 {
74 }
75 
76 /* virtual */
77 void
OnUninitializeGL()78 GarchGLDebugWindow::OnUninitializeGL()
79 {
80 }
81 
82 /* virtual */
83 void
OnResize(int w,int h)84 GarchGLDebugWindow::OnResize(int w, int h)
85 {
86     _width = w;
87     _height = h;
88 }
89 
90 /* virtual */
91 void
OnIdle()92 GarchGLDebugWindow::OnIdle()
93 {
94 }
95 
96 /* virtual */
97 void
OnPaintGL()98 GarchGLDebugWindow::OnPaintGL()
99 {
100 }
101 
102 /* virtual */
103 void
OnKeyRelease(int key)104 GarchGLDebugWindow::OnKeyRelease(int key)
105 {
106 }
107 
108 /* virtual */
109 void
OnMousePress(int button,int x,int y,int modKeys)110 GarchGLDebugWindow::OnMousePress(int button, int x, int y, int modKeys)
111 {
112 }
113 
114 /* virtual */
115 void
OnMouseRelease(int button,int x,int y,int modKeys)116 GarchGLDebugWindow::OnMouseRelease(int button, int x, int y, int modKeys)
117 {
118 }
119 
120 /* virtual */
121 void
OnMouseMove(int x,int y,int modKeys)122 GarchGLDebugWindow::OnMouseMove(int x, int y, int modKeys)
123 {
124 }
125 
126 PXR_NAMESPACE_CLOSE_SCOPE
127 
128