diff options
author | Kenneth Russel <[email protected]> | 2006-01-03 02:36:17 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2006-01-03 02:36:17 +0000 |
commit | b69f8b201ba3767020d33a7ebe066466f00d4223 (patch) | |
tree | ac4c77e5256026f4c1de771e49d89941645e60e2 /make/gl-common.cfg | |
parent | 6b4308e8b3dc41d588ff9e7519da813705a3cd94 (diff) |
Added checks on number of remaining elements and bytes for Buffers and
arrays passed to certain APIs. Default is to not emit such range
checks. The checks are currently most fully implemented for image- and
texture-related APIs. Verified with debugging code and with demos that
all textures used in demos are properly checked.
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/jogl/trunk@509 232f8b59-042b-4e1e-8c03-345bb8c30851
Diffstat (limited to 'make/gl-common.cfg')
-rw-r--r-- | make/gl-common.cfg | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/make/gl-common.cfg b/make/gl-common.cfg index ab8af9e09..dfe01cc05 100644 --- a/make/gl-common.cfg +++ b/make/gl-common.cfg @@ -331,6 +331,51 @@ BufferObjectKind Element glDrawElements BufferObjectKind Element glDrawRangeElements BufferObjectKind Element glDrawRangeElementsEXT +# Range check directives for various routines +# FIXME: some of these are really the bare minimum and won't catch +# many classes of errors. Should extend the DebugGL to perform much +# more error checking with e.g. glDrawElements. +RangeCheck glColorPointer 3 1 +RangeCheck glDrawElements 3 {1} +RangeCheck glDrawRangeElements 5 {3} +RangeCheck glEdgeFlagPointer 1 1 +RangeCheck glElementPointerATI 1 1 +RangeCheck glFogCoordPointer 2 1 +RangeCheck glFogCoordPointerEXT 2 1 +RangeCheck glInterleavedArrays 2 1 +RangeCheck glMatrixIndexPointerARB 3 1 +RangeCheck glNormalPointer 2 1 +RangeCheck glSecondaryColorPointer 3 1 +RangeCheck glSecondaryColorPointerEXT 3 1 +RangeCheck glTexCoordPointer 3 1 +RangeCheck glVariantPointerEXT 3 1 +RangeCheck glVertexPointer 3 1 +RangeCheck glVertexAttribPointer 5 1 +RangeCheck glVertexAttribPointerARB 5 1 +RangeCheck glWeightPointerARB 3 1 + +# Range check directives for various image-related routines +RangeCheckBytes glColorTable 5 imageSizeInBytes({3}, {4}, {2} , 1 , 1) +RangeCheckBytes glColorTableEXT 5 imageSizeInBytes({3}, {4}, {2} , 1 , 1) +RangeCheckBytes glConvolutionFilter1D 5 imageSizeInBytes({3}, {4}, {2} , 1 , 1) +RangeCheckBytes glConvolutionFilter2D 6 imageSizeInBytes({4}, {5}, {2} , {3} , 1) +RangeCheckBytes glDrawPixels 4 imageSizeInBytes({2}, {3}, {0} , {1} , 1) +RangeCheckBytes glReadPixels 6 imageSizeInBytes({4}, {5}, {2} , {3} , 1) +RangeCheckBytes glTexImage1D 7 imageSizeInBytes({5}, {6}, {3} + (2 * {4}), 1 , 1) +RangeCheckBytes glTexImage2D 8 imageSizeInBytes({6}, {7}, {3} + (2 * {5}), {4} + (2 * {5}), 1) +RangeCheckBytes glTexImage3D 9 imageSizeInBytes({7}, {8}, {3} + (2 * {6}), {4} + (2 * {6}), {5} + (2 * {6})) +RangeCheckBytes glTexSubImage1D 6 imageSizeInBytes({4}, {5}, {3} , 1 , 1) +RangeCheckBytes glTexSubImage2D 8 imageSizeInBytes({6}, {7}, {4} , {5} , 1) +RangeCheckBytes glTexSubImage3D 10 imageSizeInBytes({8}, {9}, {5} , {6} , {7}) +# Note we don't support glTexImage4DSGIS / glTexSubImage4DSGIS + +# Not simple to produce good range checks for these as we would need +# to query the pipeline to see the size of the returned data before +# fetching it +# RangeCheckBytes glGetTexImage + + + # Javadoc for the GL class ClassJavadoc GL /** ClassJavadoc GL * <P> The basic interface to OpenGL, providing access to core |