Gnash  0.8.10
fb_glue_gles1.h
Go to the documentation of this file.
00001 // 
00002 //   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
00003 //              Free Software Foundation, Inc.
00004 // 
00005 // This program is free software; you can redistribute it and/or modify
00006 // it under the terms of the GNU General Public License as published by
00007 // the Free Software Foundation; either version 3 of the License, or
00008 // (at your option) any later version.
00009 // 
00010 // This program is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 // GNU General Public License for more details.
00014 // 
00015 // You should have received a copy of the GNU General Public License
00016 // along with this program; if not, write to the Free Software
00017 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00018 
00019 #ifndef FB_GLUE_GLES1_H
00020 #define FB_GLUE_GLES1_H
00021 
00022 #ifdef HAVE_CONFIG_H
00023 #include "gnashconfig.h"
00024 #endif
00025 
00026 // gles-1.0c for Linux
00027 #ifdef HAVE_GLES1_GL_H
00028 # include <GLES/gl.h>
00029 # endif
00030 #ifdef HAVE_GLES1_EGL_H
00031 #include <GLES/egl.h>
00032 #endif
00033 #if 0
00034 // Mali Developer Tools for ARM 1.x
00035 #ifdef HAVE_EGL_EGL_H
00036 # include <EGL/egl.h>
00037 # include <EGL/eglext.h>
00038 #endif
00039 // Mali Developer Tools for ARM 2.x and Android 2.1
00040 #ifdef HAVE_GLES2_GL2_H
00041 # include <GLES2/gl2.h>
00042 # include <GLES2/gl2ext.h>
00043 #endif
00044 #endif
00045 
00046 #include <boost/scoped_ptr.hpp>
00047 
00048 #include "fbsup.h"
00049 
00050 namespace gnash {
00051 
00052 namespace gui {
00053 
00054 class render_handler;
00055 
00056 class FBgles1Glue: public FBGlue
00057 {
00058 public:
00059     FBgles1Glue(int fd);
00060     ~FBgles1Glue();
00061     bool init(int argc, char ***);
00062     
00063     Renderer* createRenderHandler();
00064     void setInvalidatedRegions(const InvalidatedRanges& /* ranges */) {}
00065     
00066     int width ();
00067     int height ();
00068     void render ();
00069     
00070     void render_to_pbuffer ();
00071     void prepare_copy_from_pbuffer ();
00072     void render_to_display ();
00073     
00074 protected:
00075     int         _fd;
00076 
00077 private:
00078     boost::scoped_ptr<Renderer> _renderer;
00079     EGLDisplay  _display;
00080     EGLConfig   _config;
00081     EGLContext  _context;
00082     EGLSurface  _surface;
00083     EGLConfig   _pbuffer_config;
00084     EGLSurface  _pbuffer;
00085 };
00086 
00087 } // end of namespace gui
00088 } // namespace gnash
00089 
00090 #endif // FB_GLUE_GLES1_H
00091 
00092 // Local Variables:
00093 // mode: C++
00094 // indent-tabs-mode: nil
00095 // End: