EAGLView.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. /*
  2. Copyright (C) 2009-2011 id Software LLC, a ZeniMax Media company.
  3. Copyright (C) 2009 Id Software, Inc.
  4. This program is free software; you can redistribute it and/or
  5. modify it under the terms of the GNU General Public License
  6. as published by the Free Software Foundation; either version 2
  7. of the License, or (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program; if not, write to the Free Software
  14. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
  15. */
  16. #import <UIKit/UIKit.h>
  17. #import <OpenGLES/EAGL.h>
  18. #import <OpenGLES/ES1/gl.h>
  19. #import <OpenGLES/ES1/glext.h>
  20. /*
  21. This class wraps the CAEAGLLayer from CoreAnimation into a convenient UIView subclass.
  22. The view content is basically an EAGL surface you render your OpenGL scene into.
  23. Note that setting the view non-opaque will only work if the EAGL surface has an alpha channel.
  24. */
  25. @interface EAGLView : UIView <UITextFieldDelegate> {
  26. @public
  27. UITextField *textField;
  28. GLuint mViewRenderbuffer;
  29. GLuint mViewFramebuffer;
  30. GLuint mDepthRenderbuffer;
  31. @private
  32. /* The pixel dimensions of the backbuffer */
  33. GLint backingWidth;
  34. GLint backingHeight;
  35. }
  36. @end