[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [58369] branches/soc-2013-viewport_fx/ source/tools/GL: glreport.py maintenance
Jason Wilkins
Jason.A.Wilkins at gmail.com
Thu Jul 18 18:35:23 CEST 2013
Revision: 58369
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58369
Author: jwilkins
Date: 2013-07-18 16:35:22 +0000 (Thu, 18 Jul 2013)
Log Message:
-----------
glreport.py maintenance
handle exception if file cannot be opened or read
added more stop files
added some more tokens to some categories
There is still a lot to do, but it isn't a high priority at the moment.
Modified Paths:
--------------
branches/soc-2013-viewport_fx/source/tools/GL/blender.gl
branches/soc-2013-viewport_fx/source/tools/GL/deprecated.gl
branches/soc-2013-viewport_fx/source/tools/GL/glreport.py
branches/soc-2013-viewport_fx/source/tools/GL/libraries.gl
Modified: branches/soc-2013-viewport_fx/source/tools/GL/blender.gl
===================================================================
--- branches/soc-2013-viewport_fx/source/tools/GL/blender.gl 2013-07-18 12:28:51 UTC (rev 58368)
+++ branches/soc-2013-viewport_fx/source/tools/GL/blender.gl 2013-07-18 16:35:22 UTC (rev 58369)
@@ -48,5 +48,5 @@
'stipple_diag_stripes_neg',
'stipple_diag_stripes_pos',
'stipple_halftone',
- 'stipple_quarttone',
+ 'stipple_quartone',
'bgl_sphere_project']),
Modified: branches/soc-2013-viewport_fx/source/tools/GL/deprecated.gl
===================================================================
--- branches/soc-2013-viewport_fx/source/tools/GL/deprecated.gl 2013-07-18 12:28:51 UTC (rev 58368)
+++ branches/soc-2013-viewport_fx/source/tools/GL/deprecated.gl 2013-07-18 16:35:22 UTC (rev 58369)
@@ -413,18 +413,18 @@
'GL_SOURCE2_RGB']),
'OLD_TOKEN_NAME_3_0': set([
- 'GL_CLIP_PLANE0',
- 'GL_CLIP_PLANE1',
- 'GL_CLIP_PLANE2',
- 'GL_CLIP_PLANE3',
- 'GL_CLIP_PLANE4',
- 'GL_CLIP_PLANE5',
- 'GL_COMPARE_R_TO_TEXTURE',
- 'GL_MAX_CLIP_PLANES',
- 'GL_MAX_VARYING_FLOATS']),
+ 'GL_CLIP_PLANE0', # GL_CLIP_DISTANCE0
+ 'GL_CLIP_PLANE1', # GL_CLIP_DISTANCE1
+ 'GL_CLIP_PLANE2', # GL_CLIP_DISTANCE2
+ 'GL_CLIP_PLANE3', # GL_CLIP_DISTANCE3
+ 'GL_CLIP_PLANE4', # GL_CLIP_DISTANCE4
+ 'GL_CLIP_PLANE5', # GL_CLIP_DISTANCE5
+ 'GL_COMPARE_R_TO_TEXTURE', # GL_COMPARE_REF_TO_TEXTURE
+ 'GL_MAX_CLIP_PLANES', # GL_MAX_CLIP_DISTANCES
+ 'GL_MAX_VARYING_FLOATS']), # GL_MAX_VARYING_COMPONENTS
'OLD_TOKEN_NAME_3_2': set([
- 'GL_VERTEX_PROGRAM_POINT_SIZE']),
+ 'GL_VERTEX_PROGRAM_POINT_SIZE']), # GL_PROGRAM_POINT_SIZE
'OLD_TOKEN_NAME_4_1': set([
'GL_CURRENT_PROGRAM']),
Modified: branches/soc-2013-viewport_fx/source/tools/GL/glreport.py
===================================================================
--- branches/soc-2013-viewport_fx/source/tools/GL/glreport.py 2013-07-18 12:28:51 UTC (rev 58368)
+++ branches/soc-2013-viewport_fx/source/tools/GL/glreport.py 2013-07-18 16:35:22 UTC (rev 58369)
@@ -55,10 +55,12 @@
os.path.join('extern', 'glew', 'include', 'GL', 'glxew.h'),
os.path.join('extern', 'glew', 'include', 'GL', 'wglew.h'),
os.path.join('extern', 'glew', 'src', 'glew.c'),
- os.path.join('extern', 'glew-android', 'include', 'GL', 'glew.h'),
- os.path.join('extern', 'glew-android', 'include', 'GL', 'glxew.h'),
- os.path.join('extern', 'glew-android', 'include', 'GL', 'wglew.h'),
- os.path.join('extern', 'glew-android', 'src', 'glew.c'),
+ os.path.join('extern', 'glew-es', 'include', 'GL', 'eglew.h'),
+ os.path.join('extern', 'glew-es', 'include', 'GL', 'glesew.h'),
+ os.path.join('extern', 'glew-es', 'include', 'GL', 'glew.h'),
+ os.path.join('extern', 'glew-es', 'include', 'GL', 'glxew.h'),
+ os.path.join('extern', 'glew-es', 'include', 'GL', 'wglew.h'),
+ os.path.join('extern', 'glew-es', 'src', 'glew.c'),
os.path.join('source', 'blender', 'python', 'generic', 'bgl.h'),
os.path.join('source', 'blender', 'python', 'generic', 'bgl.c'),
os.path.join('source', 'blender', 'gpu', 'intern', 'gpu_deprecated.h'),
@@ -87,8 +89,13 @@
os.path.join('intern', 'iksolver', 'intern', 'IK_QJacobianSolver.cpp'),
os.path.join('intern', 'iksolver', 'test', 'ik_glut_test', 'intern', 'ChainDrawer.h'),
os.path.join('intern', 'iksolver', 'test', 'ik_glut_test', 'intern', 'MyGlutMouseHandler.h'),
- os.path.join('intern', 'iksolver', 'test', 'ik_glut_test', 'intern', 'main.cpp')]
+ os.path.join('intern', 'iksolver', 'test', 'ik_glut_test', 'intern', 'main.cpp'),
+ # some annoying fakes were found in these files that aren't even use OpenGL
+ os.path.join('extern', 'bullet2', 'src', 'BulletDynamics', 'ConstraintSolver', 'btGeneric6DofConstraint.h'),
+ os.path.join('extern', 'wcwidth', 'wcwidth.c'),
+
+ ]
# for_all_files will visit every file in a file hierarchy
# doDirCallback - called on each directory
# doFileCallback - called on each file
@@ -162,23 +169,23 @@
# This regular expression recognizes almost all tokens introduced by OpenGL
# It is careful to exclude tokens like "glow" or "GLARE", but makes sure to
-# catche "fake" OpenGL identifiers that should be avoided like "glHerpDerp".
+# catch "fake" OpenGL identifiers that should be avoided like "glHerpDerp".
# XXX: TODO: It may be better to make an explicit list of allowed symbols so this can be simplified somewhat later
tokenizer = re.compile(r'''
\b(?:
# entry points
- (?:(?:gl|glu|glut|glew|glX|wgl|agl|CGL|glm)[A-Z_][a-zA-Z0-9_]*)|
+ (?:(?:gl|glu|glut|glew|glX|wgl|agl|cgl|CGL|glm|egl|glew|wglew|xglew|eglew)[A-Z_][a-zA-Z0-9_]*)|
# enums
- (?:(?:GL|GLU|GLUT|GLEW|GLX|WGL|AGL|GLM)_[a-zA-Z0-9_]*])|
+ (?:(?:GL|GLU|GLUT|GLEW|GLX|WGL|AGL|CGL|GLM|EGL|GLEW|WGLEW|EGLEW|XGLEW)_[a-zA-Z0-9_]*])|
# lower-case types
(?:(?:GL|GLU|GLM)[a-z0-9_][a-zA-Z0-9_]*)|
# camel-case types
- (?:(?:AGL|CGL|kCGL|GLX)[a-zA-Z0-9_]*)|
+ (?:(?:AGL|CGL|kCGL|GLX|EGL)[a-zA-Z0-9_]*)|
# Blender internal helper functions
(?:(?:bgl|gla)[_A-Z0-9][a-zA-Z0-9_]*)|
@@ -228,9 +235,13 @@
print("Scanning: " + unprefixed_path + " ...");
- f = open(path)
- s = f.read()
- f.close()
+ try:
+ f = open(path)
+ s = f.read()
+ f.close()
+ except Exception as e:
+ print("Exception occurred while reading " + unprefixed_path + ": \n" + str(e))
+ return
matches = tokenizer.findall(s)
Modified: branches/soc-2013-viewport_fx/source/tools/GL/libraries.gl
===================================================================
--- branches/soc-2013-viewport_fx/source/tools/GL/libraries.gl 2013-07-18 12:28:51 UTC (rev 58368)
+++ branches/soc-2013-viewport_fx/source/tools/GL/libraries.gl 2013-07-18 16:35:22 UTC (rev 58369)
@@ -35,7 +35,12 @@
'GLEW_VERSION_1_5',
'GLEW_VERSION_2_0',
'GLEW_VERSION_3_0',
- 'glewInit',
+ 'GLEW_ARB_framebuffer_object',
+ 'GLEW_ES_VERSION_2_0',
+ 'GLEW_INC_EGL',
+ 'GLEW_OES_framebuffer_object',
+ 'GLEW_OES_mapbuffer',
+ 'glewInit',
'glewIsSupported',
'glxew',
'wglew']),
More information about the Bf-blender-cvs
mailing list