Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(25)

Side by Side Diff: third_party/glew/src/glew.c

Issue 525022: Revert 35509 - linux: implement gpu plugin... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « gpu/gpu_plugin/gpu_plugin.cc ('k') | webkit/webkit.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 ** The OpenGL Extension Wrangler Library 2 ** The OpenGL Extension Wrangler Library
3 ** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org> 3 ** Copyright (C) 2002-2008, Milan Ikits <milan ikits[]ieee org>
4 ** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org> 4 ** Copyright (C) 2002-2008, Marcelo E. Magallon <mmagallo[]debian org>
5 ** Copyright (C) 2002, Lev Povalahev 5 ** Copyright (C) 2002, Lev Povalahev
6 ** All rights reserved. 6 ** All rights reserved.
7 ** 7 **
8 ** Redistribution and use in source and binary forms, with or without 8 ** Redistribution and use in source and binary forms, with or without
9 ** modification, are permitted provided that the following conditions are met: 9 ** modification, are permitted provided that the following conditions are met:
10 ** 10 **
(...skipping 9539 matching lines...) Expand 10 before | Expand all | Expand 10 after
9550 9550
9551 GLboolean glxewGetExtension (const char* name) 9551 GLboolean glxewGetExtension (const char* name)
9552 { 9552 {
9553 GLubyte* p; 9553 GLubyte* p;
9554 GLubyte* end; 9554 GLubyte* end;
9555 GLuint len = _glewStrLen((const GLubyte*)name); 9555 GLuint len = _glewStrLen((const GLubyte*)name);
9556 static PFNGLXGETCLIENTSTRINGPROC __glewXGetClientString = NULL; 9556 static PFNGLXGETCLIENTSTRINGPROC __glewXGetClientString = NULL;
9557 /* if (glXQueryExtensionsString == NULL || glXGetCurrentDisplay == NULL) retur n GL_FALSE; */ 9557 /* if (glXQueryExtensionsString == NULL || glXGetCurrentDisplay == NULL) retur n GL_FALSE; */
9558 /* p = (GLubyte*)glXQueryExtensionsString(glXGetCurrentDisplay(), DefaultScree n(glXGetCurrentDisplay())); */ 9558 /* p = (GLubyte*)glXQueryExtensionsString(glXGetCurrentDisplay(), DefaultScree n(glXGetCurrentDisplay())); */
9559 if (__glewXGetClientString == NULL) { 9559 if (__glewXGetClientString == NULL) {
9560 __glewXGetClientString = (PFNGLXGETCLIENTSTRINGPROC) glewGetProcAddress((con st GLubyte *)"glXGetClientString"); 9560 __glewXGetClientString = (PFNGLXGETCLIENTSTRINGPROC) glewGetProcAddress("glX GetClientString");
9561 } 9561 }
9562 if (__glewXGetClientString == NULL) return GL_FALSE; 9562 if (__glewXGetClientString == NULL) return GL_FALSE;
9563 if (glXGetCurrentDisplay == NULL) return GL_FALSE; 9563 if (glXGetCurrentDisplay == NULL) return GL_FALSE;
9564 p = (GLubyte*)__glewXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS); 9564 p = (GLubyte*)__glewXGetClientString(glXGetCurrentDisplay(), GLX_EXTENSIONS);
9565 if (0 == p) return GL_FALSE; 9565 if (0 == p) return GL_FALSE;
9566 end = p + _glewStrLen(p); 9566 end = p + _glewStrLen(p);
9567 while (p < end) 9567 while (p < end)
9568 { 9568 {
9569 GLuint n = _glewStrCLen(p, ' '); 9569 GLuint n = _glewStrCLen(p, ' ');
9570 if (len == n && _glewStrSame((const GLubyte*)name, p, n)) return GL_TRUE; 9570 if (len == n && _glewStrSame((const GLubyte*)name, p, n)) return GL_TRUE;
9571 p += n+1; 9571 p += n+1;
9572 } 9572 }
9573 return GL_FALSE; 9573 return GL_FALSE;
9574 } 9574 }
9575 9575
9576 typedef Bool (* PFNGLXQUERYVERSIONPROC) (Display *dpy, int *major, int *minor); 9576 typedef Bool (* PFNGLXQUERYVERSIONPROC) (Display *dpy, int *major, int *minor);
9577 9577
9578 GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF_LIST) 9578 GLenum glxewContextInit (GLXEW_CONTEXT_ARG_DEF_LIST)
9579 { 9579 {
9580 int major, minor; 9580 int major, minor;
9581 static PFNGLXQUERYVERSIONPROC __glewXQueryVersion = NULL; 9581 static PFNGLXQUERYVERSIONPROC __glewXQueryVersion = NULL;
9582 if (__glewXQueryVersion == NULL) { 9582 if (__glewXQueryVersion == NULL) {
9583 __glewXQueryVersion = (PFNGLXQUERYVERSIONPROC) glewGetProcAddress((const GLu byte *)"glXQueryVersion"); 9583 __glewXQueryVersion = (PFNGLXQUERYVERSIONPROC) glewGetProcAddress("glXQueryV ersion");
9584 } 9584 }
9585 if (__glewXQueryVersion == NULL) return GL_FALSE; 9585 if (__glewXQueryVersion == NULL) return GL_FALSE;
9586 /* initialize core GLX 1.2 */ 9586 /* initialize core GLX 1.2 */
9587 if (_glewInit_GLX_VERSION_1_2(GLEW_CONTEXT_ARG_VAR_INIT)) return GLEW_ERROR_GL X_VERSION_11_ONLY; 9587 if (_glewInit_GLX_VERSION_1_2(GLEW_CONTEXT_ARG_VAR_INIT)) return GLEW_ERROR_GL X_VERSION_11_ONLY;
9588 /* initialize flags */ 9588 /* initialize flags */
9589 CONST_CAST(GLXEW_VERSION_1_0) = GL_TRUE; 9589 CONST_CAST(GLXEW_VERSION_1_0) = GL_TRUE;
9590 CONST_CAST(GLXEW_VERSION_1_1) = GL_TRUE; 9590 CONST_CAST(GLXEW_VERSION_1_1) = GL_TRUE;
9591 CONST_CAST(GLXEW_VERSION_1_2) = GL_TRUE; 9591 CONST_CAST(GLXEW_VERSION_1_2) = GL_TRUE;
9592 CONST_CAST(GLXEW_VERSION_1_3) = GL_TRUE; 9592 CONST_CAST(GLXEW_VERSION_1_3) = GL_TRUE;
9593 CONST_CAST(GLXEW_VERSION_1_4) = GL_TRUE; 9593 CONST_CAST(GLXEW_VERSION_1_4) = GL_TRUE;
(...skipping 3300 matching lines...) Expand 10 before | Expand all | Expand 10 after
12894 } 12894 }
12895 #endif 12895 #endif
12896 } 12896 }
12897 } 12897 }
12898 ret = (len == 0); 12898 ret = (len == 0);
12899 } 12899 }
12900 return ret; 12900 return ret;
12901 } 12901 }
12902 12902
12903 #endif /* _WIN32 */ 12903 #endif /* _WIN32 */
OLDNEW
« no previous file with comments | « gpu/gpu_plugin/gpu_plugin.cc ('k') | webkit/webkit.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698