From b7f673dad7025400e445e8796305a3ea6b7c1679 Mon Sep 17 00:00:00 2001
From: Sven Gothel <sgothel@jausoft.com>
Date: Fri, 24 Jan 2014 05:01:40 +0100
Subject: Bug 950 - Recognize full FBO capabilities for ES 3.0 -
 [GLContext|GL].hasFullFBOSupport() == true

OpenGL ES 3.0 supports full framebuffer operations, incl. multiple color-attachments and multisample.

Hence [GLContext|GL].hasFullFBOSupport()  shall returns true w/ a ES 3.0 context.
---
 src/jogl/classes/javax/media/opengl/GLBase.java    |  4 ++--
 src/jogl/classes/javax/media/opengl/GLContext.java | 24 +++++++++++-----------
 2 files changed, 14 insertions(+), 14 deletions(-)

(limited to 'src/jogl/classes/javax')

diff --git a/src/jogl/classes/javax/media/opengl/GLBase.java b/src/jogl/classes/javax/media/opengl/GLBase.java
index 3ac12f0a1..2d6aed139 100644
--- a/src/jogl/classes/javax/media/opengl/GLBase.java
+++ b/src/jogl/classes/javax/media/opengl/GLBase.java
@@ -396,7 +396,7 @@ public interface GLBase {
    /**
     * Returns <code>true</code> if basic FBO support is available, otherwise <code>false</code>.
     * <p>
-    * Basic FBO is supported if the context is either GL-ES >= 2.0, GL >= core 3.0 or implements the extensions
+    * Basic FBO is supported if the context is either GL-ES >= 2.0, GL >= 3.0 [core, compat] or implements the extensions
     * <code>GL_ARB_ES2_compatibility</code>, <code>GL_ARB_framebuffer_object</code>, <code>GL_EXT_framebuffer_object</code> or <code>GL_OES_framebuffer_object</code>.
     * </p>
     * <p>
@@ -410,7 +410,7 @@ public interface GLBase {
    /**
     * Returns <code>true</code> if full FBO support is available, otherwise <code>false</code>.
     * <p>
-    * Full FBO is supported if the context is either GL >= core 3.0 or implements the extensions
+    * Full FBO is supported if the context is either GL >= core 3.0 [ES, core, compat] or implements the extensions
     * <code>ARB_framebuffer_object</code>, or all of
     * <code>EXT_framebuffer_object</code>, <code>EXT_framebuffer_multisample</code>,
     * <code>EXT_framebuffer_blit</code>, <code>GL_EXT_packed_depth_stencil</code>.
diff --git a/src/jogl/classes/javax/media/opengl/GLContext.java b/src/jogl/classes/javax/media/opengl/GLContext.java
index 0b0ed8e0d..9245d10c2 100644
--- a/src/jogl/classes/javax/media/opengl/GLContext.java
+++ b/src/jogl/classes/javax/media/opengl/GLContext.java
@@ -883,7 +883,7 @@ public abstract class GLContext {
   /**
    * Returns <code>true</code> if basic FBO support is available, otherwise <code>false</code>.
    * <p>
-   * Basic FBO is supported if the context is either GL-ES >= 2.0, GL >= core 3.0 or implements the extensions
+   * Basic FBO is supported if the context is either GL-ES >= 2.0, GL >= 3.0 [core, compat] or implements the extensions
    * <code>GL_ARB_ES2_compatibility</code>, <code>GL_ARB_framebuffer_object</code>, <code>GL_EXT_framebuffer_object</code> or <code>GL_OES_framebuffer_object</code>.
    * </p>
    * <p>
@@ -896,19 +896,10 @@ public abstract class GLContext {
       return 0 != ( ctxOptions & CTX_IMPL_FBO ) ;
   }
 
-  /**
-   * Returns <code>true</code> if <code>OES_single_precision</code>, fp32, fixed function point (FFP) compatibility entry points available,
-   * otherwise <code>false</code>.
-   * @see #CTX_IMPL_FP32_COMPAT_API
-   */
-  public final boolean hasFP32CompatAPI() {
-      return 0 != ( ctxOptions & CTX_IMPL_FP32_COMPAT_API ) ;
-  }
-
   /**
    * Returns <code>true</code> if full FBO support is available, otherwise <code>false</code>.
    * <p>
-   * Full FBO is supported if the context is either GL >= core 3.0 or implements the extensions
+   * Full FBO is supported if the context is either GL >= 3.0 [ES, core, compat] or implements the extensions
    * <code>ARB_framebuffer_object</code>, or all of
    * <code>EXT_framebuffer_object</code>, <code>EXT_framebuffer_multisample</code>,
    * <code>EXT_framebuffer_blit</code>, <code>GL_EXT_packed_depth_stencil</code>.
@@ -919,7 +910,7 @@ public abstract class GLContext {
    */
   public final boolean hasFullFBOSupport() {
       return hasBasicFBOSupport() && !hasRendererQuirk(GLRendererQuirks.NoFullFBOSupport) &&
-             ( isGL3() ||                                                         // GL >= 3.0
+             ( isGL3ES3() ||                                                      // GL >= 3.0 [ES, core, compat]
                isExtensionAvailable(GLExtensions.ARB_framebuffer_object) ||       // ARB_framebuffer_object
                ( isExtensionAvailable(GLExtensions.EXT_framebuffer_object) &&     // All EXT_framebuffer_object*
                  isExtensionAvailable(GLExtensions.EXT_framebuffer_multisample) &&
@@ -929,6 +920,15 @@ public abstract class GLContext {
              ) ;
   }
 
+  /**
+   * Returns <code>true</code> if <code>OES_single_precision</code>, fp32, fixed function point (FFP) compatibility entry points available,
+   * otherwise <code>false</code>.
+   * @see #CTX_IMPL_FP32_COMPAT_API
+   */
+  public final boolean hasFP32CompatAPI() {
+      return 0 != ( ctxOptions & CTX_IMPL_FP32_COMPAT_API ) ;
+  }
+
   /**
    * Returns the maximum number of FBO RENDERBUFFER samples
    * if {@link #hasFullFBOSupport() full FBO is supported}, otherwise false.
-- 
cgit v1.2.3