[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46340] trunk/blender/source/tools/GL: Cleaned up glreport.py (pardon my dust)

Jason Wilkins Jason.A.Wilkins at gmail.com
Sun May 6 08:59:01 CEST 2012


Revision: 46340
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46340
Author:   jwilkins
Date:     2012-05-06 06:59:01 +0000 (Sun, 06 May 2012)
Log Message:
-----------
Cleaned up glreport.py (pardon my dust)

See the README.txt for details of how to read the generated report.

Consolidated the 600+ extension files into a set of JSON style Python files.
Not much of a space reduction, but definitely a reduction in clutter.

People are free to edit the .gl files.  The warning in the files against editing is for people who are generating new .gl files from other sources.

Modified Paths:
--------------
    trunk/blender/source/tools/GL/README.txt
    trunk/blender/source/tools/GL/glreport.py

Added Paths:
-----------
    trunk/blender/source/tools/GL/core.gl
    trunk/blender/source/tools/GL/es11.gl
    trunk/blender/source/tools/GL/es20.gl
    trunk/blender/source/tools/GL/extensions.gl
    trunk/blender/source/tools/GL/system.gl

Removed Paths:
-------------
    trunk/blender/source/tools/GL/classic/
    trunk/blender/source/tools/GL/core/
    trunk/blender/source/tools/GL/es/
    trunk/blender/source/tools/GL/extensions/
    trunk/blender/source/tools/GL/platform/
    trunk/blender/source/tools/GL/types/

Modified: trunk/blender/source/tools/GL/README.txt
===================================================================
--- trunk/blender/source/tools/GL/README.txt	2012-05-06 06:57:02 UTC (rev 46339)
+++ trunk/blender/source/tools/GL/README.txt	2012-05-06 06:59:01 UTC (rev 46340)
@@ -6,13 +6,67 @@
 which contains information about the OpenGL symbols used by
 Blender and what OpenGL version and extensions are required.
 
-The contents of "core" and "extensions" was copied from
-the GLEW distribution.  The other directories have been
-created from other sources such as the OpenGL registry.
+The report starts with summary information:
+    Which files appear to use OpenGL
+    All of the "categories" of symbols that were found
+    A list of all the tokens found
+    A list of all tokens that could not be categorized
+    
+The remainder of the file is a detailed report for each
+source file:
+    The tokens found in each category
+    A list of unknown tokens
+    A list of tokens that are incompatible with each of several "platforms"
 
+A category is just a set of tokens.  An example would be
+the tokens introduced in OpenGL version 1.0 but have not
+been deprecated.
+
+Another category are system dependent or portable libraries
+such as GLX and GLU.
+
+A platform is a set of related functionality, such as
+OpenGL ES.  For each file there is a list of tokens that
+do not work on each platform.  The currently tested 
+platforms are OpenGL ES versions 1.1 and 2.0.
+
+OpenGL 3+ core and compatibility profiles are not tested
+in this way.  Currently this is handled by separating
+each version of OpenGL into regular and deprecated
+categories.
+
+A deprecated function is one that has been or will be
+removed from OpenGL in the future.  The category
+GL_VERSION_1_2_DEPRECATED does not mean it was deprecated
+in OpenGL 2.0, but that it has been deprecated as some
+point, but the function was originally introduced with
+OpenGL 1.2.  If you do not care about deprecation then
+you can simply take it to mean that same thing as
+GL_VERSION_1_2.
+
+Another useful category is OLD_TOKEN_NAME.  For example,
+OpenGL 1.3 introduced Fog Coordinates, but the token
+names given for the enumerations were inconsistent with
+OpenGL conventions.  To solve this they renamed the tokens
+in version 1.4.  Both names remain valid, however if a
+token is in the OLD_TOKEN_NAME_1_4 category it means that
+it was renamed in that version of OpenGL.  Unfortunately it
+is not easy at this time to tell from the report what
+the new name is, so if you do not know you will have to
+look at the spec for the version given by the category
+name.  The version indicates when the token was renamed,
+not the original version that the token was introduced.
+The original version can be determined by looking at the
+other categories the token is in.
+
 Unfortunately the script does not have a way to catch usage
-of extensions that do not introduce new tokens.
+of extensions that do not introduce new tokens.  For example,
+and extension like blend_square or texenv_add only say that
+an old enumerant can be used in a new way without generating
+an error.
 
-To-Do:
-
-Create a list of suspect symbols and forbidden extensions
+There is still some work to be done creating categories of
+tokens that would give us additional information.  An example
+might be a class of forbidden functions that should never
+be used along with a class of suspicious functions whose
+usage should be double checked.

Added: trunk/blender/source/tools/GL/core.gl
===================================================================
--- trunk/blender/source/tools/GL/core.gl	                        (rev 0)
+++ trunk/blender/source/tools/GL/core.gl	2012-05-06 06:59:01 UTC (rev 46340)
@@ -0,0 +1,1881 @@
+# This file is generated by a script.
+# If you edit it directly then your changes may be lost!
+
+'GLSL': set([
+	'gl_FragColor',
+	'gl_ModelViewMatrix',
+	'gl_TexCoord']),
+
+'GL_VERSION_1_0': set([
+	'GL_2D',
+	'GL_2_BYTES',
+	'GL_3D',
+	'GL_3D_COLOR',
+	'GL_3D_COLOR_TEXTURE',
+	'GL_3_BYTES',
+	'GL_4D_COLOR_TEXTURE',
+	'GL_4_BYTES',
+	'GL_ACCUM',
+	'GL_ACCUM_ALPHA_BITS',
+	'GL_ACCUM_BLUE_BITS',
+	'GL_ACCUM_BUFFER_BIT',
+	'GL_ACCUM_CLEAR_VALUE',
+	'GL_ACCUM_GREEN_BITS',
+	'GL_ACCUM_RED_BITS',
+	'GL_ADD',
+	'GL_ALL_ATTRIB_BITS',
+	'GL_ALPHA',
+	'GL_ALPHA_BIAS',
+	'GL_ALPHA_BITS',
+	'GL_ALPHA_SCALE',
+	'GL_ALPHA_TEST',
+	'GL_ALPHA_TEST_FUNC',
+	'GL_ALPHA_TEST_REF',
+	'GL_ALWAYS',
+	'GL_AMBIENT',
+	'GL_AMBIENT_AND_DIFFUSE',
+	'GL_AND',
+	'GL_AND_INVERTED',
+	'GL_AND_REVERSE',
+	'GL_ATTRIB_STACK_DEPTH',
+	'GL_AUTO_NORMAL',
+	'GL_AUX0',
+	'GL_AUX1',
+	'GL_AUX2',
+	'GL_AUX3',
+	'GL_AUX_BUFFERS',
+	'GL_BACK',
+	'GL_BACK_LEFT',
+	'GL_BACK_RIGHT',
+	'GL_BITMAP',
+	'GL_BITMAP_TOKEN',
+	'GL_BLEND',
+	'GL_BLEND_DST',
+	'GL_BLEND_SRC',
+	'GL_BLUE',
+	'GL_BLUE_BIAS',
+	'GL_BLUE_BITS',
+	'GL_BLUE_SCALE',
+	'GL_BYTE',
+	'GL_CCW',
+	'GL_CLAMP',
+	'GL_CLEAR',
+	'GL_CLIP_PLANE0',
+	'GL_CLIP_PLANE1',
+	'GL_CLIP_PLANE2',
+	'GL_CLIP_PLANE3',
+	'GL_CLIP_PLANE4',
+	'GL_CLIP_PLANE5',
+	'GL_COEFF',
+	'GL_COLOR',
+	'GL_COLOR_BUFFER_BIT',
+	'GL_COLOR_CLEAR_VALUE',
+	'GL_COLOR_INDEX',
+	'GL_COLOR_INDEXES',
+	'GL_COLOR_MATERIAL',
+	'GL_COLOR_MATERIAL_FACE',
+	'GL_COLOR_MATERIAL_PARAMETER',
+	'GL_COLOR_WRITEMASK',
+	'GL_COMPILE',
+	'GL_COMPILE_AND_EXECUTE',
+	'GL_CONSTANT_ATTENUATION',
+	'GL_COPY',
+	'GL_COPY_INVERTED',
+	'GL_COPY_PIXEL_TOKEN',
+	'GL_CULL_FACE',
+	'GL_CULL_FACE_MODE',
+	'GL_CURRENT_BIT',
+	'GL_CURRENT_COLOR',
+	'GL_CURRENT_INDEX',
+	'GL_CURRENT_NORMAL',
+	'GL_CURRENT_RASTER_COLOR',
+	'GL_CURRENT_RASTER_DISTANCE',
+	'GL_CURRENT_RASTER_INDEX',
+	'GL_CURRENT_RASTER_POSITION',
+	'GL_CURRENT_RASTER_POSITION_VALID',
+	'GL_CURRENT_RASTER_TEXTURE_COORDS',
+	'GL_CURRENT_TEXTURE_COORDS',
+	'GL_CW',
+	'GL_DECAL',
+	'GL_DECR',
+	'GL_DEPTH',
+	'GL_DEPTH_BIAS',
+	'GL_DEPTH_BITS',
+	'GL_DEPTH_BUFFER_BIT',
+	'GL_DEPTH_CLEAR_VALUE',
+	'GL_DEPTH_COMPONENT',
+	'GL_DEPTH_FUNC',
+	'GL_DEPTH_RANGE',
+	'GL_DEPTH_SCALE',
+	'GL_DEPTH_TEST',
+	'GL_DEPTH_WRITEMASK',
+	'GL_DIFFUSE',
+	'GL_DITHER',
+	'GL_DOMAIN',
+	'GL_DONT_CARE',
+	'GL_DOUBLEBUFFER',
+	'GL_DRAW_BUFFER',
+	'GL_DRAW_PIXEL_TOKEN',
+	'GL_DST_ALPHA',
+	'GL_DST_COLOR',
+	'GL_EDGE_FLAG',
+	'GL_EMISSION',
+	'GL_ENABLE_BIT',
+	'GL_EQUAL',
+	'GL_EQUIV',
+	'GL_EVAL_BIT',
+	'GL_EXP',
+	'GL_EXP2',
+	'GL_EXTENSIONS',
+	'GL_EYE_LINEAR',
+	'GL_EYE_PLANE',
+	'GL_FALSE',
+	'GL_FASTEST',
+	'GL_FEEDBACK',
+	'GL_FEEDBACK_BUFFER_SIZE',
+	'GL_FEEDBACK_BUFFER_TYPE',
+	'GL_FILL',
+	'GL_FLAT',
+	'GL_FLOAT',
+	'GL_FOG',
+	'GL_FOG_BIT',
+	'GL_FOG_COLOR',
+	'GL_FOG_DENSITY',
+	'GL_FOG_END',
+	'GL_FOG_HINT',
+	'GL_FOG_INDEX',
+	'GL_FOG_MODE',
+	'GL_FOG_START',
+	'GL_FRONT',
+	'GL_FRONT_AND_BACK',
+	'GL_FRONT_FACE',
+	'GL_FRONT_LEFT',
+	'GL_FRONT_RIGHT',
+	'GL_GEQUAL',
+	'GL_GREATER',
+	'GL_GREEN',
+	'GL_GREEN_BIAS',
+	'GL_GREEN_BITS',
+	'GL_GREEN_SCALE',
+	'GL_HINT_BIT',
+	'GL_INCR',
+	'GL_INDEX_BITS',
+	'GL_INDEX_CLEAR_VALUE',
+	'GL_INDEX_MODE',
+	'GL_INDEX_OFFSET',
+	'GL_INDEX_SHIFT',
+	'GL_INDEX_WRITEMASK',
+	'GL_INT',
+	'GL_INVALID_ENUM',
+	'GL_INVALID_OPERATION',
+	'GL_INVALID_VALUE',
+	'GL_INVERT',
+	'GL_KEEP',
+	'GL_LEFT',
+	'GL_LEQUAL',
+	'GL_LESS',
+	'GL_LIGHT0',
+	'GL_LIGHT1',
+	'GL_LIGHT2',
+	'GL_LIGHT3',
+	'GL_LIGHT4',
+	'GL_LIGHT5',
+	'GL_LIGHT6',
+	'GL_LIGHT7',
+	'GL_LIGHTING',
+	'GL_LIGHTING_BIT',
+	'GL_LIGHT_MODEL_AMBIENT',
+	'GL_LIGHT_MODEL_COLOR_CONTROL',
+	'GL_LIGHT_MODEL_LOCAL_VIEWER',
+	'GL_LIGHT_MODEL_TWO_SIDE',
+	'GL_LINE',
+	'GL_LINEAR',
+	'GL_LINEAR_ATTENUATION',
+	'GL_LINEAR_MIPMAP_LINEAR',
+	'GL_LINEAR_MIPMAP_NEAREST',
+	'GL_LINES',
+	'GL_LINE_BIT',
+	'GL_LINE_LOOP',
+	'GL_LINE_RESET_TOKEN',
+	'GL_LINE_SMOOTH',
+	'GL_LINE_SMOOTH_HINT',
+	'GL_LINE_STIPPLE',
+	'GL_LINE_STIPPLE_PATTERN',
+	'GL_LINE_STIPPLE_REPEAT',
+	'GL_LINE_STRIP',
+	'GL_LINE_TOKEN',
+	'GL_LINE_WIDTH',
+	'GL_LINE_WIDTH_GRANULARITY',
+	'GL_LINE_WIDTH_RANGE',
+	'GL_LIST_BASE',
+	'GL_LIST_BIT',
+	'GL_LIST_INDEX',
+	'GL_LIST_MODE',
+	'GL_LOAD',
+	'GL_LOGIC_OP',
+	'GL_LOGIC_OP_MODE',
+	'GL_LUMINANCE',
+	'GL_LUMINANCE_ALPHA',
+	'GL_MAP1_COLOR_4',
+	'GL_MAP1_GRID_DOMAIN',
+	'GL_MAP1_GRID_SEGMENTS',
+	'GL_MAP1_INDEX',
+	'GL_MAP1_NORMAL',
+	'GL_MAP1_TEXTURE_COORD_1',
+	'GL_MAP1_TEXTURE_COORD_2',
+	'GL_MAP1_TEXTURE_COORD_3',
+	'GL_MAP1_TEXTURE_COORD_4',
+	'GL_MAP1_VERTEX_3',
+	'GL_MAP1_VERTEX_4',
+	'GL_MAP2_COLOR_4',
+	'GL_MAP2_GRID_DOMAIN',
+	'GL_MAP2_GRID_SEGMENTS',
+	'GL_MAP2_INDEX',
+	'GL_MAP2_NORMAL',
+	'GL_MAP2_TEXTURE_COORD_1',
+	'GL_MAP2_TEXTURE_COORD_2',
+	'GL_MAP2_TEXTURE_COORD_3',
+	'GL_MAP2_TEXTURE_COORD_4',
+	'GL_MAP2_VERTEX_3',
+	'GL_MAP2_VERTEX_4',
+	'GL_MAP_COLOR',
+	'GL_MAP_STENCIL',
+	'GL_MATRIX_MODE',
+	'GL_MAX_ATTRIB_STACK_DEPTH',
+	'GL_MAX_CLIP_PLANES',
+	'GL_MAX_EVAL_ORDER',
+	'GL_MAX_LIGHTS',
+	'GL_MAX_LIST_NESTING',
+	'GL_MAX_MODELVIEW_STACK_DEPTH',
+	'GL_MAX_NAME_STACK_DEPTH',
+	'GL_MAX_PIXEL_MAP_TABLE',
+	'GL_MAX_PROJECTION_STACK_DEPTH',
+	'GL_MAX_TEXTURE_SIZE',
+	'GL_MAX_TEXTURE_STACK_DEPTH',
+	'GL_MAX_VIEWPORT_DIMS',
+	'GL_MODELVIEW',
+	'GL_MODELVIEW_MATRIX',
+	'GL_MODELVIEW_STACK_DEPTH',
+	'GL_MODULATE',
+	'GL_MULT',
+	'GL_NAME_STACK_DEPTH',
+	'GL_NAND',
+	'GL_NEAREST',
+	'GL_NEAREST_MIPMAP_LINEAR',
+	'GL_NEAREST_MIPMAP_NEAREST',
+	'GL_NEVER',
+	'GL_NICEST',
+	'GL_NONE',
+	'GL_NOOP',
+	'GL_NOR',
+	'GL_NORMALIZE',
+	'GL_NOTEQUAL',
+	'GL_NO_ERROR',
+	'GL_OBJECT_LINEAR',
+	'GL_OBJECT_PLANE',
+	'GL_ONE',
+	'GL_ONE_MINUS_DST_ALPHA',
+	'GL_ONE_MINUS_DST_COLOR',
+	'GL_ONE_MINUS_SRC_ALPHA',
+	'GL_ONE_MINUS_SRC_COLOR',
+	'GL_OR',
+	'GL_ORDER',
+	'GL_OR_INVERTED',
+	'GL_OR_REVERSE',
+	'GL_OUT_OF_MEMORY',
+	'GL_PACK_ALIGNMENT',
+	'GL_PACK_LSB_FIRST',
+	'GL_PACK_ROW_LENGTH',
+	'GL_PACK_SKIP_PIXELS',
+	'GL_PACK_SKIP_ROWS',
+	'GL_PACK_SWAP_BYTES',
+	'GL_PASS_THROUGH_TOKEN',
+	'GL_PERSPECTIVE_CORRECTION_HINT',
+	'GL_PIXEL_MAP_A_TO_A',
+	'GL_PIXEL_MAP_A_TO_A_SIZE',
+	'GL_PIXEL_MAP_B_TO_B',
+	'GL_PIXEL_MAP_B_TO_B_SIZE',
+	'GL_PIXEL_MAP_G_TO_G',
+	'GL_PIXEL_MAP_G_TO_G_SIZE',
+	'GL_PIXEL_MAP_I_TO_A',
+	'GL_PIXEL_MAP_I_TO_A_SIZE',
+	'GL_PIXEL_MAP_I_TO_B',
+	'GL_PIXEL_MAP_I_TO_B_SIZE',
+	'GL_PIXEL_MAP_I_TO_G',
+	'GL_PIXEL_MAP_I_TO_G_SIZE',
+	'GL_PIXEL_MAP_I_TO_I',
+	'GL_PIXEL_MAP_I_TO_I_SIZE',
+	'GL_PIXEL_MAP_I_TO_R',
+	'GL_PIXEL_MAP_I_TO_R_SIZE',
+	'GL_PIXEL_MAP_R_TO_R',
+	'GL_PIXEL_MAP_R_TO_R_SIZE',
+	'GL_PIXEL_MAP_S_TO_S',
+	'GL_PIXEL_MAP_S_TO_S_SIZE',
+	'GL_PIXEL_MODE_BIT',
+	'GL_POINT',
+	'GL_POINTS',
+	'GL_POINT_BIT',
+	'GL_POINT_SIZE',
+	'GL_POINT_SIZE_GRANULARITY',
+	'GL_POINT_SIZE_RANGE',
+	'GL_POINT_SMOOTH',
+	'GL_POINT_SMOOTH_HINT',
+	'GL_POINT_TOKEN',
+	'GL_POLYGON',
+	'GL_POLYGON_BIT',
+	'GL_POLYGON_MODE',
+	'GL_POLYGON_SMOOTH',

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list