Blender  V2.93
util_view.cpp
Go to the documentation of this file.
1 /*
2  * Copyright 2011-2013 Blender Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #include <stdio.h>
18 #include <stdlib.h>
19 
20 #include "util/util_opengl.h"
21 #include "util/util_string.h"
22 #include "util/util_time.h"
23 #include "util/util_version.h"
24 #include "util/util_view.h"
25 
26 #ifdef __APPLE__
27 # include <GLUT/glut.h>
28 #else
29 # include <GL/glut.h>
30 #endif
31 
33 
34 /* structs */
35 
36 struct View {
43 
45  bool redraw;
46 
47  int mouseX, mouseY;
49 
50  int width, height;
51 } V;
52 
53 /* public */
54 
55 static void view_display_text(int x, int y, const char *text)
56 {
57  const char *c;
58 
59  glRasterPos3f(x, y, 0);
60 
61  for (c = text; *c != '\0'; c++)
62  glutBitmapCharacter(GLUT_BITMAP_HELVETICA_10, *c);
63 }
64 
65 void view_display_info(const char *info)
66 {
67  const int height = 20;
68 
69  glEnable(GL_BLEND);
70  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
71  glColor4f(0.1f, 0.1f, 0.1f, 0.8f);
72  glRectf(0.0f, V.height - height, V.width, V.height);
73  glDisable(GL_BLEND);
74 
75  glColor3f(0.5f, 0.5f, 0.5f);
76 
77  view_display_text(10, 7 + V.height - height, info);
78 
79  glColor3f(1.0f, 1.0f, 1.0f);
80 }
81 
83 {
84  const int w = (int)((float)V.width / 1.15f);
85  const int h = (int)((float)V.height / 1.15f);
86 
87  const int x1 = (V.width - w) / 2;
88  const int x2 = x1 + w;
89 
90  const int y1 = (V.height - h) / 2;
91  const int y2 = y1 + h;
92 
93  glEnable(GL_BLEND);
94  glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
95  glColor4f(0.5f, 0.5f, 0.5f, 0.8f);
96  glRectf(x1, y1, x2, y2);
97  glDisable(GL_BLEND);
98 
99  glColor3f(0.8f, 0.8f, 0.8f);
100 
101  string info = string("Cycles Renderer ") + CYCLES_VERSION_STRING;
102 
103  view_display_text(x1 + 20, y2 - 20, info.c_str());
104  view_display_text(x1 + 20, y2 - 40, "(C) 2011-2016 Blender Foundation");
105  view_display_text(x1 + 20, y2 - 80, "Controls:");
106  view_display_text(x1 + 20, y2 - 100, "h: Info/Help");
107  view_display_text(x1 + 20, y2 - 120, "r: Reset");
108  view_display_text(x1 + 20, y2 - 140, "p: Pause");
109  view_display_text(x1 + 20, y2 - 160, "esc: Cancel");
110  view_display_text(x1 + 20, y2 - 180, "q: Quit program");
111 
112  view_display_text(x1 + 20, y2 - 210, "i: Interactive mode");
113  view_display_text(x1 + 20, y2 - 230, "Left mouse: Move camera");
114  view_display_text(x1 + 20, y2 - 250, "Right mouse: Rotate camera");
115  view_display_text(x1 + 20, y2 - 270, "W/A/S/D: Move camera");
116  view_display_text(x1 + 20, y2 - 290, "0/1/2/3: Set max bounces");
117 
118  glColor3f(1.0f, 1.0f, 1.0f);
119 }
120 
121 static void view_display()
122 {
123  if (V.first_display) {
124  if (V.initf)
125  V.initf();
126  if (V.exitf)
127  atexit(V.exitf);
128 
129  V.first_display = false;
130  }
131 
132  glClearColor(0.05f, 0.05f, 0.05f, 0.0f);
133  glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
134 
135  glMatrixMode(GL_PROJECTION);
136  glLoadIdentity();
137  glOrtho(0, V.width, 0, V.height, -1, 1);
138 
139  glMatrixMode(GL_MODELVIEW);
140  glLoadIdentity();
141 
142  glRasterPos3f(0, 0, 0);
143 
144  if (V.display)
145  V.display();
146 
147  glutSwapBuffers();
148 }
149 
150 static void view_reshape(int width, int height)
151 {
152  if (width <= 0 || height <= 0)
153  return;
154 
155  V.width = width;
156  V.height = height;
157 
158  glViewport(0, 0, width, height);
159 
160  glMatrixMode(GL_PROJECTION);
161  glLoadIdentity();
162 
163  glMatrixMode(GL_MODELVIEW);
164  glLoadIdentity();
165 
166  if (V.resize)
167  V.resize(width, height);
168 }
169 
170 static void view_keyboard(unsigned char key, int x, int y)
171 {
172  if (V.keyboard)
173  V.keyboard(key);
174 
175  if (key == 'm')
176  printf("mouse %d %d\n", x, y);
177  if (key == 'q') {
178  if (V.exitf)
179  V.exitf();
180  exit(0);
181  }
182 }
183 
184 static void view_mouse(int button, int state, int x, int y)
185 {
186  if (button == 0) {
187  if (state == GLUT_DOWN) {
188  V.mouseX = x;
189  V.mouseY = y;
190  V.mouseBut0 = 1;
191  }
192  else if (state == GLUT_UP) {
193  V.mouseBut0 = 0;
194  }
195  }
196  else if (button == 2) {
197  if (state == GLUT_DOWN) {
198  V.mouseX = x;
199  V.mouseY = y;
200  V.mouseBut2 = 1;
201  }
202  else if (state == GLUT_UP) {
203  V.mouseBut2 = 0;
204  }
205  }
206 }
207 
208 static void view_motion(int x, int y)
209 {
210  const int but = V.mouseBut0 ? 0 : 2;
211  const int distX = x - V.mouseX;
212  const int distY = y - V.mouseY;
213 
214  if (V.motion)
215  V.motion(distX, distY, but);
216 
217  V.mouseX = x;
218  V.mouseY = y;
219 }
220 
221 static void view_idle()
222 {
223  if (V.redraw) {
224  V.redraw = false;
225  glutPostRedisplay();
226  }
227 
228  time_sleep(0.1);
229 }
230 
231 void view_main_loop(const char *title,
232  int width,
233  int height,
235  ViewExitFunc exitf,
236  ViewResizeFunc resize,
237  ViewDisplayFunc display,
238  ViewKeyboardFunc keyboard,
239  ViewMotionFunc motion)
240 {
241  const char *name = "app";
242  char *argv = (char *)name;
243  int argc = 1;
244 
245  memset(&V, 0, sizeof(V));
246  V.width = width;
247  V.height = height;
248  V.first_display = true;
249  V.redraw = false;
250  V.initf = initf;
251  V.exitf = exitf;
252  V.resize = resize;
253  V.display = display;
254  V.keyboard = keyboard;
255  V.motion = motion;
256 
257  glutInit(&argc, &argv);
258  glutInitWindowSize(width, height);
259  glutInitWindowPosition(0, 0);
260  glutInitDisplayMode(GLUT_RGB | GLUT_DOUBLE | GLUT_DEPTH);
261  glutCreateWindow(title);
262 
263  glewInit();
264 
266 
267  glutDisplayFunc(view_display);
268  glutIdleFunc(view_idle);
269  glutReshapeFunc(view_reshape);
270  glutKeyboardFunc(view_keyboard);
271  glutMouseFunc(view_mouse);
272  glutMotionFunc(view_motion);
273 
274  glutMainLoop();
275 }
276 
278 {
279  V.redraw = true;
280 }
281 
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble y1
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
#define glEnable
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble x2
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
#define glDisable
SIMD_FORCE_INLINE const btScalar & w() const
Return the w value.
Definition: btQuadWord.h:119
#define glRasterPos3f
#define glColor3f
Definition: gl-deprecated.h:56
#define glColor4f
Definition: gl-deprecated.h:88
#define glOrtho
#define glMatrixMode
#define glRectf
#define glLoadIdentity
#define CCL_NAMESPACE_END
static ulong state[N]
static int initf
static unsigned c
Definition: RandGen.cpp:97
ViewKeyboardFunc keyboard
Definition: util_view.cpp:41
ViewInitFunc initf
Definition: util_view.cpp:37
int mouseBut0
Definition: util_view.cpp:48
ViewMotionFunc motion
Definition: util_view.cpp:42
bool first_display
Definition: util_view.cpp:44
int height
Definition: util_view.cpp:50
int mouseY
Definition: util_view.cpp:47
int mouseBut2
Definition: util_view.cpp:48
bool redraw
Definition: util_view.cpp:45
ViewResizeFunc resize
Definition: util_view.cpp:39
ViewDisplayFunc display
Definition: util_view.cpp:40
ViewExitFunc exitf
Definition: util_view.cpp:38
int width
Definition: util_view.cpp:50
int mouseX
Definition: util_view.cpp:47
void time_sleep(double t)
Definition: util_time.cpp:57
#define CYCLES_VERSION_STRING
Definition: util_version.h:30
static void view_mouse(int button, int state, int x, int y)
Definition: util_view.cpp:184
CCL_NAMESPACE_BEGIN struct View V
static void view_motion(int x, int y)
Definition: util_view.cpp:208
void view_main_loop(const char *title, int width, int height, ViewInitFunc initf, ViewExitFunc exitf, ViewResizeFunc resize, ViewDisplayFunc display, ViewKeyboardFunc keyboard, ViewMotionFunc motion)
Definition: util_view.cpp:231
static void view_display_text(int x, int y, const char *text)
Definition: util_view.cpp:55
void view_display_info(const char *info)
Definition: util_view.cpp:65
static void view_keyboard(unsigned char key, int x, int y)
Definition: util_view.cpp:170
static void view_idle()
Definition: util_view.cpp:221
static void view_display()
Definition: util_view.cpp:121
void view_redraw()
Definition: util_view.cpp:277
static void view_reshape(int width, int height)
Definition: util_view.cpp:150
void view_display_help()
Definition: util_view.cpp:82
void(* ViewExitFunc)()
Definition: util_view.h:26
CCL_NAMESPACE_BEGIN typedef void(* ViewInitFunc)()
Definition: util_view.h:25
void(* ViewDisplayFunc)()
Definition: util_view.h:28
void(* ViewMotionFunc)(int x, int y, int button)
Definition: util_view.h:30
void(* ViewKeyboardFunc)(unsigned char key)
Definition: util_view.h:29
void(* ViewResizeFunc)(int width, int height)
Definition: util_view.h:27