Changeset 16219 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL/windows_getprocaddress.py
- Timestamp:
- Jan 26, 2009 10:26:43 AM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 42009
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/crOpenGL/windows_getprocaddress.py
r15532 r16219 39 39 keys = apiutil.GetAllFunctions(sys.argv[1]+"/APIspec.txt") 40 40 for func_name in keys: 41 42 43 44 45 46 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 47 47 48 49 50 51 52 53 54 55 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' 56 56 57 57 … … 59 59 60 60 for func_name in keys: 61 62 63 64 65 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) 66 66 67 67 print "\t/* Windows ICD functions */" … … 80 80 "SwapBuffers", 81 81 "SwapLayerBuffers", 82 83 84 85 82 "ReleaseContext", 83 "SetContext", 84 "ValidateVersion"): 85 print '\t{ "Drv%s", (CR_PROC) Drv%s },' % (func_name, func_name) 86 86 87 87 print '\t{ "DrvGetProcAddress", (CR_PROC) wglGetProcAddress_prox },' 88 88 89 89 print """ 90 90 { NULL, NULL } 91 91 }; 92 92 93 93 CR_PROC CR_APIENTRY crGetProcAddress( const char *name ) 94 94 { 95 96 95 int i; 96 stubInit(); 97 97 98 99 100 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 } 103 103 104 104 return NULL; 105 105 } 106 106 … … 114 114 /* As these are Windows specific (i.e. wgl), define these now.... */ 115 115 #ifdef WINDOWS 116 117 118 119 120 121 122 123 124 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 } 126 126 #endif 127 127 """
Note:
See TracChangeset
for help on using the changeset viewer.