VirtualBox

Ignore:
Timestamp:
Jan 26, 2009 10:26:43 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
42009
Message:

crOpenGL: tabs to spaces

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL/windows_getprocaddress.py

    r15532 r16219  
    3939keys = apiutil.GetAllFunctions(sys.argv[1]+"/APIspec.txt")
    4040for func_name in keys:
    41         if "Chromium" == apiutil.Category(func_name):
    42                 continue
    43         if func_name == "BoundsInfoCR":
    44                 continue
    45         if "GL_chromium" == apiutil.Category(func_name):
    46                 pass #continue
     41    if "Chromium" == apiutil.Category(func_name):
     42        continue
     43    if func_name == "BoundsInfoCR":
     44        continue
     45    if "GL_chromium" == apiutil.Category(func_name):
     46        pass #continue
    4747
    48         wrap = apiutil.GetCategoryWrapper(func_name)
    49         name = "gl" + func_name
    50         address = "cr_gl" + func_name
    51         if wrap:
    52                 print '#ifdef CR_%s' % wrap
    53         print '\t{ "%s", (CR_PROC) %s },' % (name, address)
    54         if wrap:
    55                 print '#endif'
     48    wrap = apiutil.GetCategoryWrapper(func_name)
     49    name = "gl" + func_name
     50    address = "cr_gl" + func_name
     51    if wrap:
     52        print '#ifdef CR_%s' % wrap
     53    print '\t{ "%s", (CR_PROC) %s },' % (name, address)
     54    if wrap:
     55        print '#endif'
    5656
    5757
     
    5959
    6060for func_name in keys:
    61         if (func_name == "Writeback" or
    62                 func_name == "BoundsInfoCR"):
    63                 continue
    64         if apiutil.Category(func_name) == "Chromium":
    65                 print '\t{ "cr%s", (CR_PROC) cr%s },' % (func_name, func_name)
     61    if (func_name == "Writeback" or
     62        func_name == "BoundsInfoCR"):
     63        continue
     64    if apiutil.Category(func_name) == "Chromium":
     65        print '\t{ "cr%s", (CR_PROC) cr%s },' % (func_name, func_name)
    6666
    6767print "\t/* Windows ICD functions */"
     
    8080    "SwapBuffers",
    8181    "SwapLayerBuffers",
    82         "ReleaseContext",
    83         "SetContext",
    84         "ValidateVersion"):
    85         print '\t{ "Drv%s", (CR_PROC) Drv%s },' % (func_name, func_name)
     82    "ReleaseContext",
     83    "SetContext",
     84    "ValidateVersion"):
     85    print '\t{ "Drv%s", (CR_PROC) Drv%s },' % (func_name, func_name)
    8686
    8787print '\t{ "DrvGetProcAddress", (CR_PROC) wglGetProcAddress_prox },'
    8888
    8989print """
    90         { NULL, NULL }
     90    { NULL, NULL }
    9191};
    9292
    9393CR_PROC CR_APIENTRY crGetProcAddress( const char *name )
    9494{
    95         int i;
    96         stubInit();
     95    int i;
     96    stubInit();
    9797
    98         for (i = 0; functions[i].name; i++) {
    99                 if (crStrcmp(name, functions[i].name) == 0) {
    100                         return functions[i].address;
    101                 }
    102         }
     98    for (i = 0; functions[i].name; i++) {
     99        if (crStrcmp(name, functions[i].name) == 0) {
     100            return functions[i].address;
     101        }
     102    }
    103103
    104         return NULL;
     104    return NULL;
    105105}
    106106
     
    114114/* As these are Windows specific (i.e. wgl), define these now.... */
    115115#ifdef WINDOWS
    116         {
    117                 wglGetExtensionsStringEXTFunc_t wglGetExtensionsStringEXT = NULL;
    118                 wglChoosePixelFormatFunc_t wglChoosePixelFormatEXT = NULL;
    119                 wglGetPixelFormatAttribivEXTFunc_t wglGetPixelFormatAttribivEXT = NULL;
    120                 wglGetPixelFormatAttribfvEXTFunc_t wglGetPixelFormatAttribfvEXT = NULL;
    121                 if (!crStrcmp( name, "wglGetExtensionsStringEXT" )) return (CR_PROC) wglGetExtensionsStringEXT;
    122                 if (!crStrcmp( name, "wglChoosePixelFormatEXT" )) return (CR_PROC) wglChoosePixelFormatEXT;
    123                 if (!crStrcmp( name, "wglGetPixelFormatAttribivEXT" )) return (CR_PROC) wglGetPixelFormatAttribivEXT;
    124                 if (!crStrcmp( name, "wglGetPixelFormatAttribfvEXT" )) return (CR_PROC) wglGetPixelFormatAttribfvEXT;
    125         }
     116    {
     117        wglGetExtensionsStringEXTFunc_t wglGetExtensionsStringEXT = NULL;
     118        wglChoosePixelFormatFunc_t wglChoosePixelFormatEXT = NULL;
     119        wglGetPixelFormatAttribivEXTFunc_t wglGetPixelFormatAttribivEXT = NULL;
     120        wglGetPixelFormatAttribfvEXTFunc_t wglGetPixelFormatAttribfvEXT = NULL;
     121        if (!crStrcmp( name, "wglGetExtensionsStringEXT" )) return (CR_PROC) wglGetExtensionsStringEXT;
     122        if (!crStrcmp( name, "wglChoosePixelFormatEXT" )) return (CR_PROC) wglChoosePixelFormatEXT;
     123        if (!crStrcmp( name, "wglGetPixelFormatAttribivEXT" )) return (CR_PROC) wglGetPixelFormatAttribivEXT;
     124        if (!crStrcmp( name, "wglGetPixelFormatAttribfvEXT" )) return (CR_PROC) wglGetPixelFormatAttribfvEXT;
     125    }
    126126#endif
    127127"""
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette