aboutsummaryrefslogtreecommitdiffstats
path: root/make/config/jogl
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2012-09-20 11:54:20 +0200
committerSven Gothel <[email protected]>2012-09-20 11:54:20 +0200
commit3f5aac3536956e245d0e151e4915e7dd67a08b7e (patch)
treec9267fcf10ebd5508b62ae1ba0589698605f9644 /make/config/jogl
parent2ea3f82baa32ff7f25856c7e3210fb70664b49e6 (diff)
Fix non NIO direct GL semantics: Restrict certain GL function to NIODirectOnly (again)
Partially reverting commits 375ab2da54ded1f3b3d90dc21b91fc6b87c64285 45a42f7c7f7fce4e6c7eb495591c438bdf0170a2 Both commits had flaws regarding: - GL spec: Pointer functions required passed memory pointers to persist - JNI: Primitive arrays may change their native memory location (swap), even if they were not GC'ed. Xerxes Ranby and I discussed whether we are able to track the primitive non direct NIO backed arrays and pinpoint them. JNI's Get*ArrayElements may be able to pinpoint, however it could result in a copy of the data, which would render this feature non performant. The tracking itself may be another no-go, since it would add up complexity and failing to free resources would be another negative sideeffect.
Diffstat (limited to 'make/config/jogl')
-rw-r--r--make/config/jogl/gl-common.cfg65
1 files changed, 36 insertions, 29 deletions
diff --git a/make/config/jogl/gl-common.cfg b/make/config/jogl/gl-common.cfg
index 9c5467583..cc1d8e058 100644
--- a/make/config/jogl/gl-common.cfg
+++ b/make/config/jogl/gl-common.cfg
@@ -360,48 +360,55 @@ ReturnsString glGetStringi
# NIOOnly __ALL__
#
-# NIODirectOnly directives for vertex arrays and other core routines
+# NIODirectOnly directives for pointer functions
+# essential where memory needs to be kept pinpointed after the function call.
# essential where the buffer lifecycle extends the function call.
#
-# Note: API calls like glColorPointer(..) will not be exploded to
-# multiple primitive arrays, since the pointer argument is 'void *'.
+# Note-1: API calls like glColorPointer(..) will not be exploded to
+# multiple primitive arrays, since the pointer argument is 'void *'.
#
-
-#NIO Review: No technical reason to constrain array access for these:
-#NIODirectOnly glColorPointer
-#NIODirectOnly glEdgeFlagPointer
-#NIODirectOnly glIndexPointer
-#NIODirectOnly glNormalPointer
-#NIODirectOnly glTexCoordPointer
-#NIODirectOnly glVertexPointer
-#NIODirectOnly glVertexAttribPointer
-#NIODirectOnly glFogCoordPointer
-#NIODirectOnly glSecondaryColorPointer
-
-#Return values
-#NIODirectOnly glGenBuffers
-#NIODirectOnly glGetPointerv
-#NIODirectOnly glFeedbackBuffer
-#NIODirectOnly glSelectBuffer
-#NIODirectOnly glGetBufferSubData
-
-#
-# NIODirectOnly directives for other extensions
+# Note-2: It may be possible to track the primitive non-direct NIO backed arrays and pinpoint them.
+# JNI's Get*ArrayElements may be able to pinpoint, however it could result
+# in a copy of the data, which would render this feature non performant.
+# The tracking itself may be another no-go, since it would add up complexity
+# and failing to free resources would be another negative sideeffect.
#
-#NIO Review: No technical reason to constrain array access for these:
-#NIODirectOnly glMatrixIndexPointerARB
+NIODirectOnly glColorPointer
+NIODirectOnly glEdgeFlagPointer
+NIODirectOnly glFeedbackBuffer
+NIODirectOnly glFogCoordPointer
+NIODirectOnly glGetBufferSubData
NIODirectOnly glGetProgramStringARB
+NIODirectOnly glIndexPointer
+NIODirectOnly glMatrixIndexPointerARB
+NIODirectOnly glMultiTexCoordPointerEXT
+NIODirectOnly glNormalPointer
NIODirectOnly glPixelDataRangeNV
+NIODirectOnly glSecondaryColorPointer
+NIODirectOnly glSelectBuffer
+NIODirectOnly glTangentPointerEXT
+NIODirectOnly glTexCoordPointer
+NIODirectOnly glVariantPointerEXT
NIODirectOnly glVertexArrayRangeNV
NIODirectOnly glVertexArrayRangeApple
+NIODirectOnly glVertexAttribIPointer
+NIODirectOnly glVertexAttribLPointer
+NIODirectOnly glVertexAttribPointer
+NIODirectOnly glVertexPointer
+NIODirectOnly glVertexWeightPointerEXT
+NIODirectOnly glWeightPointerARB
NIODirectOnly wglFreeMemoryNV
NIODirectOnly glXFreeMemoryNV
+#NIO Review: No technical reason to constrain array access for these:
+#Return values
+#NIODirectOnly glGenBuffers
+#NIODirectOnly glGetPointerv
+
#
-# NIOOnly for a few API calls ..
+# NIODirectOnly directives for other extensions
#
-NIOOnly glVertexAttribPointerNV
-NIOOnly glVertexWeightPointerEXT
+#NIO Review: No technical reason to constrain array access for these:
# Capacity of wglAllocateMemoryNV/glXAllocateMemoryNV return value is
# same as value of first argument