app.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. /* San Angeles Observation OpenGL ES version example
  2. * Copyright 2004-2005 Jetro Lauha
  3. * All rights reserved.
  4. * Web: http://iki.fi/jetro/
  5. *
  6. * This source is free software; you can redistribute it and/or
  7. * modify it under the terms of EITHER:
  8. * (1) The GNU Lesser General Public License as published by the Free
  9. * Software Foundation; either version 2.1 of the License, or (at
  10. * your option) any later version. The text of the GNU Lesser
  11. * General Public License is included with this source in the
  12. * file LICENSE-LGPL.txt.
  13. * (2) The BSD-style license that is included with this source in
  14. * the file LICENSE-BSD.txt.
  15. *
  16. * This source is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the files
  19. * LICENSE-LGPL.txt and LICENSE-BSD.txt for more details.
  20. *
  21. * $Id: app.h,v 1.14 2005/02/06 21:13:54 tonic Exp $
  22. * $Revision: 1.14 $
  23. */
  24. #ifndef APP_H_INCLUDED
  25. #define APP_H_INCLUDED
  26. #ifdef __cplusplus
  27. extern "C" {
  28. #endif
  29. #define WINDOW_DEFAULT_WIDTH 640
  30. #define WINDOW_DEFAULT_HEIGHT 480
  31. #define WINDOW_BPP 16
  32. // The simple framework expects the application code to define these functions.
  33. extern void appInit();
  34. extern void appDeinit();
  35. extern void appRender(long tick, int width, int height);
  36. /* Value is non-zero when application is alive, and 0 when it is closing.
  37. * Defined by the application framework.
  38. */
  39. extern int gAppAlive;
  40. #ifdef __cplusplus
  41. }
  42. #endif
  43. #endif // !APP_H_INCLUDED