[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [46846] branches/soc-2012-swiss_cheese/ source/tools/GL: Added a BLENDER category to the glreport tool.

Jason Wilkins Jason.A.Wilkins at gmail.com
Mon May 21 18:02:40 CEST 2012


Revision: 46846
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=46846
Author:   jwilkins
Date:     2012-05-21 16:02:40 +0000 (Mon, 21 May 2012)
Log Message:
-----------
Added a BLENDER category to the glreport tool.

This is for internal helper symbols related to OpenGL.  Things in this category should be rather abstract and directly related to OpenGL.  e.g., "draw_line" as opposed to "draw_positional_indicator_g"

Modified Paths:
--------------
    branches/soc-2012-swiss_cheese/source/tools/GL/glreport.py

Added Paths:
-----------
    branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl

Added: branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl
===================================================================
--- branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl	                        (rev 0)
+++ branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl	2012-05-21 16:02:40 UTC (rev 46846)
@@ -0,0 +1,45 @@
+'BLENDER': set([
+	'bglBegin',
+	'bglBuffer',
+	'bglEnd',
+	'bglFlush',
+	'bglMats',
+	'bglPointHack',
+	'bglPolygonOffset',
+	'bglVertex2fv',
+	'bglVertex3f',
+	'bglVertex3fv',
+    'bgl_get_mats',
+	'bgl_DepthTexture',
+	'bgl_LuminanceTexture',
+	'bgl_RenderedTexture',
+	'bgl_RenderedTextureHeight',
+	'bgl_RenderedTextureWidth',
+	'bgl_TextureCoordinateOffset',
+	'fdrawXORcirc',
+	'fdrawXORellipse',
+	'fdraw_size',
+	'fdrawbezier',
+	'fdrawbox',
+	'fdrawcheckerboard',
+	'fdrawline',
+	'gla2DDrawInfo',
+	'gla2DDrawTranslatePt',
+	'gla2DDrawTranslatePtv',
+	'gla2DGetMap',
+	'gla2DSetMap',
+	'glaBegin2DDraw',
+	'glaDefine2DArea',
+	'glaDrawPixelsSafe',
+	'glaDrawPixelsTex',
+	'glaDrawPixelsTexScaled',
+	'glaEnd2DDraw',
+	'glaGetOneFloat',
+	'glaGetOneInteger',
+	'glaRasterPosSafe2f',
+	'set_inverted_drawing',
+	'setlinestyle',
+	'stipple_diag_stripes_neg',
+	'stipple_diag_stripes_pos',
+	'stipple_halftone',
+	'stipple_quarttone']),


Property changes on: branches/soc-2012-swiss_cheese/source/tools/GL/blender.gl
___________________________________________________________________
Added: svn:eol-style
   + native

Modified: branches/soc-2012-swiss_cheese/source/tools/GL/glreport.py
===================================================================
--- branches/soc-2012-swiss_cheese/source/tools/GL/glreport.py	2012-05-21 15:14:32 UTC (rev 46845)
+++ branches/soc-2012-swiss_cheese/source/tools/GL/glreport.py	2012-05-21 16:02:40 UTC (rev 46846)
@@ -41,11 +41,12 @@
 extensions_filepath = "extensions.gl"
 es11_filepath       = "es11.gl"
 es20_filepath       = "es20.gl"
+blender_filepath    = "blender.gl"
 
 # location of source code to be scanned relative to this script
 source_location = "../../../"
 report_filepath = "report.txt"
-    
+
 # these files contain practically the entire OpenGL api
 # scraping them spams the resulting report and makes it less useful
 stop_files = [
@@ -147,6 +148,13 @@
         # camel-case types
         (?:(?:AGL|CGL|kCGL|GLX)[a-zA-Z0-9_]*)|
 
+        # Blender internal helper functions
+        (?:(?:bgl|gla)[_A-Z0-9][a-zA-Z0-9_]*)|
+        (?:fdraw[a-zA-Z0-9_]*)|
+        (?:stipple_[a-zA-Z0-9_]*)|
+        set_inverted_drawing|
+        setlinestyle|
+
         # possible fakes
         (?:(?:glx|wgl|WGL|agl|AGL|glew|GLEW|CGL)[a-zA-Z0-9_]+)|
 
@@ -261,8 +269,8 @@
 
             db_out[token].add(label)
 
-            
-            
+
+
 def read_database():
     global core_filepath
     global deprecated_filepath
@@ -275,6 +283,7 @@
     global extensions_filepath
     global es11_filepath
     global es20_filepath
+    global blender_filepath
 
     core_file       = open(core_filepath)
     deprecated_file = open(deprecated_filepath)
@@ -287,6 +296,7 @@
     libraries_file  = open(libraries_filepath)
     es11_file       = open(es11_filepath)
     es20_file       = open(es20_filepath)
+    blender_file    = open(blender_filepath)
 
     core_str       = core_file.read()
     deprecated_str = deprecated_file.read()
@@ -299,13 +309,14 @@
     libraries_str  = libraries_file.read()
     es11_str       = es11_file.read()
     es20_str       = es20_file.read()
+    blender_str    = blender_file.read()
 
     # fill the database with all categories
     # database is used to classify tokens
-    database_str = '{ %s %s %s %s %s %s %s %s %s }' % (
+    database_str = '{ %s %s %s %s %s %s %s %s %s %s }' % (
         core_str, deprecated_str, extensions_str,
         agl_str, cgl_str, egl_str, glX_str, wgl_str,
-        libraries_str)
+        libraries_str, blender_str)
 
     global database
     pivot_database(database, eval(database_str))
@@ -313,16 +324,16 @@
     # platform_es11 and platform_es20 contain platforms
     # they are used to find tokens that do not belong on a particular platform
     # library functions included because otherwise library functions would be
-    # considered to all be incompatible with each platform, 
+    # considered to all be incompatible with each platform,
     # which is noisy and not particularly true
-    platform_es11_str = '{ %s %s %s %s %s %s %s }' % (
-        es11_str, agl_str, cgl_str, egl_str, glX_str, wgl_str, libraries_str)
+    platform_es11_str = '{ %s %s %s %s %s %s %s %s }' % (
+        es11_str, agl_str, cgl_str, egl_str, glX_str, wgl_str, libraries_str, blender_str)
 
     global platform_es11
     pivot_database(platform_es11, eval(platform_es11_str))
 
-    platform_es20_str = '{ %s %s %s %s %s %s %s }' %  (
-        es20_str, agl_str, cgl_str, egl_str, glX_str, wgl_str, libraries_str)
+    platform_es20_str = '{ %s %s %s %s %s %s %s %s }' %  (
+        es20_str, agl_str, cgl_str, egl_str, glX_str, wgl_str, libraries_str, blender_str)
 
     global platform_es20
     pivot_database(platform_es20, eval(platform_es20_str))
@@ -345,7 +356,7 @@
     global platform_es20
 
     global report
-    
+
     out = open(filepath, "w")
 
     out.write("Files That Appear to Use OpenGL: " + str(len(report)) + "\n")
@@ -424,7 +435,7 @@
 
     out.close()
 
-    
+
 # main
 read_database()
 make_report()




More information about the Bf-blender-cvs mailing list