From b5ce9cce6223810c6df7b66cf1a51318309fdc90 Mon Sep 17 00:00:00 2001
From: sg215889
Date: Wed, 29 Jul 2009 06:27:46 -0700
Subject: Fixed GL* documentation. Moved common GL functions to GLBase. Moved
glAllocateMemoryNV to GL2GL3 only. Add GL2GL3 interface. Fix some GL2
signatures. BroadcomEGL disable custom setSize().
---
make/doc/jogl/spec-overview.html | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
(limited to 'make/doc')
diff --git a/make/doc/jogl/spec-overview.html b/make/doc/jogl/spec-overview.html
index 11074e601..4ee902719 100644
--- a/make/doc/jogl/spec-overview.html
+++ b/make/doc/jogl/spec-overview.html
@@ -11,7 +11,7 @@
This specification, an optional set of packages, describes the Java(TM)
bindings to the native OpenGL(R) 3D graphics library profiles:
- - Desktop OpenGL 1.x, 2.y and 3.0, with x >= 5 and y >= 0
+ - Desktop OpenGL 1.x, 2.y and 3.0, with x >= 3 and y >= 0
- Desktop OpenGL 3.x, with x >= 1
- Embedded OpenGL ES 1.x, with x >= 0
- Embedded OpenGL ES 2.x, with x >= 0
@@ -60,7 +60,7 @@ excluded.
- {@link javax.media.opengl.GL3 javax.media.opengl.GL3} interface
This interface contains all core desktop OpenGL methods starting from 3.1,
-inclusive, as well as most of it's extensions defined at the
+inclusive - forward compatible only, as well as most of it's extensions defined at the
time of this specification.
Future extensions will be added with a maintenance update
@@ -101,7 +101,12 @@ time of this specification.
- {@link javax.media.opengl.GL2ES2 javax.media.opengl.GL2ES2} interface
Interface containing the common subset of GL3, GL2 and GLES2.
- This interface reflects only the programmable shader functionality of OpenGL
+ This interface reflects only the programmable shader functionality of desktop and embedded OpenGL
+
+ - {@link javax.media.opengl.GL2GL3 javax.media.opengl.GL2GL3} interface
+
+ Interface containing the common subset of GL3 and GL2.
+ This interface reflects only the programmable shader functionality of desktop OpenGL
@@ -500,7 +505,7 @@ http://www.khronos.org/registry/gles/
Proposed Final Draft Review, February/March 2006
1.0.0 Final Release, September 2006
1.1.0 Maintenance Release, April 2007
- 1.2.0 Maintenance Release, June 2009
+ 2.0.0 Maintenance Release, July 2009
--
cgit v1.2.3
From 97c28763a19a2b2a55486f9908c763ceb2e60775 Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Sun, 2 Aug 2009 03:49:31 -0700
Subject: Update OpenGL GL2 profile subsumed/promoted extensions. Base is 3.0,
ignore the colission-free subsumed extensions.
---
make/config/jogl/gl-common.cfg | 63 +++++++++++++++++++++-
make/config/jogl/gl-gl2.cfg | 2 +
make/config/jogl/gl-if-CustomJavaCode-gl2.java | 40 ++++++++++++++
make/config/jogl/gl-impl-CustomJavaCode-gl2.java | 1 +
make/doc/jogl/spec-overview.html | 26 ++++++---
.../javax/media/opengl/GLPipelineFactory.java | 9 ++--
6 files changed, 128 insertions(+), 13 deletions(-)
create mode 100644 make/config/jogl/gl-if-CustomJavaCode-gl2.java
(limited to 'make/doc')
diff --git a/make/config/jogl/gl-common.cfg b/make/config/jogl/gl-common.cfg
index 269ea68a7..3e38aa0da 100644
--- a/make/config/jogl/gl-common.cfg
+++ b/make/config/jogl/gl-common.cfg
@@ -133,6 +133,7 @@ IgnoreExtension GL_EXT_coordinate_frame
# Ignore discontinued extensions
IgnoreExtension GL_NV_element_array
+# >>> OpenGL 1.1
# Ignore extensions subsumed in OpenGL 1.1 (from OpenGL 1.1 spec, Appendix C)
IgnoreExtension GL_EXT_vertex_array
IgnoreExtension GL_EXT_blend_logic_op
@@ -141,7 +142,9 @@ IgnoreExtension GL_EXT_polygon_offset
IgnoreExtension GL_EXT_subtexture
IgnoreExtension GL_EXT_texture
IgnoreExtension GL_EXT_texture_object
+# <<< OpenGL 1.1
+# >>> OpenGL 1.2
# Ignore extensions subsumed in OpenGL 1.2 and 1.2.1 (from OpenGL 1.2.1 spec, Appendix D)
IgnoreExtension GL_EXT_bgra
IgnoreExtension GL_EXT_blend_color
@@ -163,7 +166,9 @@ IgnoreExtension GL_SGI_color_matrix
IgnoreExtension GL_SGI_color_table
IgnoreExtension GL_SGIS_texture_edge_clamp
IgnoreExtension GL_SGIS_texture_lod
+# <<< OpenGL 1.2
+# >>> OpenGL 1.3
# Ignore extensions subsumed in OpenGL 1.3 (from OpenGL 1.3 spec, Appendix F)
IgnoreExtension GL_ARB_multisample
IgnoreExtension GL_ARB_multitexture
@@ -179,7 +184,9 @@ IgnoreExtension GL_EXT_texture_env_add
IgnoreExtension GL_EXT_texture_env_combine
IgnoreExtension GL_EXT_texture_env_dot3
IgnoreExtension GL_SGIS_texture_border_clamp
+# <<< OpenGL 1.3
+# >>> OpenGL 1.4
# Ignore extensions subsumed in OpenGL 1.4 (from OpenGL 1.4 spec, Appendix G)
IgnoreExtension GL_ARB_depth_texture
IgnoreExtension GL_ARB_point_parameters
@@ -195,29 +202,81 @@ IgnoreExtension GL_EXT_secondary_color
IgnoreExtension GL_EXT_stencil_wrap
IgnoreExtension GL_NV_blend_square
IgnoreExtension GL_SGIS_generate_mipmap
+# <<< OpenGL 1.4
+# >>> OpenGL 1.5
# Ignore extensions subsumed in OpenGL 1.5 (from OpenGL 1.5 spec, Appendix H)
IgnoreExtension GL_ARB_occlusion_query
IgnoreExtension GL_ARB_vertex_buffer_object
IgnoreExtension GL_EXT_shadow_funcs
+# <<< OpenGL 1.5
+# >>> OpenGL 2.0
# Ignore extensions subsumed in OpenGL 2.0 (from OpenGL 2.0 spec, Appendix I)
# NOTE that GL_ARB_shader_objects is NOT ignored here, because the
# naming convention is too different for us to pick up the entry
# points automatically (e.g. glCreateShaderObjectARB was exposed as
# glCreateShader)
+# IgnoreExtension GL_ARB_shader_objects
IgnoreExtension GL_ARB_vertex_shader
IgnoreExtension GL_ARB_fragment_shader
-IgnoreExtension GL_ARB_draw_buffers
IgnoreExtension GL_ARB_texture_non_power_of_two
IgnoreExtension GL_ARB_point_sprite
+IgnoreExtension GL_ARB_draw_buffers
IgnoreExtension GL_EXT_blend_equation_separate
# Don't ignore the following one since the entry point is different from anything in the core
# IgnoreExtension GL_EXT_stencil_two_side
+# <<< OpenGL 2.0
+# >>> OpenGL 2.1
# Ignore extensions subsumed in OpenGL 2.1 (from OpenGL 2.1 spec, Appendix J)
IgnoreExtension GL_ARB_pixel_buffer_object
IgnoreExtension GL_EXT_texture_sRGB
+# <<< OpenGL 2.1
+
+# >>> OpenGL 3.0
+# Ignore extensions subsumed in OpenGL 3.0 (from OpenGL 3.0 spec, Appendix N)
+IgnoreExtension GL_EXT_gpu_shader4
+
+IgnoreExtension GL_NV_conditional_render
+
+#Not promoted in header files: GL_APPLE_flush_buffer_range
+
+IgnoreExtension GL_ARB_color_buffer_float
+#Not promoted in header files: GL_NV_depth_buffer_float
+IgnoreExtension GL_ARB_texture_float
+IgnoreExtension GL_EXT_packed_float
+IgnoreExtension GL_EXT_texture_shared_exponent
+
+IgnoreExtension GL_EXT_framebuffer_object
+
+# GL_NV_half_float, GL_NV_half_float_pixel: these are also not usable for Java ..
+IgnoreExtension GL_NV_half_float
+IgnoreExtension GL_NV_half_float_pixel
+
+IgnoreExtension GL_EXT_framebuffer_multisample
+IgnoreExtension GL_EXT_framebuffer_blit
+
+#Big gap of promoted tokens and functions: GL_EXT_texture_integer
+
+IgnoreExtension GL_EXT_texture_array
+
+IgnoreExtension GL_EXT_packed_depth_stencil
+
+#Not promoted in header files: GL_EXT_draw_buffers2
+
+IgnoreExtension GL_EXT_texture_compression_rgtc
+
+IgnoreExtension GL_EXT_transform_feedback
+IgnoreExtension GL_NV_transform_feedback
+
+IgnoreExtension GL_APPLE_vertex_array_object
+
+IgnoreExtension GL_EXT_framebuffer_sRGB
+
+# <<< OpenGL 3.0
+
+
# Ignore a few obsolete versions of extensions that have been subsumed into the core or ARB extensions
IgnoreExtension GL_EXT_multisample
@@ -536,7 +595,7 @@ ClassJavadoc GL2 *
ClassJavadoc GL2 * This interface contains all core desktop OpenGL methods through
ClassJavadoc GL2 * version 3.0, inclusive, as well as most of it's extensions defined at the
ClassJavadoc GL2 * time of this specification. Early OpenGL extensions whose functionality
-ClassJavadoc GL2 * was incorporated into core OpenGL by version 2.0, inclusive, are specifically
+ClassJavadoc GL2 * was incorporated into core OpenGL by version 3.0, inclusive, are specifically
ClassJavadoc GL2 * excluded.
ClassJavadoc GL2 *
ClassJavadoc GL2 */
diff --git a/make/config/jogl/gl-gl2.cfg b/make/config/jogl/gl-gl2.cfg
index 55f5b9781..7b689093a 100644
--- a/make/config/jogl/gl-gl2.cfg
+++ b/make/config/jogl/gl-gl2.cfg
@@ -43,6 +43,8 @@ IgnoreExtension GL_EXT_point_parameters
CustomJavaCode GL2 public boolean glIsPBOPackEnabled();
CustomJavaCode GL2 public boolean glIsPBOUnpackEnabled();
+IncludeAs CustomJavaCode GL2 gl-if-CustomJavaCode-gl2.java
+
CustomJavaCode GL2Impl public void glFrustumf(float left, float right, float bottom, float top, float zNear, float zFar) {
CustomJavaCode GL2Impl glFrustum((double)left, (double)right, (double)bottom, (double)top, (double)zNear, (double)zFar); }
diff --git a/make/config/jogl/gl-if-CustomJavaCode-gl2.java b/make/config/jogl/gl-if-CustomJavaCode-gl2.java
new file mode 100644
index 000000000..fe6388cbe
--- /dev/null
+++ b/make/config/jogl/gl-if-CustomJavaCode-gl2.java
@@ -0,0 +1,40 @@
+
+/** Missed in the GL_EXT_gpu_shader4 promotion to 3.0 core */
+public static final int GL_SAMPLER_BUFFER_EXT = 0x8DC2;
+/** Missed in the GL_EXT_gpu_shader4 promotion to 3.0 core */
+public static final int GL_INT_SAMPLER_2D_RECT_EXT = 0x8DCD;
+/** Missed in the GL_EXT_gpu_shader4 promotion to 3.0 core */
+public static final int GL_UNSIGNED_INT_SAMPLER_2D_RECT_EXT = 0x8DD5;
+/** Missed in the GL_EXT_gpu_shader4 promotion to 3.0 core */
+public static final int GL_UNSIGNED_INT_SAMPLER_BUFFER_EXT = 0x8DD8;
+/** Missed in the GL_EXT_gpu_shader4 promotion to 3.0 core */
+public static final int GL_VERTEX_ATTRIB_ARRAY_INTEGER_EXT = 0x88FD;
+
+/** Missed in the GL_ARB_color_buffer_float promotion to 3.0 core */
+public static final int GL_RGBA_FLOAT_MODE_ARB = 0x8820;
+
+/** Missed in the GL_ARB_texture_float promotion to 3.0 core */
+public static final int GL_ALPHA32F_ARB = 0x8816;
+/** Missed in the GL_ARB_texture_float promotion to 3.0 core */
+public static final int GL_INTENSITY32F_ARB = 0x8817;
+/** Missed in the GL_ARB_texture_float promotion to 3.0 core */
+public static final int GL_LUMINANCE32F_ARB = 0x8818;
+/** Missed in the GL_ARB_texture_float promotion to 3.0 core */
+public static final int GL_ALPHA16F_ARB = 0x881C;
+/** Missed in the GL_ARB_texture_float promotion to 3.0 core */
+public static final int GL_INTENSITY16F_ARB = 0x881D;
+/** Missed in the GL_ARB_texture_float promotion to 3.0 core */
+public static final int GL_LUMINANCE16F_ARB = 0x881E;
+/** Missed in the GL_ARB_texture_float promotion to 3.0 core */
+public static final int GL_LUMINANCE_ALPHA16F_ARB = 0x881F;
+
+/** Missed in the GL_EXT_packed_float promotion to 3.0 core */
+public static final int GL_RGBA_SIGNED_COMPONENTS_EXT = 0x8C3C;
+
+/** Missed in the GL_EXT_texture_array promotion to 3.0 core */
+public static final int GL_COMPARE_REF_DEPTH_TO_TEXTURE_EXT = 0x884E;
+
+/** Missed in the GL_EXT_framebuffer_sRGB promotion to 3.0 core */
+public static final int GL_FRAMEBUFFER_SRGB_CAPABLE_EXT = 0x8DBA;
+
+
diff --git a/make/config/jogl/gl-impl-CustomJavaCode-gl2.java b/make/config/jogl/gl-impl-CustomJavaCode-gl2.java
index 061830cb4..5928b3a0b 100644
--- a/make/config/jogl/gl-impl-CustomJavaCode-gl2.java
+++ b/make/config/jogl/gl-impl-CustomJavaCode-gl2.java
@@ -15,6 +15,7 @@ public void setObjectTracker(GLObjectTracker tracker) {
*/
+
public GL2Impl(GLProfile glp, GLContextImpl context) {
this._context = context;
this.bufferSizeTracker = context.getBufferSizeTracker();
diff --git a/make/doc/jogl/spec-overview.html b/make/doc/jogl/spec-overview.html
index 4ee902719..f79e5ff23 100644
--- a/make/doc/jogl/spec-overview.html
+++ b/make/doc/jogl/spec-overview.html
@@ -53,7 +53,7 @@ bindings to the native OpenGL(R) 3D graphics library profiles:
This interface contains all core desktop OpenGL methods through
version 3.0, inclusive, as well as most of it's extensions defined at the
time of this specification. Early OpenGL extensions whose functionality
-was incorporated into core OpenGL by version 2.0, inclusive, are specifically
+was incorporated into core OpenGL by version 3.0, inclusive, are specifically
excluded.
Future extensions will be added with a maintenance update
@@ -304,11 +304,16 @@ according the following rules:
-
-
- All functions in core OpenGL 2.0, inclusive, have been included.
+ - All functions in core OpenGL 3.0, inclusive, have been included.
- If the functionality of the OpenGL extension was subsumed into core
-OpenGL by version 2.0, then the extension was dropped from the Java bindings.
+OpenGL by version 3.0, then the extension was dropped from the Java bindings.
However, if the core function name is not available in the native OpenGL implementation,
- the extension named equivalent is used instead, e.g. GL_ARB_framebuffer_object.
+ the extension named equivalent is used instead, e.g. GL_ARB_framebuffer_object.
+ In general the native method name will be looked up as follows
+
+ - Try the interface name
+ - Try the extension name: ARB, EXT, ..
+
- Functions that deal with explicit pointer values in such a way that
they cannot be properly implemented in Java have been excluded. This
includes retrieval methods with a C void ** in the OpenGL signature like glGetBufferPointerv,
@@ -370,8 +375,8 @@ implementation.
OpenGL Version on Runtime System
Even though OpenGL extensions whose functionality was included into core
-OpenGL by version 2.0, inclusive, are not included in the bindings, it should
-be noted that OpenGL version 2.0 is not an absolute requirement on the runtime
+OpenGL by version 3.0, inclusive, are not included in the bindings, it should
+be noted that OpenGL version 3.0 is not an absolute requirement on the runtime
system. This is because a user could query whether any particular function
is available before calling certain core APIs that might not be present.
Also, if the core function name is not available in the native OpenGL implementation,
@@ -423,6 +428,15 @@ http://www.khronos.org/registry/cl/
href="http://www.opengl.org/registry/doc/glspec31.20090324.pdf">
http://www.opengl.org/registry/doc/glspec31.20090324.pdf
+
+ - OpenGL 3.0 Specification
+
+
+
+
+http://www.opengl.org/registry/doc/glspec30.20080923.pdf
+
- OpenGL 2.1 Specification
diff --git a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
index bb9f86911..9aceb2c53 100644
--- a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
@@ -54,13 +54,12 @@ public class GLPipelineFactory {
* The upstream GL instance is determined as follows:
*
* - Use
pipelineClazzBaseName
as the class name's full basename, incl. package name
- * - For all
downstream
classes, do:
+ * - For the
downstream
classe and it's superclasses, do:
*
- * - For all
downstream
class interfaces, do:
+ * - For all
downstream
class and superclass interfaces, do:
*
- * - If
reqInterface
is not null and the interface is unequal, continue.
- * - If
downstream
is not instance of interface, continue.
- * - If
downstream
is not instance of interface, continue.
+ * - If
reqInterface
is not null and the interface is unequal, continue loop.
+ * - If
downstream
is not instance of interface, continue loop.
* - If upstream class is available use it, end loop.
*
*
--
cgit v1.2.3
From 91e2508661f8f922afad6379e8bcadee37900546 Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Sun, 2 Aug 2009 04:30:53 -0700
Subject: Update documentation (OpenGL 3.0, 3.1 specifics); Fix
ExtensionAvailabilityCache: Add Version 2.1 in case of GL2/OpenGL 3.0
---
make/config/jogl/gl-common.cfg | 13 ++++++++++---
make/doc/jogl/spec-overview.html | 9 ++++++++-
.../com/sun/opengl/impl/ExtensionAvailabilityCache.java | 15 ++++++---------
3 files changed, 24 insertions(+), 13 deletions(-)
(limited to 'make/doc')
diff --git a/make/config/jogl/gl-common.cfg b/make/config/jogl/gl-common.cfg
index 3e38aa0da..7cf51fda5 100644
--- a/make/config/jogl/gl-common.cfg
+++ b/make/config/jogl/gl-common.cfg
@@ -585,7 +585,8 @@ ClassJavadoc GL2ES2 */
ClassJavadoc GL2GL3 /**
ClassJavadoc GL2GL3 *
-ClassJavadoc GL2GL3 * Interface containing the common subset of GL3 and GL2.
+ClassJavadoc GL2GL3 * Interface containing the common subset of GL3 (OpenGL 3.1+) and GL2 (OpenGL 3.0),
+ClassJavadoc GL2GL3 * also known as the OpenGL 3.0 forward compatible, non deprecated subset.
ClassJavadoc GL2GL3 * This interface reflects only the programmable shader functionality of desktop OpenGL
ClassJavadoc GL2GL3 *
ClassJavadoc GL2GL3 */
@@ -596,15 +597,21 @@ ClassJavadoc GL2 * This interface contains all core desktop OpenGL methods thro
ClassJavadoc GL2 * version 3.0, inclusive, as well as most of it's extensions defined at the
ClassJavadoc GL2 * time of this specification. Early OpenGL extensions whose functionality
ClassJavadoc GL2 * was incorporated into core OpenGL by version 3.0, inclusive, are specifically
-ClassJavadoc GL2 * excluded.
+ClassJavadoc GL2 * excluded.
+ClassJavadoc GL2 * Note: OpenGL 3.0 is the last subsumed version in the specification.
+ClassJavadoc GL2 * You need to use a {@link GL3} OpenGL 3.1+ context to benefit
+ClassJavadoc GL2 * from new functionality and versions.
ClassJavadoc GL2 *
ClassJavadoc GL2 */
ClassJavadoc GL3 /**
ClassJavadoc GL3 *
ClassJavadoc GL3 * This interface contains all core desktop OpenGL methods starting from 3.1,
-ClassJavadoc GL3 * inclusive - forward compatible only, as well as most of it's extensions defined at the
+ClassJavadoc GL3 * inclusive - forward compatible, as well as most of it's extensions defined at the
ClassJavadoc GL3 * time of this specification.
+ClassJavadoc GL3 * Note: OpenGL 3.0 forward compatible, non deprecated functionality is included in the
+ClassJavadoc GL3 * 3.1 specification, hence the {@link GL2GL3} implemented interface.
+ClassJavadoc GL3 * Note: OpenGL 3.1 (forward compatible) no more includes fixed point functionality.
ClassJavadoc GL3 *
ClassJavadoc GL3 */
diff --git a/make/doc/jogl/spec-overview.html b/make/doc/jogl/spec-overview.html
index f79e5ff23..6557e9f7a 100644
--- a/make/doc/jogl/spec-overview.html
+++ b/make/doc/jogl/spec-overview.html
@@ -55,6 +55,9 @@ version 3.0, inclusive, as well as most of it's extensions defined at the
time of this specification. Early OpenGL extensions whose functionality
was incorporated into core OpenGL by version 3.0, inclusive, are specifically
excluded.
+ Note: OpenGL 3.0 is the last subsumed version in the specification.
+ You need to use a {@link javax.media.opengl.GL3} OpenGL 3.1+ context to benefit
+ from new functionality and versions.
Future extensions will be added with a maintenance update
{@link javax.media.opengl.GL3 javax.media.opengl.GL3} interface
@@ -62,6 +65,9 @@ excluded.
This interface contains all core desktop OpenGL methods starting from 3.1,
inclusive - forward compatible only, as well as most of it's extensions defined at the
time of this specification.
+ Note: OpenGL 3.0 forward compatible, non deprecated functionality is included in the
+ 3.1 specification, hence the {@link javax.media.opengl.GL2GL3} implemented interface.
+ Note: OpenGL 3.1 (forward compatible) no more includes fixed point functionality.
Future extensions will be added with a maintenance update
{@link javax.media.opengl.GLES1 javax.media.opengl.GLES1} interface
@@ -105,7 +111,8 @@ time of this specification.
{@link javax.media.opengl.GL2GL3 javax.media.opengl.GL2GL3} interface
- Interface containing the common subset of GL3 and GL2.
+ Interface containing the common subset of GL3 (OpenGL 3.1+) and GL2 (OpenGL 2.0),
+ also known as the OpenGL 3.0 forward compatible, non deprecated subset.
This interface reflects only the programmable shader functionality of desktop OpenGL
diff --git a/src/jogl/classes/com/sun/opengl/impl/ExtensionAvailabilityCache.java b/src/jogl/classes/com/sun/opengl/impl/ExtensionAvailabilityCache.java
index 7931f791b..26072519e 100644
--- a/src/jogl/classes/com/sun/opengl/impl/ExtensionAvailabilityCache.java
+++ b/src/jogl/classes/com/sun/opengl/impl/ExtensionAvailabilityCache.java
@@ -212,19 +212,16 @@ public final class ExtensionAvailabilityCache {
}
switch (major) {
- case 2:
- if(gl.isGL3() && major==2) {
+ case 3:
+ if(gl.isGL3()) {
// GL3 is a GL 3.1 forward compatible context,
// hence no 2.0, 1.0 - 1.5 GL versions are supported.
major=0;
- } else {
- // make sure 2.0 is added ..
- minor = 0;
- availableExtensionCache.add("GL_VERSION_" + major + "_" + minor);
- if (DEBUG) {
- System.err.println("ExtensionAvailabilityCache: Added GL_VERSION_" + major + "_" + minor + " to known extensions");
- }
}
+ // Restart loop at version 2.1
+ minor = 1;
+ break;
+ case 2:
// Restart loop at version 1.5
minor = 5;
break;
--
cgit v1.2.3
From 363fe8afc173ec9bf7fda4f863ddd14cd5ceabb5 Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Sun, 2 Aug 2009 04:54:41 -0700
Subject: Fix doc bug @arg -> @param
---
make/config/jogl/gl-common.cfg | 2 +-
make/doc/jogl/spec-overview.html | 2 +-
.../classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java | 2 +-
src/jogl/classes/com/sun/opengl/util/GLArrayDataClient.java | 10 +++++-----
src/jogl/classes/com/sun/opengl/util/GLArrayDataServer.java | 10 +++++-----
src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java | 4 ++--
src/jogl/classes/javax/media/opengl/GLDrawableFactory.java | 2 +-
src/jogl/classes/javax/media/opengl/GLPipelineFactory.java | 10 +++++-----
src/jogl/classes/javax/media/opengl/GLUniformData.java | 12 ++++++------
9 files changed, 27 insertions(+), 27 deletions(-)
(limited to 'make/doc')
diff --git a/make/config/jogl/gl-common.cfg b/make/config/jogl/gl-common.cfg
index 7cf51fda5..3df9cc852 100644
--- a/make/config/jogl/gl-common.cfg
+++ b/make/config/jogl/gl-common.cfg
@@ -611,7 +611,7 @@ ClassJavadoc GL3 * inclusive - forward compatible, as well as most of it's exte
ClassJavadoc GL3 * time of this specification.
ClassJavadoc GL3 * Note: OpenGL 3.0 forward compatible, non deprecated functionality is included in the
ClassJavadoc GL3 * 3.1 specification, hence the {@link GL2GL3} implemented interface.
-ClassJavadoc GL3 * Note: OpenGL 3.1 (forward compatible) no more includes fixed point functionality.
+ClassJavadoc GL3 * Note: OpenGL 3.1 forward compatible no more includes fixed point functionality.
ClassJavadoc GL3 *
ClassJavadoc GL3 */
diff --git a/make/doc/jogl/spec-overview.html b/make/doc/jogl/spec-overview.html
index 6557e9f7a..89b4ac7c8 100644
--- a/make/doc/jogl/spec-overview.html
+++ b/make/doc/jogl/spec-overview.html
@@ -67,7 +67,7 @@ inclusive - forward compatible only, as well as most of it's extensions defined
time of this specification.
Note: OpenGL 3.0 forward compatible, non deprecated functionality is included in the
3.1 specification, hence the {@link javax.media.opengl.GL2GL3} implemented interface.
- Note: OpenGL 3.1 (forward compatible) no more includes fixed point functionality.
+ Note: OpenGL 3.1 forward compatible no more includes fixed point functionality.
Future extensions will be added with a maintenance update
{@link javax.media.opengl.GLES1 javax.media.opengl.GLES1} interface
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java b/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
index de911950a..0d540647a 100644
--- a/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
+++ b/src/jogl/classes/com/sun/opengl/impl/GLDrawableFactoryImpl.java
@@ -69,7 +69,7 @@ public abstract class GLDrawableFactoryImpl extends GLDrawableFactory {
/**
* Returns the sole GLDrawableFactoryImpl instance.
*
- * @arg glProfile GLProfile to determine the factory type, ie EGLDrawableFactory,
+ * @param glProfile GLProfile to determine the factory type, ie EGLDrawableFactory,
* or one of the native GLDrawableFactory's, ie X11/GLX, Windows/WGL or MacOSX/CGL.
*/
public static GLDrawableFactoryImpl getFactoryImpl(GLProfile glp) {
diff --git a/src/jogl/classes/com/sun/opengl/util/GLArrayDataClient.java b/src/jogl/classes/com/sun/opengl/util/GLArrayDataClient.java
index e05a77226..ec4c5e393 100644
--- a/src/jogl/classes/com/sun/opengl/util/GLArrayDataClient.java
+++ b/src/jogl/classes/com/sun/opengl/util/GLArrayDataClient.java
@@ -27,13 +27,13 @@ public class GLArrayDataClient extends GLArrayDataWrapper implements GLArrayData
}) != null;
/**
- * @arg index The GL array index
- * @arg name The optional custom name for the GL array index, maybe null.
+ * @param index The GL array index
+ * @param name The optional custom name for the GL array index, maybe null.
* If null, the default name mapping will be used, see 'getPredefinedArrayIndexName(int)'.
* This name might be used as the shader attribute name.
- * @arg comps The array component number
- * @arg dataType The array index GL data type
- * @arg normalized Wheather the data shall be normalized
+ * @param comps The array component number
+ * @param dataType The array index GL data type
+ * @param normalized Wheather the data shall be normalized
*
* @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
*/
diff --git a/src/jogl/classes/com/sun/opengl/util/GLArrayDataServer.java b/src/jogl/classes/com/sun/opengl/util/GLArrayDataServer.java
index e9a5e2754..dc233ce36 100644
--- a/src/jogl/classes/com/sun/opengl/util/GLArrayDataServer.java
+++ b/src/jogl/classes/com/sun/opengl/util/GLArrayDataServer.java
@@ -21,13 +21,13 @@ public class GLArrayDataServer extends GLArrayDataClient implements GLArrayDataE
* EnableVertexAttribArray and VertexAttribPointer calls,
* and a predefined vertex attribute variable name will be choosen.
*
- * @arg index The GL array index
- * @arg name The optional custom name for the GL array index, maybe null.
+ * @param index The GL array index
+ * @param name The optional custom name for the GL array index, maybe null.
* If null, the default name mapping will be used, see 'getPredefinedArrayIndexName(int)'.
* This name might be used as the shader attribute name.
- * @arg comps The array component number
- * @arg dataType The array index GL data type
- * @arg normalized Wheather the data shall be normalized
+ * @param comps The array component number
+ * @param dataType The array index GL data type
+ * @param normalized Wheather the data shall be normalized
*
* @see javax.media.opengl.GLContext#getPredefinedArrayIndexName(int)
*/
diff --git a/src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java b/src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java
index d8f6eeea2..8712ac7e2 100644
--- a/src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java
+++ b/src/jogl/classes/com/sun/opengl/util/glsl/ShaderState.java
@@ -318,7 +318,7 @@ public class ShaderState {
* Even if the attribute is not found in the current shader,
* it is stored in this state.
*
- * @arg data the GLArrayData's name must match the attributes one,
+ * @param data the GLArrayData's name must match the attributes one,
* it's index will be set with the attribute's location,
* if found.
*
@@ -549,7 +549,7 @@ public class ShaderState {
* Even if the uniform is not found in the current shader,
* it is stored in this state.
*
- * @arg data the GLUniforms's name must match the uniform one,
+ * @param data the GLUniforms's name must match the uniform one,
* it's index will be set with the uniforms's location,
* if found.
*
diff --git a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
index 5a761119f..1a18a60f8 100644
--- a/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLDrawableFactory.java
@@ -148,7 +148,7 @@ public abstract class GLDrawableFactory {
/**
* Returns the sole GLDrawableFactory instance.
*
- * @arg glProfile GLProfile to determine the factory type, ie EGLDrawableFactory,
+ * @param glProfile GLProfile to determine the factory type, ie EGLDrawableFactory,
* or one of the native GLDrawableFactory's, ie X11/GLX, Windows/WGL or MacOSX/CGL.
*/
public static GLDrawableFactory getFactory(GLProfile glProfile) throws GLException {
diff --git a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
index 9aceb2c53..63b50cb3c 100644
--- a/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
+++ b/src/jogl/classes/javax/media/opengl/GLPipelineFactory.java
@@ -54,7 +54,7 @@ public class GLPipelineFactory {
* The upstream GL instance is determined as follows:
*
* - Use
pipelineClazzBaseName
as the class name's full basename, incl. package name
- * - For the
downstream
classe and it's superclasses, do:
+ * - For the
downstream
class and it's superclasses, do:
*
* - For all
downstream
class and superclass interfaces, do:
*
@@ -65,10 +65,10 @@ public class GLPipelineFactory {
*
*
*
- * @arg pipelineClazzBaseName the basename of the pipline class name
- * @arg reqInterface optional requested interface to be used, may be null, in which case the first matching one is used
- * @arg downstream is always the 1st argument for the upstream constructor
- * @arg additionalArgs additional arguments for the upstream constructor
+ * @param pipelineClazzBaseName the basename of the pipline class name
+ * @param reqInterface optional requested interface to be used, may be null, in which case the first matching one is used
+ * @param downstream is always the 1st argument for the upstream constructor
+ * @param additionalArgs additional arguments for the upstream constructor
*/
public static final GL create(String pipelineClazzBaseName, Class reqInterface, GL downstream, Object[] additionalArgs) {
Class downstreamClazz = downstream.getClass();
diff --git a/src/jogl/classes/javax/media/opengl/GLUniformData.java b/src/jogl/classes/javax/media/opengl/GLUniformData.java
index 8b5fb1a03..f628ce35a 100644
--- a/src/jogl/classes/javax/media/opengl/GLUniformData.java
+++ b/src/jogl/classes/javax/media/opengl/GLUniformData.java
@@ -10,7 +10,7 @@ public class GLUniformData {
*
* Number of objects is 1
*
- * @arg components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
+ * @param components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
*/
public GLUniformData(String name, int val) {
init(name, 1, new Integer(val));
@@ -21,7 +21,7 @@ public class GLUniformData {
*
* Number of objects is 1
*
- * @arg components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
+ * @param components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
*/
public GLUniformData(String name, float val) {
init(name, 1, new Float(val));
@@ -32,7 +32,7 @@ public class GLUniformData {
*
* Number of objects is calculated by data.limit()/components
*
- * @arg components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
+ * @param components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
*/
public GLUniformData(String name, int components, IntBuffer data) {
init(name, components, data);
@@ -43,7 +43,7 @@ public class GLUniformData {
*
* Number of objects is calculated by data.limit()/components
*
- * @arg components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
+ * @param components number of elements of one object, ie 4 for GL_FLOAT_VEC4,
*/
public GLUniformData(String name, int components, FloatBuffer data) {
init(name, components, data);
@@ -54,8 +54,8 @@ public class GLUniformData {
*
* Number of objects is calculated by data.limit()/(rows*columns)
*
- * @arg rows the matrix rows
- * @arg column the matrix column
+ * @param rows the matrix rows
+ * @param column the matrix column
*/
public GLUniformData(String name, int rows, int columns, FloatBuffer data) {
init(name, rows, columns, data);
--
cgit v1.2.3
From 19e49d093adf2c13587d5cc016438f9caed1576a Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Sun, 2 Aug 2009 06:40:46 -0700
Subject: Fix Spec Documentation; GL version, inclusion criteria and
requirements
---
make/doc/jogl/spec-overview.html | 105 +++++++++++++++++++++++++++------------
1 file changed, 74 insertions(+), 31 deletions(-)
(limited to 'make/doc')
diff --git a/make/doc/jogl/spec-overview.html b/make/doc/jogl/spec-overview.html
index 89b4ac7c8..37f0caa00 100644
--- a/make/doc/jogl/spec-overview.html
+++ b/make/doc/jogl/spec-overview.html
@@ -11,11 +11,14 @@
This specification, an optional set of packages, describes the Java(TM)
bindings to the native OpenGL(R) 3D graphics library profiles:
- - Desktop OpenGL 1.x, 2.y and 3.0, with x >= 3 and y >= 0
+ - Desktop OpenGL 1.0 - 3.0
- Desktop OpenGL 3.x, with x >= 1
- Embedded OpenGL ES 1.x, with x >= 0
- Embedded OpenGL ES 2.x, with x >= 0
+ See Inclusion Criteria explaining the OpenGL profile seperation.
+ See OpenGL Runtime Requirements.
+
A binding to the native OpenCL(R) library is not yet specified, but intended to be
included in a maintenance update.
@@ -46,8 +49,22 @@ bindings to the native OpenGL(R) 3D graphics library profiles:
- The javax.media.opengl package
This package contains all Java bindings for all OpenGL profiles.
+ See Inclusion Criteria explaining the OpenGL profile seperation.
+ See OpenGL Runtime Requirements.
The main OpenGL profile interfaces are:
+ - {@link javax.media.opengl.GL3 javax.media.opengl.GL3} interface
+
+ This interface contains all core desktop OpenGL methods starting from 3.1,
+inclusive - forward compatible only, as well as most of it's extensions defined at the
+time of this specification.
+ Note: OpenGL 3.0 forward compatible, non deprecated functionality is included in the
+ 3.1 specification, hence the {@link javax.media.opengl.GL2GL3} implemented interface.
+ Note: OpenGL 3.1 forward compatible no more includes fixed point functionality.
+ See GL3 Inclusion Criteria.
+ See GL3 Runtime Requirements.
+ Future extensions will be added with a maintenance update
+
- {@link javax.media.opengl.GL2 javax.media.opengl.GL2} interface
This interface contains all core desktop OpenGL methods through
@@ -58,16 +75,8 @@ excluded.
Note: OpenGL 3.0 is the last subsumed version in the specification.
You need to use a {@link javax.media.opengl.GL3} OpenGL 3.1+ context to benefit
from new functionality and versions.
- Future extensions will be added with a maintenance update
-
- - {@link javax.media.opengl.GL3 javax.media.opengl.GL3} interface
-
- This interface contains all core desktop OpenGL methods starting from 3.1,
-inclusive - forward compatible only, as well as most of it's extensions defined at the
-time of this specification.
- Note: OpenGL 3.0 forward compatible, non deprecated functionality is included in the
- 3.1 specification, hence the {@link javax.media.opengl.GL2GL3} implemented interface.
- Note: OpenGL 3.1 forward compatible no more includes fixed point functionality.
+ See GL2 Inclusion Criteria.
+ See GL2 Runtime Requirements.
Future extensions will be added with a maintenance update
- {@link javax.media.opengl.GLES1 javax.media.opengl.GLES1} interface
@@ -305,29 +314,55 @@ between two GLContexts associated with the same GLDrawable.
Criteria Used for Inclusion of APIs into the Java Bindings
+
OpenGL API Inclusion Criteria
OpenGL functions and OpenGL extensions have been included in the Java bindings
according the following rules:
- -
-
- All functions in core OpenGL 3.0, inclusive, have been included.
- - If the functionality of the OpenGL extension was subsumed into core
-OpenGL by version 3.0, then the extension was dropped from the Java bindings.
- However, if the core function name is not available in the native OpenGL implementation,
- the extension named equivalent is used instead, e.g. GL_ARB_framebuffer_object.
- In general the native method name will be looked up as follows
-
- - Try the interface name
- - Try the extension name: ARB, EXT, ..
-
- - Functions that deal with explicit pointer values in such a way that
+
+
- {@link javax.media.opengl.GL3 javax.media.opengl.GL3} interface
+
+ - All functions in core OpenGL 3.1 - forward compatible, inclusive, have been included,
+ as described in the header files
GL3/gl3.h
.
+ - Reason for starting a new profile beginning with 3.1 are:
+
+ - OpenGL 3.1 requires a new native context, incompatible with prior versions.
+ - OpenGL 3.1 forward compatible profile drops fixed functionality.
+
+ - Forward compatibility, dropping fixed functionality, is choosen because:
+
+ - It shares a commont subset with ES2.x
+ - It is not guaranteed to be provided by all vendors.
+ - It is not guaranteed to be provided in future versions.
+
+
+
+ - {@link javax.media.opengl.GL2 javax.media.opengl.GL2} interface
+
+ - All functions in core OpenGL 3.0, inclusive, have been included.
+ - Reason for making the cut at OpenGL 3.0 are:
+
+ - Availability of 3.0 with the same native context.
+ - Availability of 3.0 via extensions.
+
+ - If the functionality of the OpenGL extension was subsumed into core
+ OpenGL by version 3.0, then the extension was dropped from the Java bindings.
+ However, if the core function name is not available in the native OpenGL implementation,
+ the extension named equivalent is used instead, e.g. GL_ARB_framebuffer_object.
+ - In general the native method name will be looked up as follows
+
+ - Try the interface name
+ - Try the extension name: ARB, EXT, ..
+
+
+ - Functions that deal with explicit pointer values in such a way that
they cannot be properly implemented in Java have been excluded. This
includes retrieval methods with a C void ** in the OpenGL signature like glGetBufferPointerv,
glGetPointerv, glGetVertexAttribPointerv, as well as functions that require
persistent pointer to pointer storage across function calls like vertex array
lists.
- - If the extension is registered in the official OpenGL extension registry
+
- If the extension is registered in the official OpenGL extension registry
but the specification was never completed or was discontinued (as indicated
in the specification and/or lack of inclusion in SGI's official OpenGL header
files), then the extension was not included. Using these criteria, ARB
@@ -335,15 +370,14 @@ extensions through number 42 (GL_ARB_pixel_buffer_object), inclusive, and
non-ARB extensions through number 311 (GL_REMEDY_string_marker), inclusive,
have been included in the Java bindings according to the numbering scheme
found in the official OpenGL extension registry.
- - Some bindings to several vendor-specific extensions have been included
+
- Some bindings to several vendor-specific extensions have been included
that are not found in the OpenGL extension registry. These extensions
were deemed popular enough and/or were specifically requested by users.
- - Platform-specific extensions, such as those that begin with WGL, GLX,
+
- Platform-specific extensions, such as those that begin with WGL, GLX,
CGL, etc., have been excluded from the public API. See the section "Accessing
platform-specific extensions" for more information about accessing these
functions on certain implementations.
-
-
+
OpenGL GLU API Inclusion Criteria
@@ -380,7 +414,14 @@ implementation.
Therefore, any usage of these APIs is both platform and implementation specific.
+
OpenGL Version on Runtime System
+
+ {@link javax.media.opengl.GL3 GL3} Desktop Requirements
+An OpenGL ≥ 3.1 version is required to instantiate a GL3 context.
+
+
+ {@link javax.media.opengl.GL2 GL2} Desktop Requirements
Even though OpenGL extensions whose functionality was included into core
OpenGL by version 3.0, inclusive, are not included in the bindings, it should
be noted that OpenGL version 3.0 is not an absolute requirement on the runtime
@@ -388,13 +429,15 @@ system. This is because a user could query whether any particular function
is available before calling certain core APIs that might not be present.
Also, if the core function name is not available in the native OpenGL implementation,
the extension named equivalent is used instead, e.g. GL_ARB_framebuffer_object.
-However, in general, it is reasonable to expect at least OpenGL 2.0 to be
+However, in general, it is reasonable to expect at least OpenGL 1.5 to be
installed on the runtime system and an implementor of the API is free to require
-the presence of at least OpenGL 2.0 on the target system.
+the presence of at least OpenGL 1.5 on the target system.
+The JOGL reference implementation require at least OpenGL version 1.1,
+due to it's dynamical function binding starting with OpenGL 1.2.
In future revisions of the API, this minimum standard may be raised.
-
+
Runtime Version Information
Any Java Bindings for OpenGL implementation should include version information
in its jar manifest file. This information can then easily be accessed
--
cgit v1.2.3
From 733d54f7e2977c20e373eba50b9cd16966a4fb77 Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Mon, 3 Aug 2009 10:48:58 -0700
Subject: Doc: OpenGL 3.1 .. 3.2 profile clarification
---
make/config/jogl/gl-common.cfg | 5 ++---
make/doc/jogl/spec-overview.html | 19 ++++++++++++++-----
2 files changed, 16 insertions(+), 8 deletions(-)
(limited to 'make/doc')
diff --git a/make/config/jogl/gl-common.cfg b/make/config/jogl/gl-common.cfg
index 935bf6664..efa4c7bdd 100644
--- a/make/config/jogl/gl-common.cfg
+++ b/make/config/jogl/gl-common.cfg
@@ -605,9 +605,8 @@ ClassJavadoc GL2 */
ClassJavadoc GL3 /**
ClassJavadoc GL3 *
-ClassJavadoc GL3 * This interface contains all core desktop OpenGL methods starting from 3.1,
-ClassJavadoc GL3 * inclusive - forward compatible, as well as most of it's extensions defined at the
-ClassJavadoc GL3 * time of this specification.
+ClassJavadoc GL3 * This interface contains all core, forward compatible, OpenGL methods starting from 3.1,
+ClassJavadoc GL3 * inclusive, as well as most of it's extensions defined at the time of this specification.
ClassJavadoc GL3 * Note: OpenGL 3.0 forward compatible, non deprecated functionality is included in the
ClassJavadoc GL3 * 3.1 specification, hence the {@link GL2GL3} implemented interface.
ClassJavadoc GL3 * Note: OpenGL 3.1 forward compatible no more includes fixed point functionality.
diff --git a/make/doc/jogl/spec-overview.html b/make/doc/jogl/spec-overview.html
index 37f0caa00..f2c0c0339 100644
--- a/make/doc/jogl/spec-overview.html
+++ b/make/doc/jogl/spec-overview.html
@@ -12,7 +12,7 @@
bindings to the native OpenGL(R) 3D graphics library profiles:
- Desktop OpenGL 1.0 - 3.0
- - Desktop OpenGL 3.x, with x >= 1
+ - Desktop OpenGL 3.x, with x >= 1, forward compatible, core profile
- Embedded OpenGL ES 1.x, with x >= 0
- Embedded OpenGL ES 2.x, with x >= 0
@@ -55,9 +55,8 @@ bindings to the native OpenGL(R) 3D graphics library profiles:
- {@link javax.media.opengl.GL3 javax.media.opengl.GL3} interface
- This interface contains all core desktop OpenGL methods starting from 3.1,
-inclusive - forward compatible only, as well as most of it's extensions defined at the
-time of this specification.
+ This interface contains all core, forward compatible, OpenGL methods starting from 3.1,
+inclusive, as well as most of it's extensions defined at the time of this specification.
Note: OpenGL 3.0 forward compatible, non deprecated functionality is included in the
3.1 specification, hence the {@link javax.media.opengl.GL2GL3} implemented interface.
Note: OpenGL 3.1 forward compatible no more includes fixed point functionality.
@@ -323,7 +322,7 @@ according the following rules:
- {@link javax.media.opengl.GL3 javax.media.opengl.GL3} interface
- - All functions in core OpenGL 3.1 - forward compatible, inclusive, have been included,
+
- All functions in core, forward compatible, OpenGL 3.1, inclusive, have been included,
as described in the header files
GL3/gl3.h
.
- Reason for starting a new profile beginning with 3.1 are:
@@ -335,6 +334,7 @@ according the following rules:
- It shares a commont subset with ES2.x
- It is not guaranteed to be provided by all vendors.
- It is not guaranteed to be provided in future versions.
+ - OpenGL 3.2 core profile is compatible with OpenGL 3.1 forward compatible spec.
@@ -469,6 +469,15 @@ javax.media.opengl namespace via future maintenance updates to the API.
href="http://www.khronos.org/registry/cl/">
http://www.khronos.org/registry/cl/
+
+ - OpenGL 3.2 Core Specification
+
+
+
+
+http://www.opengl.org/registry/doc/glspec32.core.20090803.pdf
+
- OpenGL 3.1 Specification
--
cgit v1.2.3
From 33c4fbf49ff5d91925d3653dd5d5f034825954e7 Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Mon, 3 Aug 2009 13:18:17 -0700
Subject: Doc: OpenGL 3.1 .. 3.2 profile clarification
GLX_ARB_create_context: Add 3.2 context
WGL_ARB_create_context: Add 3.2 context
Add: Trying to use 3.2 core profile creation for GL3,
disabled by default.
(Disabled per default due to a freezing JVM on Linux
_after_ the Java main thread and Hotspot finishes.)
Experimental: You may try '3.2 core profile creation'
setting the java system property 'jogl.GLContext.3_2'.
---
make/doc/jogl/spec-overview.html | 3 +-
make/stub_includes/opengl/GL/glxext.h | 7 +-
make/stub_includes/opengl/GL/wglext.h | 7 +-
.../classes/com/sun/opengl/impl/GLContextImpl.java | 1 +
.../opengl/impl/windows/wgl/WindowsWGLContext.java | 81 ++++++++++++++--------
.../com/sun/opengl/impl/x11/glx/X11GLXContext.java | 76 ++++++++++++++------
6 files changed, 120 insertions(+), 55 deletions(-)
(limited to 'make/doc')
diff --git a/make/doc/jogl/spec-overview.html b/make/doc/jogl/spec-overview.html
index f2c0c0339..5d4779c57 100644
--- a/make/doc/jogl/spec-overview.html
+++ b/make/doc/jogl/spec-overview.html
@@ -329,12 +329,13 @@ according the following rules:
- OpenGL 3.1 requires a new native context, incompatible with prior versions.
- OpenGL 3.1 forward compatible profile drops fixed functionality.
- - Forward compatibility, dropping fixed functionality, is choosen because:
+
- Forward compatibility, aka core, ie a context without
GL_ARB_compatibility
, is chosen because:
- It shares a commont subset with ES2.x
- It is not guaranteed to be provided by all vendors.
- It is not guaranteed to be provided in future versions.
- OpenGL 3.2 core profile is compatible with OpenGL 3.1 forward compatible spec.
+ - OpenGL 3.2 Spec Appendix E.1: It is not possible to implement both core and compatibility profiles in a single GL context, ..
diff --git a/make/stub_includes/opengl/GL/glxext.h b/make/stub_includes/opengl/GL/glxext.h
index 2d6036bcd..2ed99a824 100644
--- a/make/stub_includes/opengl/GL/glxext.h
+++ b/make/stub_includes/opengl/GL/glxext.h
@@ -77,11 +77,14 @@ extern "C" {
#endif
#ifndef GLX_ARB_create_context
-#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001
-#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
+#define GLX_CONTEXT_DEBUG_BIT_ARB 0x00000001
+#define GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
+#define GLX_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
+#define GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
#define GLX_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define GLX_CONTEXT_MINOR_VERSION_ARB 0x2092
#define GLX_CONTEXT_FLAGS_ARB 0x2094
+#define GLX_CONTEXT_PROFILE_MASK_ARB 0x9126
#endif
#ifndef GLX_SGIS_multisample
diff --git a/make/stub_includes/opengl/GL/wglext.h b/make/stub_includes/opengl/GL/wglext.h
index 6f367c09b..d581756c2 100644
--- a/make/stub_includes/opengl/GL/wglext.h
+++ b/make/stub_includes/opengl/GL/wglext.h
@@ -190,12 +190,15 @@ extern "C" {
#endif
#ifndef WGL_ARB_create_context
+#define WGL_CONTEXT_DEBUG_BIT_ARB 0x00000001
+#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x00000002
+#define WGL_CONTEXT_CORE_PROFILE_BIT_ARB 0x00000001
+#define WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB 0x00000002
#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091
#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092
#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093
#define WGL_CONTEXT_FLAGS_ARB 0x2094
-#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001
-#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002
+#define WGL_CONTEXT_PROFILE_MASK_ARB 0x9126
#define ERROR_INVALID_VERSION_ARB 0x2095
#endif
diff --git a/src/jogl/classes/com/sun/opengl/impl/GLContextImpl.java b/src/jogl/classes/com/sun/opengl/impl/GLContextImpl.java
index 16eb934bd..d1a35b1b6 100644
--- a/src/jogl/classes/com/sun/opengl/impl/GLContextImpl.java
+++ b/src/jogl/classes/com/sun/opengl/impl/GLContextImpl.java
@@ -61,6 +61,7 @@ public abstract class GLContextImpl extends GLContext {
// platforms anyway in particular with the disabling of the
// GLWorkerThread which we found to be necessary in 1.0 beta 4.
protected boolean optimizationEnabled = Debug.isPropertyDefined("jogl.GLContext.optimize", true);
+ protected boolean tryGLContext3_2 = Debug.isPropertyDefined("jogl.GLContext.3_2", true);
// Cache of the functions that are available to be called at the current
// moment in time
diff --git a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java
index 6d810ed39..008dd6ac2 100644
--- a/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java
+++ b/src/jogl/classes/com/sun/opengl/impl/windows/wgl/WindowsWGLContext.java
@@ -154,13 +154,9 @@ public class WindowsWGLContext extends GLContextImpl {
if( !isFunctionAvailable("wglCreateContextAttribsARB") ||
!isExtensionAvailable("WGL_ARB_create_context") ) {
if(glCaps.getGLProfile().isGL3()) {
- if (!WGL.wglMakeCurrent(0, 0)) {
- throw new GLException("Error freeing temp OpenGL context: " + WGL.GetLastError());
- }
- if (!WGL.wglDeleteContext(temp_hglrc)) {
- throw new GLException("Unable to delete OpenGL context");
- }
- throw new GLException("Unable to create OpenGL 3.1 context (no WGL_ARB_create_context)");
+ WGL.wglMakeCurrent(0, 0);
+ WGL.wglDeleteContext(temp_hglrc);
+ throw new GLException("Unable to create OpenGL >= 3.1 context (no WGL_ARB_create_context)");
}
// continue with temp context for GL < 3.0
@@ -173,44 +169,71 @@ public class WindowsWGLContext extends GLContextImpl {
// preset with default values
int attribs[] = {
- WGLExt.WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
- WGLExt.WGL_CONTEXT_MINOR_VERSION_ARB, 0,
- WGLExt.WGL_CONTEXT_FLAGS_ARB, 0,
- 0
+ /* 0 */ WGLExt.WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
+ /* 2 */ WGLExt.WGL_CONTEXT_MINOR_VERSION_ARB, 0,
+ /* 4 */ WGLExt.WGL_CONTEXT_FLAGS_ARB, 0 /* WGLExt.WGL_CONTEXT_DEBUG_BIT_ARB */,
+ /* 6 */ 0, 0,
+ /* 8 */ 0
};
if(glCaps.getGLProfile().isGL3()) {
- attribs[1] |= 3;
- attribs[3] |= 1;
- // attribs[5] |= WGLExt.WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB ; // NVidia WGL driver doesn't support this one ..
- // attribs[5] |= WGLExt.WGL_CONTEXT_DEBUG_BIT_ARB ;
+ if(tryGLContext3_2) {
+ // Try >= 3.2 core first !
+ // and verify with a None drawable binding (default framebuffer)
+ attribs[0+1] = 3;
+ attribs[2+1] = 2;
+ attribs[6+0] = WGLExt.WGL_CONTEXT_PROFILE_MASK_ARB;
+ attribs[6+1] = WGLExt.WGL_CONTEXT_CORE_PROFILE_BIT_ARB;
+ hglrc = wglExt.wglCreateContextAttribsARB(drawable.getNativeWindow().getSurfaceHandle(), hglrc2, attribs, 0);
+ if(0!=hglrc) {
+ if (!WGL.wglMakeCurrent(0, hglrc)) {
+ if(DEBUG) {
+ System.err.println("WindowsWGLContext.createContext couldn't make >= 3.2 core context current - fallback");
+ }
+ WGL.wglMakeCurrent(0, 0);
+ WGL.wglDeleteContext(hglrc);
+ hglrc = 0;
+ } else if(DEBUG) {
+ System.err.println("WindowsWGLContext.createContext >= 3.2 available 0x"+Long.toHexString(hglrc));
+ }
+ }
+ }
+ if(0==hglrc) {
+ if(tryGLContext3_2 && DEBUG) {
+ System.err.println("WindowsWGLContext.createContext couldn't create >= 3.2 core context");
+ }
+ // Try >= 3.1 forward compatible - last resort for GL3 !
+ attribs[0+1] = 3;
+ attribs[2+1] = 1;
+ attribs[4+1] |= WGLExt.WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
+ attribs[6+0] = 0;
+ attribs[6+1] = 0;
+ }
+ }
+ if(0==hglrc) {
+ // 3.1 or 3.0 ..
+ hglrc = wglExt.wglCreateContextAttribsARB(drawable.getNativeWindow().getSurfaceHandle(), hglrc2, attribs, 0);
}
- hglrc = wglExt.wglCreateContextAttribsARB(drawable.getNativeWindow().getSurfaceHandle(), hglrc2, attribs, 0);
if(0==hglrc) {
if(glCaps.getGLProfile().isGL3()) {
- if (!WGL.wglMakeCurrent(0, 0)) {
- throw new GLException("Error freeing temp OpenGL context: " + WGL.GetLastError());
- }
- if (!WGL.wglDeleteContext(temp_hglrc)) {
- throw new GLException("Unable to delete OpenGL context");
- }
- throw new GLException("Unable to create OpenGL 3.1 context (have WGL_ARB_create_context)");
+ WGL.wglMakeCurrent(0, 0);
+ WGL.wglDeleteContext(temp_hglrc);
+ throw new GLException("Unable to create OpenGL >= 3.1 context (have WGL_ARB_create_context)");
}
// continue with temp context for GL < 3.0
hglrc = temp_hglrc;
+ if (!WGL.wglMakeCurrent(drawable.getNativeWindow().getSurfaceHandle(), hglrc)) {
+ throw new GLException("Error making old context current: " + WGL.GetLastError());
+ }
if(DEBUG) {
System.err.println("WindowsWGLContext.create done (old ctx < 3.0 - no 3.0) 0x"+Long.toHexString(hglrc));
}
} else {
hglrc2 = 0; // mark as shared ..
- if (!WGL.wglMakeCurrent(0, 0)) {
- throw new GLException("Error freeing temp OpenGL context: " + WGL.GetLastError());
- }
- if (!WGL.wglDeleteContext(temp_hglrc)) {
- throw new GLException("Unable to delete temp OpenGL context");
- }
+ WGL.wglMakeCurrent(0, 0);
+ WGL.wglDeleteContext(temp_hglrc);
if (!WGL.wglMakeCurrent(drawable.getNativeWindow().getSurfaceHandle(), hglrc)) {
throw new GLException("Error making new context current: " + WGL.GetLastError());
diff --git a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
index da1548d0d..6513fbe29 100644
--- a/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
+++ b/src/jogl/classes/com/sun/opengl/impl/x11/glx/X11GLXContext.java
@@ -142,7 +142,7 @@ public abstract class X11GLXContext extends GLContextImpl {
if(config.getFBConfigID()<0) {
// not able to use FBConfig
if(glCaps.getGLProfile().isGL3()) {
- throw new GLException("Unable to create OpenGL 3.1 context");
+ throw new GLException("Unable to create OpenGL >= 3.1 context");
}
context = GLX.glXCreateContext(display, config.getXVisualInfo(), share, direct);
if (context == 0) {
@@ -178,11 +178,9 @@ public abstract class X11GLXContext extends GLContextImpl {
if( !isFunctionAvailable("glXCreateContextAttribsARB") ||
!isExtensionAvailable("GLX_ARB_create_context") ) {
if(glCaps.getGLProfile().isGL3()) {
- if (!GLX.glXMakeContextCurrent(display, 0, 0, 0)) {
- throw new GLException("Error freeing temp OpenGL context");
- }
+ GLX.glXMakeContextCurrent(display, 0, 0, 0);
GLX.glXDestroyContext(display, temp_context);
- throw new GLException("Unable to create OpenGL 3.1 context (no GLX_ARB_create_context)");
+ throw new GLException("Unable to create OpenGL >= 3.1 context (no GLX_ARB_create_context)");
}
// continue with temp context for GL < 3.0
@@ -195,38 +193,74 @@ public abstract class X11GLXContext extends GLContextImpl {
// preset with default values
int attribs[] = {
- GLX.GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
- GLX.GLX_CONTEXT_MINOR_VERSION_ARB, 0,
- GLX.GLX_CONTEXT_FLAGS_ARB, 0,
- GLX.GLX_RENDER_TYPE, GLX.GLX_RGBA_TYPE,
- 0
+ /* 0 */ GLX.GLX_CONTEXT_MAJOR_VERSION_ARB, 3,
+ /* 2 */ GLX.GLX_CONTEXT_MINOR_VERSION_ARB, 0,
+ /* 4 */ GLX.GLX_RENDER_TYPE, GLX.GLX_RGBA_TYPE,
+ /* 6 */ GLX.GLX_CONTEXT_FLAGS_ARB, 0 /* GLX.GLX_CONTEXT_DEBUG_BIT_ARB */,
+ /* 8 */ 0, 0,
+ /* 10 */ 0
};
if(glCaps.getGLProfile().isGL3()) {
- attribs[1] |= 3;
- attribs[3] |= 1;
- attribs[5] |= GLX.GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB /* | GLX.GLX_CONTEXT_DEBUG_BIT_ARB */;
+ if(tryGLContext3_2) {
+ // Try >= 3.2 core first
+ // and verify with a None drawable binding (default framebuffer)
+ attribs[0+1] = 3;
+ attribs[2+1] = 2;
+ attribs[8+0] = GLX.GLX_CONTEXT_PROFILE_MASK_ARB;
+ attribs[8+1] = GLX.GLX_CONTEXT_CORE_PROFILE_BIT_ARB;
+
+ context = glXExt.glXCreateContextAttribsARB(display, config.getFBConfig(), share, direct, attribs, 0);
+ if(0!=context) {
+ if (!GLX.glXMakeContextCurrent(display, 0, 0, context)) {
+ if(DEBUG) {
+ System.err.println("X11GLXContext.createContext couldn't make >= 3.2 core context current - fallback");
+ }
+ GLX.glXMakeContextCurrent(display, 0, 0, 0);
+ GLX.glXDestroyContext(display, context);
+ context = 0;
+ } else if(DEBUG) {
+ System.err.println("X11GLXContext.createContext >= 3.2 available 0x"+Long.toHexString(context));
+ }
+ }
+ }
+ if(0==context) {
+ if(tryGLContext3_2 && DEBUG) {
+ System.err.println("X11GLXContext.createContext couldn't create >= 3.2 core context - fallback");
+ }
+ // Try >= 3.1 forward compatible - last resort for GL3 !
+ attribs[0+1] = 3;
+ attribs[2+1] = 1;
+ attribs[6+1] |= GLX.GLX_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB;
+ attribs[8+0] = 0;
+ attribs[8+1] = 0;
+ }
+ }
+ if(0==context) {
+ // 3.1 or 3.0 ..
+ context = glXExt.glXCreateContextAttribsARB(display, config.getFBConfig(), share, direct, attribs, 0);
}
- context = glXExt.glXCreateContextAttribsARB(display, config.getFBConfig(), share, direct, attribs, 0);
if(0==context) {
if(glCaps.getGLProfile().isGL3()) {
- if (!GLX.glXMakeContextCurrent(display, 0, 0, 0)) {
- throw new GLException("Error freeing temp OpenGL context");
- }
+ GLX.glXMakeContextCurrent(display, 0, 0, 0);
GLX.glXDestroyContext(display, temp_context);
- throw new GLException("Unable to create OpenGL 3.1 context (have GLX_ARB_create_context)");
+ throw new GLException("Unable to create OpenGL >= 3.1 context (have GLX_ARB_create_context)");
}
// continue with temp context for GL < 3.0
context = temp_context;
+ if (!GLX.glXMakeContextCurrent(display,
+ drawable.getNativeWindow().getSurfaceHandle(),
+ drawable.getNativeWindow().getSurfaceHandle(),
+ context)) {
+ throw new GLException("Error making context (old) current: display 0x"+Long.toHexString(display)+", context 0x"+Long.toHexString(context)+", drawable "+drawable);
+ }
if(DEBUG) {
System.err.println("X11GLXContext.createContext done (old ctx < 3.0 - no 3.0) 0x"+Long.toHexString(context));
}
} else {
- if (!GLX.glXMakeContextCurrent(display, 0, 0, 0)) {
- throw new GLException("Error freeing temp OpenGL context");
- }
+ GLX.glXMakeContextCurrent(display, 0, 0, 0);
GLX.glXDestroyContext(display, temp_context);
// need to update the GL func table ..
--
cgit v1.2.3
From ea30ed4e6424737e29c157de4a37422e1f63a328 Mon Sep 17 00:00:00 2001
From: Sven Gothel
Date: Thu, 6 Aug 2009 23:45:06 -0700
Subject: Javadoc API: Add link to UML Diagram
---
doc/bouml/jogl/69.session | 2 +-
make/doc/jogl/spec-overview.html | 18 ++++++++++++------
2 files changed, 13 insertions(+), 7 deletions(-)
(limited to 'make/doc')
diff --git a/doc/bouml/jogl/69.session b/doc/bouml/jogl/69.session
index ae6631e25..246d70031 100644
--- a/doc/bouml/jogl/69.session
+++ b/doc/bouml/jogl/69.session
@@ -1,7 +1,7 @@
window_sizes 1800 1050 450 1344 851 120
diagrams
active classdiagram_ref 128069 // OpenGL Interfaces
- 1135 830 100 15 57 0
+ 1135 830 100 15 0 0
end
show_stereotypes
selected classdiagram_ref 128069 // OpenGL Interfaces
diff --git a/make/doc/jogl/spec-overview.html b/make/doc/jogl/spec-overview.html
index 5d4779c57..26936e63e 100644
--- a/make/doc/jogl/spec-overview.html
+++ b/make/doc/jogl/spec-overview.html
@@ -43,6 +43,12 @@ bindings to the native OpenGL(R) 3D graphics library profiles:
+OpenGL Profile Model
+ OpenGL today is not just a single set of functionality, it offers many profiles for different
+ purposes, e.g. ES1 and ES2 for mobile, etc.
+ JOGL reflects these profiles with an OO abstraction model,
+ specifying interfaces encapsulating common subsets.
+
Package Structure
The packages defined by this specification include:
@@ -68,12 +74,12 @@ inclusive, as well as most of it's extensions defined at the time of this specif
This interface contains all core desktop OpenGL methods through
version 3.0, inclusive, as well as most of it's extensions defined at the
-time of this specification. Early OpenGL extensions whose functionality
-was incorporated into core OpenGL by version 3.0, inclusive, are specifically
-excluded.
- Note: OpenGL 3.0 is the last subsumed version in the specification.
+time of this specification. OpenGL extensions whose functionality
+was incorporated into core OpenGL until version 3.1, inclusive, are subsumed into the core namespace.
+ Note: OpenGL 3.0 is the last completly subsumed version in the specification.
You need to use a {@link javax.media.opengl.GL3} OpenGL 3.1+ context to benefit
from new functionality and versions.
+ Note: Intersecting OpenGL 3.1 subsumed extensions are subsumed in GL2 as well, to offer the best common GL2GL3 intersection.
See GL2 Inclusion Criteria.
See GL2 Runtime Requirements.
Future extensions will be added with a maintenance update
@@ -119,7 +125,7 @@ time of this specification.
{@link javax.media.opengl.GL2GL3 javax.media.opengl.GL2GL3} interface
- Interface containing the common subset of GL3 (OpenGL 3.1+) and GL2 (OpenGL 2.0),
+ Interface containing the common subset of GL3 (OpenGL 3.1+) and GL2 (OpenGL 3.0),
also known as the OpenGL 3.0 forward compatible, non deprecated subset.
This interface reflects only the programmable shader functionality of desktop OpenGL
@@ -322,7 +328,7 @@ according the following rules:
{@link javax.media.opengl.GL3 javax.media.opengl.GL3} interface
- - All functions in core, forward compatible, OpenGL 3.1, inclusive, have been included,
+
- All functions in core, forward compatible, OpenGL 3.1 - 3.2, inclusive, have been included,
as described in the header files
GL3/gl3.h
.
- Reason for starting a new profile beginning with 3.1 are: