GUIFactory.cpp
Go to the documentation of this file.
1 // ****************************************************************************
2 // This file is part of the Integrating Vision Toolkit (IVT).
3 //
4 // The IVT is maintained by the Karlsruhe Institute of Technology (KIT)
5 // (www.kit.edu) in cooperation with the company Keyetech (www.keyetech.de).
6 //
7 // Copyright (C) 2014 Karlsruhe Institute of Technology (KIT).
8 // All rights reserved.
9 //
10 // Redistribution and use in source and binary forms, with or without
11 // modification, are permitted provided that the following conditions are met:
12 //
13 // 1. Redistributions of source code must retain the above copyright
14 // notice, this list of conditions and the following disclaimer.
15 //
16 // 2. Redistributions in binary form must reproduce the above copyright
17 // notice, this list of conditions and the following disclaimer in the
18 // documentation and/or other materials provided with the distribution.
19 //
20 // 3. Neither the name of the KIT nor the names of its contributors may be
21 // used to endorse or promote products derived from this software
22 // without specific prior written permission.
23 //
24 // THIS SOFTWARE IS PROVIDED BY THE KIT AND CONTRIBUTORS “AS IS” AND ANY
25 // EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
26 // WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
27 // DISCLAIMED. IN NO EVENT SHALL THE KIT OR CONTRIBUTORS BE LIABLE FOR ANY
28 // DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
29 // (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
30 // LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
31 // ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
32 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
33 // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 // ****************************************************************************
35 // ****************************************************************************
36 // Filename: GUIFactory.cpp
37 // Author: Florian Hecht
38 // Date: 2008
39 // ****************************************************************************
40 
41 
42 // ****************************************************************************
43 // Includes
44 // ****************************************************************************
45 
46 #include "Image/ByteImage.h"
47 
48 #include <string.h>
49 
50 
51 
52 #ifdef USE_QTGUI
53 
55 #include "gui/Qt/QtMainWindow.h"
56 
58 {
59  return new CQtApplicationHandler(argc, argv);
60 }
61 
62 CMainWindowInterface *CreateMainWindow(int x, int y, int width, int height, const char *title)
63 {
64  return new CQtMainWindow(x, y, width, height, title);
65 }
66 
67 #include <qapplication.h>
68 #include <qfiledialog.h>
69 
70 #if QT_VERSION >= 0x040000
71 #define GET_ASCII toAscii
72 #else
73 #define GET_ASCII ascii
74 #endif
75 
76 static char app_name[] = "IVT_APPLICATION\0";
77 static int my_argc = 1;
78 static char *my_argv[2] = { app_name, NULL};
79 
80 // opens a file dialog and returns true if a filename was selected. The compelete path is returned in filename (the buffer has to be big enough)
81 bool FileDialog(bool save_dialog, const char **filter, int num_filter, const char *caption, char *filename, int max_length)
82 {
83  QApplication *pApp = NULL;
84  if (qApp == NULL)
85  {
86  pApp = new QApplication(my_argc, my_argv);
87  }
88 
89  char filter_str[1024];
90  char *fs = filter_str;
91  *fs = 0;
92 
93  for (int i = 0; i < num_filter; i++)
94  {
95  if (i == num_filter - 1)
96  {
97  sprintf(fs, "%s (%s)", filter[(2*i)], filter[(2*i) + 1]);
98  fs += strlen(filter[(2*i)]) + strlen(filter[(2*i) + 1]) + 3;
99  }
100  else
101  {
102  sprintf(fs, "%s (%s);;", filter[(2*i)], filter[(2*i) + 1]);
103  fs += strlen(filter[(2*i)]) + strlen(filter[(2*i) + 1]) + 5;
104  }
105  }
106  *fs++ = 0;
107 
108  if (save_dialog)
109  {
110  #if QT_VERSION >= 0x040000
111  QString s = QFileDialog::getSaveFileName(0, caption, NULL, filter_str);
112  #else
113  QString s = QFileDialog::getSaveFileName(QString(filename), filter_str, 0, "Save File Dialog", caption);
114  #endif
115 
116  if (s.length() > 0)
117  {
118  strncpy(filename, s.GET_ASCII(), max_length);
119 
120  if (pApp)
121  {
122  delete pApp;
123  pApp = NULL;
124  }
125 
126  return true;
127  }
128  }
129  else
130  {
131  #if QT_VERSION >= 0x040000
132  QString s = QFileDialog::getOpenFileName(0, caption, NULL, filter_str);
133  #else
134  QString s = QFileDialog::getOpenFileName(QString(filename), filter_str, 0, "Open File Dialog", caption);
135  #endif
136 
137  if (s.length() > 0)
138  {
139  strncpy(filename, s.GET_ASCII(), max_length);
140 
141  if (pApp)
142  {
143  delete pApp;
144  pApp = NULL;
145  }
146 
147  return true;
148  }
149  }
150 
151  if (pApp)
152  {
153  delete pApp;
154  pApp = NULL;
155  }
156 
157  return false;
158 }
159 
160 #include <qimage.h>
161 
162 // load an image from file. The supported filetypes depend on the plattform
163 bool LoadImageFromFile(const char *filename, CByteImage *pImage)
164 {
165  QApplication *pApp = NULL;
166  if (qApp == NULL)
167  {
168  int argc = 1;
169  char *argv[] = {app_name, NULL};
170 
171  pApp = new QApplication(argc, argv);
172  }
173 
174  QImage img(filename, 0);
175 
176  if (!img.isNull())
177  {
178  if (img.depth() != 8 && img.depth() != 24 && img.depth() != 32)
179  {
180  printf("error: LoadImageFromFile: image '%s' has an unsupported bit depth of %d bpp\n", filename, img.depth());
181  return false;
182  }
183 
184  int width = img.width();
185  int height = img.height();
186 
187  if (pImage->m_bOwnMemory)
188  delete [] pImage->pixels;
189 
190  pImage->width = width;
191  pImage->height = height;
192  pImage->bytesPerPixel = (img.depth() == 8 ? 1 : 3);
193  pImage->type = (img.depth() <= 8 ? CByteImage::eGrayScale : CByteImage::eRGB24);
194  pImage->pixels = new unsigned char[pImage->bytesPerPixel * width*height];
195  pImage->m_bOwnMemory = true;
196 
197  uchar *ptr = img.bits();
198  if (img.depth() == 32)
199  {
200  unsigned char *output = pImage->pixels;
201 
202  int size = width * height;
203  for (int i = 0; i < size; i++)
204  {
205  output[3*i ] = ptr[4*i + 2];
206  output[3*i + 1] = ptr[4*i + 1];
207  output[3*i + 2] = ptr[4*i ];
208  }
209  }
210  else
211  {
212  memcpy(pImage->pixels, ptr, pImage->bytesPerPixel * width*height);
213  }
214 
215  if (pApp)
216  {
217  delete pApp;
218  pApp = NULL;
219  }
220 
221  return true;
222  }
223 
224  if (pApp)
225  {
226  delete pApp;
227  pApp = NULL;
228  }
229 
230  return false;
231 }
232 
233 #else
234 
235 
236 #if defined(USE_GTKGUI) && !defined(USE_REMOTEGUI)
237 
239 #include "gui/GTK/GTKMainWindow.h"
240 
242 {
243  return new CGTKApplicationHandler(argc, argv);
244 }
245 
246 CMainWindowInterface *CreateMainWindow(int x, int y, int width, int height, const char *title)
247 {
248  return new CGTKMainWindow(x, y, width, height, title);
249 }
250 
251 // opens a file dialog and returns true if a filename was selected. The complete path is returned in filename (the buffer has to be big enough)
252 bool FileDialog(bool save_dialog, const char **filter, int num_filter, const char *caption, char *filename, int max_length)
253 {
254  // TODO: implement for GTK
255  GtkWidget *dialog;
256 
257  if (save_dialog)
258  {
259  dialog = gtk_file_chooser_dialog_new (caption,
260  NULL,
261  GTK_FILE_CHOOSER_ACTION_SAVE,
262  GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
263  GTK_STOCK_SAVE, GTK_RESPONSE_ACCEPT,
264  NULL);
265  }
266  else
267  {
268  dialog = gtk_file_chooser_dialog_new (caption,
269  NULL,
270  GTK_FILE_CHOOSER_ACTION_OPEN,
271  GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
272  GTK_STOCK_OPEN, GTK_RESPONSE_ACCEPT,
273  NULL);
274  }
275 
276  gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog), filename);
277 
278  for (int i = 0; i < num_filter; i++)
279  {
280  GtkFileFilter *f = gtk_file_filter_new();
281  gtk_file_filter_set_name(f, filter[2*i]);
282  gtk_file_filter_add_pattern(f, filter[2*i+1]);
283  gtk_file_chooser_add_filter(GTK_FILE_CHOOSER(dialog), f);
284  }
285 
286  if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_ACCEPT)
287  {
288  char *file;
289  file = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
290  strncpy(filename, file, max_length);
291  g_free (file);
292 
293  gtk_widget_destroy (dialog);
294 
295  return true;
296  }
297 
298  gtk_widget_destroy (dialog);
299 
300  return false;
301 }
302 
303 
304 // load an image from file. The supported filetypes depend on the plattform
305 bool LoadImageFromFile(const char *filename, CByteImage *pImage)
306 {
307  bool success = false;
308 
309  GdkPixbuf *pixbuf = gdk_pixbuf_new_from_file(filename, NULL);
310  if (pixbuf)
311  {
312  int channels = gdk_pixbuf_get_n_channels(pixbuf);
313  int bits_per_sample = gdk_pixbuf_get_bits_per_sample(pixbuf);
314  unsigned char *pixels = gdk_pixbuf_get_pixels(pixbuf);
315  int width = gdk_pixbuf_get_width(pixbuf);
316  int height = gdk_pixbuf_get_height(pixbuf);
317  int rowstride = gdk_pixbuf_get_rowstride(pixbuf);
318 
319  if (bits_per_sample == 8 && (channels == 1 || channels == 3 || channels == 4))
320  {
321  if (pImage->m_bOwnMemory)
322  delete [] pImage->pixels;
323 
324  pImage->width = width;
325  pImage->height = height;
326  pImage->bytesPerPixel = channels;
327  pImage->type = (channels == 3 ? CByteImage::eGrayScale : CByteImage::eRGB24);
328  pImage->pixels = new unsigned char[pImage->bytesPerPixel * width * height];
329  pImage->m_bOwnMemory = true;
330 
331  if (channels == 1)
332  {
333  for (int y = 0; y < height; y++)
334  {
335  memcpy(&pImage->pixels[y*width], pixels, width);
336  pixels += rowstride;
337  }
338  }
339  else
340  {
341  if (channels == 3)
342  {
343  for (int y = 0; y < height; y++)
344  {
345  memcpy(&pImage->pixels[3*y*width], pixels, 3*width);
346  pixels += rowstride;
347  }
348  }
349  else
350  {
351  // discard the alpha channel
352  for (int y = 0; y < height; y++)
353  {
354  for (int x = 0; x < width; x++)
355  {
356  pImage->pixels[3*(y*width + x)] = pixels[4*x];
357  pImage->pixels[3*(y*width + x)+1] = pixels[4*x+1];
358  pImage->pixels[3*(y*width + x)+2] = pixels[4*x+2];
359  }
360 
361  pixels += rowstride;
362  }
363  }
364  }
365 
366  success = true;
367  }
368 
369  }
370 
371  return success;
372 }
373 
374 #else
375 
376 
377 #if defined(WIN32) && !defined(USE_REMOTEGUI)
378 
381 
383 {
384  return new CWin32ApplicationHandler();
385 }
386 
387 CMainWindowInterface *CreateMainWindow(int x, int y, int width, int height, const char *title)
388 {
389  return new CWin32MainWindow(x, y, width, height, title);
390 }
391 
392 #include <windows.h>
393 
394 // opens a file dialog and returns true if a filename was selected. The compelete path is returned in filename (the buffer has to be big enough)
395 bool FileDialog(bool save_dialog, const char **filter, int num_filter, const char *caption, char *filename, int max_length)
396 {
397  char filter_str[1024];
398  char *fs = filter_str;
399  *fs = 0;
400 
401  for (int i = 0; i < num_filter; i++)
402  {
403  sprintf(fs, "%s", filter[(2*i)]);
404  fs += strlen(filter[(2*i)]) + 1;
405 
406  sprintf(fs, "%s", filter[(2*i) + 1]);
407  fs += strlen(filter[(2*i) + 1]) + 1;
408  }
409  *fs++ = 0;
410 
411  OPENFILENAME ofn;
412  memset(&ofn, 0, sizeof(OPENFILENAME));
413 
414  ofn.lStructSize = sizeof(OPENFILENAME);
415  ofn.hwndOwner = NULL;
416  ofn.hInstance = NULL;
417  ofn.lpstrFilter = filter_str;
418  ofn.lpstrCustomFilter = NULL;
419  ofn.nMaxCustFilter = 0;
420  ofn.nFilterIndex = 1;
421  ofn.lpstrFile = filename;
422  ofn.nMaxFile = max_length;
423  ofn.lpstrFileTitle = NULL;
424  ofn.nMaxFileTitle = 0;
425  ofn.lpstrInitialDir = NULL;
426  ofn.lpstrTitle = caption;
427  ofn.Flags = 0; //OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST;
428  ofn.nFileOffset = 0;
429  ofn.nFileExtension = 0;
430  ofn.lpstrDefExt = NULL;
431  ofn.lCustData = 0;
432  ofn.lpfnHook = NULL;
433  ofn.lpTemplateName = NULL;
434 
435  if (save_dialog)
436  {
437  if (GetSaveFileName(&ofn))
438  {
439  return true;
440  }
441  }
442  else
443  {
444  if (GetOpenFileName(&ofn))
445  {
446  return true;
447  }
448  }
449 
450  return false;
451 }
452 
453 #include <olectl.h>
454 
455 // load an image from file. The supported filetypes depend on the plattform
456 bool LoadImageFromFile(const char *filename, CByteImage *pImage)
457 {
458  HDC hdcTemp; // The DC To Hold Our Bitmap
459  HBITMAP hbmpTemp; // Holds The Bitmap Temporarily
460  IPicture *pPicture; // IPicture Interface
461  OLECHAR wszPath[MAX_PATH+1]; // Full Path To Picture (WCHAR)
462  long lWidth; // Width In Logical Units
463  long lHeight; // Height In Logical Units
464  long lWidthPixels; // Width In Pixels
465  long lHeightPixels; // Height In Pixels
466 
467  MultiByteToWideChar(CP_ACP, 0, filename, -1, wszPath, MAX_PATH); // Convert From ASCII To Unicode
468  HRESULT hr = OleLoadPicturePath(wszPath, 0, 0, 0, IID_IPicture, (void**)&pPicture);
469 
470  if(FAILED(hr)) // If Loading Failed
471  return false; // Return False
472 
473  hdcTemp = CreateCompatibleDC(GetDC(0)); // Create The Windows Compatible Device Context
474  if(!hdcTemp) // Did Creation Fail?
475  {
476  pPicture->Release(); // Decrements IPicture Reference Count
477  return false; // Return False (Failure)
478  }
479 
480  pPicture->get_Width(&lWidth); // Get IPicture Width (Convert To Pixels)
481  lWidthPixels = MulDiv(lWidth, GetDeviceCaps(hdcTemp, LOGPIXELSX), 2540);
482  pPicture->get_Height(&lHeight); // Get IPicture Height (Convert To Pixels)
483  lHeightPixels = MulDiv(lHeight, GetDeviceCaps(hdcTemp, LOGPIXELSY), 2540);
484 
485  // Create A Temporary Bitmap
486  BITMAPINFO bi = {0}; // The Type Of Bitmap We Request
487  DWORD *pBits = 0; // Pointer To The Bitmap Bits
488 
489  bi.bmiHeader.biSize = sizeof(BITMAPINFOHEADER); // Set Structure Size
490  bi.bmiHeader.biBitCount = 32; // 32 Bit
491  bi.bmiHeader.biWidth = lWidthPixels; // Power Of Two Width
492  bi.bmiHeader.biHeight = lHeightPixels; // Make Image Top Up (Positive Y-Axis)
493  bi.bmiHeader.biCompression = BI_RGB; // RGB Encoding
494  bi.bmiHeader.biPlanes = 1; // 1 Bitplane
495 
496  // Creating A Bitmap This Way Allows Us To Specify Color Depth And Gives Us Imediate Access To The Bits
497  hbmpTemp = CreateDIBSection(hdcTemp, &bi, DIB_RGB_COLORS, (void**)&pBits, 0, 0);
498 
499  if(!hbmpTemp) // Did Creation Fail?
500  {
501  DeleteDC(hdcTemp); // Delete The Device Context
502  pPicture->Release(); // Decrements IPicture Reference Count
503  return false; // Return False (Failure)
504  }
505 
506  SelectObject(hdcTemp, hbmpTemp); // Select Handle To Our Temp DC And Our Temp Bitmap Object
507 
508  // Render The IPicture On To The Bitmap
509  pPicture->Render(hdcTemp, 0, 0, lWidthPixels, lHeightPixels, 0, 0, lWidth, lHeight, 0);
510 
511 
512  if (pImage->m_bOwnMemory)
513  delete [] pImage->pixels;
514 
515  pImage->width = lWidthPixels;
516  pImage->height = lHeightPixels;
517  pImage->bytesPerPixel = 3;
518  pImage->type = CByteImage::eRGB24;
519  pImage->pixels = new unsigned char[pImage->bytesPerPixel * lWidthPixels*lHeightPixels];
520  pImage->m_bOwnMemory = true;
521 
522  unsigned char *output = pImage->pixels;
523 
524  // Convert From BGR To RGB Format And Add An Alpha Value Of 255
525  for(long i = 0; i < lWidthPixels * lHeightPixels; i++) // Loop Through All Of The Pixels
526  {
527  BYTE* pPixel = (BYTE*)(&pBits[i]); // Grab The Current Pixel
528  output[3*i] = pPixel[2]; // Store 1st Color In Temp Variable (Blue)
529  output[3*i + 1] = pPixel[1]; // Move Red Value To Correct Position (1st)
530  output[3*i + 2] = pPixel[0]; // Move Temp Value To Correct Blue Position (3rd)
531  }
532 
533  DeleteObject(hbmpTemp); // Delete The Object
534  DeleteDC(hdcTemp); // Delete The Device Context
535 
536  pPicture->Release(); // Decrements IPicture Reference Count
537 
538  return true;
539 }
540 
541 #else
542 
543 
544 #ifdef USE_COCOAGUI
545 
548 
550 {
551  return new CCocoaApplicationHandler();
552 }
553 
554 CMainWindowInterface *CreateMainWindow(int x, int y, int width, int height, const char *title)
555 {
556  return new CCocoaMainWindow(x, y, width, height, title);
557 }
558 
559 // these functions are defined in GUIFactory.m
560 extern "C"
561 {
562  bool CocoaFileDialog(bool save_dialog, const char **filter, int num_filter, const char *caption, char *filename, int max_length);
563  bool CocoaLoadImage(const char *filename, unsigned char **ptr, int *width, int *height, int *type);
564  void CocoaFreeImageMem(unsigned char *ptr);
565 }
566 
567 // opens a file dialog and returns true if a filename was selected. The compelete path is returned in filename (the buffer has to be big enough)
568 bool FileDialog(bool save_dialog, const char **filter, int num_filter, const char *caption, char *filename, int max_length)
569 {
570  char buf[64];
571 
572  char **cocoa_filters = NULL;
573  if (filter != NULL) {
574  cocoa_filters = new char*[num_filter];
575  for (int i = 0; i < num_filter; i++)
576  {
577  sscanf(filter[2*i + 1], "*.%s", buf);
578  cocoa_filters[i] = new char[strlen(buf) + 1];
579  strcpy(cocoa_filters[i], buf);
580  }
581  }
582 
583  bool result = CocoaFileDialog(save_dialog, (const char**)cocoa_filters, num_filter, caption, filename, max_length);
584 
585  if (cocoa_filters != NULL)
586  {
587  for (int i = 0; i < num_filter; i++)
588  {
589  delete [] cocoa_filters[i];
590  }
591  delete [] cocoa_filters;
592  }
593 
594  return result;
595 }
596 
597 // load an image from file. The supported filetypes depend on the plattform
598 bool LoadImageFromFile(const char *filename, CByteImage *pImage)
599 {
600  unsigned char *ptr = NULL;
601  int width = -1;
602  int height = -1;
603  int type = -1;
604 
605  if (CocoaLoadImage(filename, &ptr, &width, &height, &type))
606  {
607  if (pImage->m_bOwnMemory)
608  delete [] pImage->pixels;
609 
610  pImage->width = width;
611  pImage->height = height;
612  pImage->bytesPerPixel = (type == 1 ? 1 : 3);
613  pImage->type = (type == 1 ? CByteImage::eGrayScale : CByteImage::eRGB24);
614  pImage->pixels = new unsigned char[pImage->bytesPerPixel * width * height];
615  pImage->m_bOwnMemory = true;
616 
617  memcpy(pImage->pixels, ptr, pImage->bytesPerPixel * width * height);
618 
619  CocoaFreeImageMem(ptr);
620 
621  return true;
622  }
623 
624  return false;
625 }
626 
627 #else
628 
629 
630 #ifdef USE_REMOTEGUI
631 
632 #include "gui/Remote/RemoteApplicationHandler.h"
633 #include "gui/Remote/RemoteMainWindow.h"
634 
636 {
637  return new CRemoteApplicationHandler(argc, argv);
638 }
639 
640 CMainWindowInterface *CreateMainWindow(int x, int y, int width, int height, const char *title)
641 {
642  CRemoteApplicationHandler *app_handler = CRemoteApplicationHandler::GetApplicationHandler();
643 
644  if (!app_handler)
645  return NULL;
646 
647  return app_handler->CreateMainWindow(x, y, width, height, title);
648 }
649 
650 // opens a file dialog and returns true if a filename was selected. The compelete path is returned in filename (the buffer has to be big enough)
651 bool FileDialog(bool save_dialog, const char **filter, int num_filter, const char *caption, char *filename, int max_length)
652 {
653  // not available for the remote gui system
654  return false;
655 }
656 
657 // load an image from file. The supported filetypes depend on the plattform
658 bool LoadImageFromFile(const char *filename, CByteImage *pImage)
659 {
660  // not available for the remote gui system
661  return false;
662 }
663 
664 #endif /* ifdef USE_REMOTEGUI */
665 
666 
667 #endif /* ifdef USE_COCOAGUI */
668 
669 
670 #endif /* ifdef WIN32 */
671 
672 
673 #endif /* ifdef USE_GTKGUI */
674 
675 
676 #endif /* ifdef USE_QTGUI */
677 
678 
679 
static char * my_argv[2]
const char * app_name
int width
The width of the image in pixels.
Definition: ByteImage.h:257
CMainWindowInterface * CreateMainWindow(int x, int y, int width, int height, const char *title)
Data structure for the representation of 8-bit grayscale images and 24-bit RGB (or HSV) color images ...
Definition: ByteImage.h:80
GLdouble s
Definition: glext.h:3211
bool m_bOwnMemory
Flag signaling if memory is to be freed or not.
Definition: ByteImage.h:301
GLuint GLuint GLsizei GLenum type
Definition: glext.h:3121
unsigned char * pixels
The pointer to the the pixels.
Definition: ByteImage.h:283
GLenum GLint x
Definition: glext.h:3125
GLint GLvoid * img
Definition: glext.h:3254
bool LoadImageFromFile(const char *filename, CByteImage *pImage)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
Definition: glext.h:3154
bool FileDialog(bool save_dialog, const char **filter, int num_filter, const char *caption, char *filename, int max_length)
int height
The height of the image in pixels.
Definition: ByteImage.h:264
Interface for the creation of GUIs with the GUI toolkit of the IVT.
int bytesPerPixel
The number of bytes used for encoding one pixel.
Definition: ByteImage.h:273
GLenum GLsizei width
Definition: glext.h:3122
GLenum GLsizei GLsizei height
Definition: glext.h:3132
GLenum filter
Definition: glext.h:4208
ImageType type
The type of the image.
Definition: ByteImage.h:292
GLsizeiptr size
Definition: glext.h:3388
GLenum GLint GLint y
Definition: glext.h:3125
CApplicationHandlerInterface * CreateApplicationHandler(int argc=0, char **argv=0)
static int my_argc


asr_ivt
Author(s): Allgeyer Tobias, Hutmacher Robin, Kleinert Daniel, Meißner Pascal, Scholz Jonas, Stöckle Patrick
autogenerated on Mon Dec 2 2019 03:47:28