summaryrefslogtreecommitdiffstats
path: root/make/config/jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-02-22 03:29:09 +0100
committerSven Gothel <[email protected]>2012-02-22 03:29:09 +0100
commita5e0661540b7dc6c10112ab8c0d3bc41a7b03080 (patch)
tree49ee0e7388554477e768545e17cf45ab2892989b /make/config/jogl
parent3bf2d88a4af2d207c141f93d4aaa0e88ac4057a5 (diff)
Minor GL/GLContext additions / cleanups (GL_BGRA, isNPOTTextureAvailable())
- Subsume GL_EXT_texture_format_BGRA8888 -> GL, Added GLContext.isTextureFormatBGRA8888Available() - Movied generic isNPOTTextureAvailable() from GL -> GLContext, used by GL (desktop), added simplified impl. in GLES1/GLES2 (false/true)
Diffstat (limited to 'make/config/jogl')
-rw-r--r--make/config/jogl/gl-common-extensions.cfg1
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-common.java5
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-desktop.java3
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-gles1.java4
-rw-r--r--make/config/jogl/gl-impl-CustomJavaCode-gles2.java4
5 files changed, 12 insertions, 5 deletions
diff --git a/make/config/jogl/gl-common-extensions.cfg b/make/config/jogl/gl-common-extensions.cfg
index 194d45346..51edd9edd 100644
--- a/make/config/jogl/gl-common-extensions.cfg
+++ b/make/config/jogl/gl-common-extensions.cfg
@@ -86,6 +86,7 @@ RenameExtensionIntoCore GL_EXT_texture_type_2_10_10_10_REV
RenameExtensionIntoCore GL_NV_draw_buffers
RenameExtensionIntoCore GL_NV_fbo_color_attachments
RenameExtensionIntoCore GL_EXT_packed_float
+RenameExtensionIntoCore GL_EXT_texture_format_BGRA8888
# A mess w/ the ES2 definition .. sadly
# RenameExtensionIntoCore GL_EXT_texture_storage
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-common.java b/make/config/jogl/gl-impl-CustomJavaCode-common.java
index 8e7a9fb37..0a8e90171 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-common.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-common.java
@@ -35,11 +35,6 @@
return _context.isExtensionAvailable(glExtensionName);
}
- public boolean isNPOTTextureAvailable() {
- return isGL3() || isGLES2Compatible() || isExtensionAvailable(GL_ARB_texture_non_power_of_two);
- }
- private static final String GL_ARB_texture_non_power_of_two = "GL_ARB_texture_non_power_of_two";
-
public Object getExtension(String extensionName) {
// At this point we don't expose any extensions using this mechanism
return null;
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-desktop.java b/make/config/jogl/gl-impl-CustomJavaCode-desktop.java
index 08b981af7..33b0f1326 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-desktop.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-desktop.java
@@ -120,3 +120,6 @@
throw new GLException("Not a GLES2 implementation");
}
+ public boolean isNPOTTextureAvailable() {
+ return _context.isNPOTTextureAvailable();
+ }
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
index 54bb37ce8..abb10cee0 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles1.java
@@ -58,6 +58,10 @@ public final boolean hasGLSL() {
return false;
}
+public boolean isNPOTTextureAvailable() {
+ return false;
+}
+
public final GL4bc getGL4bc() throws GLException {
throw new GLException("Not a GL4bc implementation");
}
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
index b009d935b..195124d79 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gles2.java
@@ -62,6 +62,10 @@ public final boolean hasGLSL() {
return true;
}
+public boolean isNPOTTextureAvailable() {
+ return true;
+}
+
public final GL4bc getGL4bc() throws GLException {
throw new GLException("Not a GL4bc implementation");
}