gnash-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gnash-commit] [SCM] Gnash branch, openvg, updated. 0893b75a30f4136e5e83


From: Rob Savoye
Subject: [Gnash-commit] [SCM] Gnash branch, openvg, updated. 0893b75a30f4136e5e834e0b5aed0136f396c115
Date: Tue, 05 Oct 2010 20:10:56 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnash".

The branch, openvg has been updated
       via  0893b75a30f4136e5e834e0b5aed0136f396c115 (commit)
       via  3dbad0a81845fe3a5c70a16295011e201a6858b3 (commit)
       via  682596366651ecb81ce6187595b26245e5897c33 (commit)
      from  8a515717b396cdc85c0e8281e4da5e933c7fff73 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit//commit/?id=0893b75a30f4136e5e834e0b5aed0136f396c115


commit 0893b75a30f4136e5e834e0b5aed0136f396c115
Author: Rob Savoye <address@hidden>
Date:   Tue Oct 5 14:10:05 2010 -0600

    build OpenGLES2 support

diff --git a/gui/fb/fb.am b/gui/fb/fb.am
index 26f3dfb..8224d97 100644
--- a/gui/fb/fb.am
+++ b/gui/fb/fb.am
@@ -46,12 +46,19 @@ fb_gnash_CPPFLAGS += $(OPENVG_CFLAGS) $(EGL_CFLAGS)
 fb_gnash_LDADD += $(OPENVG_LIBS) $(EGL_LIBS)
 endif  # BUILD_OVG_RENDERER
 
-# This supports only OpenGL-ES 1.1 with EGL support.
+# This supports only OpenGLES 1.1 with EGL support.
 if BUILD_GLES1_RENDERER
-fb_gnash_SOURCES += fb/fb_glue_gles.cpp fb/fb_glue_gles.h
-fb_gnash_CPPFLAGS += $(GLES_CFLAGS) $(EGL_CFLAGS)
-fb_gnash_LDADD += $(GLES_LIBS) $(EGL_LIBS)
-endif  # BUILD_OVG_RENDERER
+fb_gnash_SOURCES += fb/fb_glue_gles1.cpp fb/fb_glue_gles1.h
+fb_gnash_CPPFLAGS += $(GLES1_CFLAGS) $(EGL_CFLAGS)
+fb_gnash_LDADD += $(GLES1_LIBS) $(EGL_LIBS)
+endif  # BUILD_GLES1_RENDERER
+
+# This supports only OpenGLES 1.1 with EGL support.
+if BUILD_GLES2_RENDERER
+fb_gnash_SOURCES += fb/fb_glue_gles2.cpp fb/fb_glue_gles2.h
+fb_gnash_CPPFLAGS += $(GLES2_CFLAGS) $(EGL_CFLAGS)
+fb_gnash_LDADD += $(GLES2_LIBS) $(EGL_LIBS)
+endif  # BUILD_GLES2_RENDERER
 
 endif  # BUILD_FB_GUI
 

http://git.savannah.gnu.org/cgit//commit/?id=3dbad0a81845fe3a5c70a16295011e201a6858b3


commit 3dbad0a81845fe3a5c70a16295011e201a6858b3
Author: Rob Savoye <address@hidden>
Date:   Tue Oct 5 14:09:27 2010 -0600

    renamed to separate gles1 from gles2

diff --git a/gui/fb/fb_glue_gles1.cpp b/gui/fb/fb_glue_gles1.cpp
new file mode 100644
index 0000000..6b7396f
--- /dev/null
+++ b/gui/fb/fb_glue_gles1.cpp
@@ -0,0 +1,184 @@
+// 
+//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+//              Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+// gles-1.0c for Linux
+#ifdef HAVE_GLES1_GL_H
+# include <GLES/gl.h>
+#endif
+#ifdef HAVE_GLES1_EGL_H
+#include <GLES/egl.h>
+#endif
+
+#if 0
+// Mali Developer Tools for ARM 1.x
+#ifdef HAVE_EGL_EGL_H
+# include <EGL/egl.h>
+# include <EGL/eglext.h>
+#endif
+// Mali Developer Tools for ARM 2.x and Android 2.1
+#ifdef HAVE_GLES2_GL2_H
+# include <GLES2/gl2.h>
+# include <GLES2/gl2ext.h>
+#endif
+#endif
+
+#include "log.h"
+#include "fb_glue_gles1.h"
+
+namespace gnash
+{
+
+bool 
+FBglesGlue::init(int /*argc*/, char *** /*argv*/) {
+    EGLint majorVersion, minorVersion;
+    EGLint numOfConfigs = 0;
+    EGLint result;
+    const EGLint main_attrib_list[] = {
+        EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
+        EGL_BUFFER_SIZE, 32,
+        EGL_DEPTH_SIZE, 16,
+        EGL_NONE
+    };
+    
+    _display = eglGetDisplay((NativeDisplayType)0);
+    if (_display == EGL_NO_DISPLAY) {
+        return false;
+    }
+    log_trace("EGL: getDisplay ok");
+    
+    result = eglInitialize(_display, &majorVersion, &minorVersion);
+    if (result == EGL_FALSE) {
+        return false;
+    }
+    log_trace("EGL: initialize ok");
+    
+    result = eglChooseConfig(_display, main_attrib_list, &_config, 1,
+                             &numOfConfigs);
+    if (result == EGL_FALSE || numOfConfigs != 1) {
+        return false;
+    }
+    log_trace("EGL: config ok");
+    
+    _surface = eglCreateWindowSurface(_display, _config, (NativeWindowType)0,
+                                      NULL);
+    if (eglGetError () != EGL_SUCCESS) {
+        return false;
+    }
+    log_trace("EGL: surface ok");
+    
+    _context = eglCreateContext(_display, _config, NULL, NULL);
+    if (eglGetError () != EGL_SUCCESS) {
+        return false;
+    }
+    log_trace("EGL: context ok");
+    
+    eglMakeCurrent(_display, _surface, _surface, _context);
+    if (eglGetError () != EGL_SUCCESS) {
+        return false;
+    }
+    log_trace("EGL: current ok");
+    
+    const EGLint pbuffer_config_list[] = {
+        EGL_SURFACE_TYPE, EGL_PBUFFER_BIT,
+        EGL_BUFFER_SIZE, 32,
+        EGL_DEPTH_SIZE, 0,
+        EGL_BIND_TO_TEXTURE_RGBA, EGL_TRUE,
+        EGL_CONFIG_CAVEAT, EGL_NONE,
+        EGL_NONE
+    };
+    
+    result = eglChooseConfig(_display, pbuffer_config_list, &_pbuffer_config,
+                             1, &numOfConfigs);
+    if (result == EGL_FALSE || numOfConfigs == 0) {
+        return false;
+    }
+    log_trace("EGL: pbuffer config ok");
+    
+    const EGLint pbuffer_attrib_list[] = {
+        EGL_WIDTH, EGL_MAX_PBUFFER_WIDTH,
+        EGL_HEIGHT, EGL_MAX_PBUFFER_HEIGHT,
+        EGL_TEXTURE_FORMAT, EGL_TEXTURE_RGBA,
+        EGL_TEXTURE_TARGET, EGL_TEXTURE_2D,
+        EGL_MIPMAP_TEXTURE, EGL_FALSE,
+        EGL_NONE
+    };
+    
+    _pbuffer = eglCreatePbufferSurface(_display, _pbuffer_config,
+                                       pbuffer_attrib_list);
+    if (eglGetError () != EGL_SUCCESS) {
+        return false;
+    }
+    log_trace("EGL: pbuffer surface ok");
+    
+    return true;
+}
+
+FBglesGlue::~FBglesGlue () {
+    eglMakeCurrent(_display, EGL_NO_SURFACE, EGL_NO_SURFACE, EGL_NO_CONTEXT);
+    eglTerminate(_display);
+}
+
+int 
+FBglesGlue::width() {
+    EGLint result;
+    eglQuerySurface (_display, _surface, EGL_WIDTH, &result);
+    log_trace("EGL: width %d", result);
+    return result;
+}
+
+int
+FBglesGlue::height() {
+    EGLint result;
+    eglQuerySurface (_display, _surface, EGL_HEIGHT, &result);
+    log_trace("EGL: height %d", result);
+    return result;
+}
+
+void
+FBglesGlue::render() {
+    eglSwapBuffers(_display, _surface);
+}
+
+void 
+FBglesGlue::render_to_pbuffer () {
+    if (_pbuffer != EGL_NO_SURFACE)
+        eglMakeCurrent(_display, _pbuffer, _pbuffer, _context);
+}
+
+void 
+FBglesGlue::prepare_copy_from_pbuffer () {
+    if (_pbuffer != EGL_NO_SURFACE)
+        eglMakeCurrent(_display, _surface, _pbuffer, _context);
+}
+
+void 
+FBglesGlue::render_to_display () {
+    if (_pbuffer != EGL_NO_SURFACE)
+        eglMakeCurrent(_display, _surface, _surface, _context);
+}
+
+} // namespace gnash
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: nil
+// End:
diff --git a/gui/fb/fb_glue_gles1.h b/gui/fb/fb_glue_gles1.h
new file mode 100644
index 0000000..d55eee6
--- /dev/null
+++ b/gui/fb/fb_glue_gles1.h
@@ -0,0 +1,96 @@
+// 
+//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+//              Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+#ifndef FB_GLUE_GLES1_H
+#define FB_GLUE_GLES1_H
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+// gles-1.0c for Linux
+#ifdef HAVE_GLES1_GL_H
+# include <GLES/gl.h>
+# endif
+#ifdef HAVE_GLES1_EGL_H
+#include <GLES/egl.h>
+#endif
+#if 0
+// Mali Developer Tools for ARM 1.x
+#ifdef HAVE_EGL_EGL_H
+# include <EGL/egl.h>
+# include <EGL/eglext.h>
+#endif
+// Mali Developer Tools for ARM 2.x and Android 2.1
+#ifdef HAVE_GLES2_GL2_H
+# include <GLES2/gl2.h>
+# include <GLES2/gl2ext.h>
+#endif
+#endif
+
+#include "fbsup.h"
+#include "render_handler_gles.h"
+
+namespace gnash
+{
+
+    class FBglesGlue: public FBGlue // , public OglGlue
+{
+public:
+    FBglesGlue() :
+        _surface (EGL_NO_SURFACE),
+        _pbuffer (EGL_NO_SURFACE) {}
+    virtual ~FBglesGlue();
+    
+    virtual bool init(int /*argc*/, char *** /*argv*/);
+    
+    virtual Renderer* createRenderHandler() {
+        //_render_handler = create_render_handler_ogl (true, this);
+        //        return _render_handler; FIXME: 
+        // error: invalid covariant return type for 'virtual 
gnash::render_handler* gnash::FBglesGlue::createRenderHandler()'
+
+    }
+    
+    virtual void setInvalidatedRegions(const InvalidatedRanges& /* ranges */) 
{}
+    
+    virtual int width ();
+    virtual int height ();
+    virtual void render ();
+    
+    virtual void render_to_pbuffer ();
+    virtual void prepare_copy_from_pbuffer ();
+    virtual void render_to_display ();
+    
+private:
+    render_handler* _render_handler;
+    EGLDisplay      _display;
+    EGLConfig       _config;
+    EGLContext      _context;
+    EGLSurface      _surface;
+    EGLConfig       _pbuffer_config;
+    EGLSurface      _pbuffer;
+};
+
+} // namespace gnash
+
+#endif // FB_GLUE_GLES1_H
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: nil
+// End:

http://git.savannah.gnu.org/cgit//commit/?id=682596366651ecb81ce6187595b26245e5897c33


commit 682596366651ecb81ce6187595b26245e5897c33
Author: Rob Savoye <address@hidden>
Date:   Tue Oct 5 14:08:52 2010 -0600

    add initial stubs for OpenGLES2.x support

diff --git a/gui/fb/fb_glue_gles2.cpp b/gui/fb/fb_glue_gles2.cpp
new file mode 100644
index 0000000..9ce1ffd
--- /dev/null
+++ b/gui/fb/fb_glue_gles2.cpp
@@ -0,0 +1,55 @@
+// 
+//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+//              Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+// gles-1.0c for Linux
+#ifdef HAVE_GLES1_GL_H
+# include <GLES/gl.h>
+#endif
+#ifdef HAVE_GLES1_EGL_H
+#include <GLES/egl.h>
+#endif
+
+#if 0
+// Mali Developer Tools for ARM 1.x
+#ifdef HAVE_EGL_EGL_H
+# include <EGL/egl.h>
+# include <EGL/eglext.h>
+#endif
+// Mali Developer Tools for ARM 2.x and Android 2.1
+#ifdef HAVE_GLES2_GL2_H
+# include <GLES2/gl2.h>
+# include <GLES2/gl2ext.h>
+#endif
+#endif
+
+#include "log.h"
+#include "fb_glue_gles2.h"
+
+namespace gnash
+{
+
+} // namespace gnash
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: nil
+// End:
diff --git a/gui/fb/fb_glue_gles2.h b/gui/fb/fb_glue_gles2.h
new file mode 100644
index 0000000..a5af1f4
--- /dev/null
+++ b/gui/fb/fb_glue_gles2.h
@@ -0,0 +1,65 @@
+// 
+//   Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
+//              Free Software Foundation, Inc.
+// 
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 3 of the License, or
+// (at your option) any later version.
+// 
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+// 
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+
+#ifndef FB_GLUE_GLES2_H
+#define FB_GLUE_GLES2_H
+
+#ifdef HAVE_CONFIG_H
+#include "gnashconfig.h"
+#endif
+
+// gles-1.0c for Linux
+#ifdef HAVE_GLES1_GL_H
+# include <GLES/gl.h>
+# endif
+#ifdef HAVE_GLES1_EGL_H
+#include <GLES/egl.h>
+#endif
+#if 0
+// Mali Developer Tools for ARM 1.x
+#ifdef HAVE_EGL_EGL_H
+# include <EGL/egl.h>
+# include <EGL/eglext.h>
+#endif
+// Mali Developer Tools for ARM 2.x and Android 2.1
+#ifdef HAVE_GLES2_GL2_H
+# include <GLES2/gl2.h>
+# include <GLES2/gl2ext.h>
+#endif
+#endif
+
+#include "fbsup.h"
+#include "render_handler_gles.h"
+
+namespace gnash
+{
+
+    class FBgles2Glue: public FBGlue // , public OglGlue
+{
+public:
+private:
+};
+
+} // namespace gnash
+
+#endif // FB_GLUE__GLES2_H
+
+// Local Variables:
+// mode: C++
+// indent-tabs-mode: nil
+// End:

-----------------------------------------------------------------------

Summary of changes:
 gui/fb/fb.am                                       |   17 ++++++++---
 gui/fb/{fb_glue_gles.cpp => fb_glue_gles1.cpp}     |    2 +-
 gui/fb/{fb_glue_gles.h => fb_glue_gles1.h}         |    6 ++--
 .../Renderer_gles2.h => gui/fb/fb_glue_gles2.cpp   |   22 +++++---------
 .../Renderer_gles2.h => gui/fb/fb_glue_gles2.h     |   30 +++++++++++--------
 5 files changed, 41 insertions(+), 36 deletions(-)
 copy gui/fb/{fb_glue_gles.cpp => fb_glue_gles1.cpp} (99%)
 copy gui/fb/{fb_glue_gles.h => fb_glue_gles1.h} (97%)
 copy librender/Renderer_gles2.h => gui/fb/fb_glue_gles2.cpp (79%)
 copy librender/Renderer_gles2.h => gui/fb/fb_glue_gles2.h (76%)


hooks/post-receive
-- 
Gnash



reply via email to

[Prev in Thread] Current Thread [Next in Thread]