Alexandre Julliard : opengl32: Make some functions and variables static.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Aug 2 06:48:46 CDT 2006


Module: wine
Branch: refs/heads/master
Commit: 1249c64277e8e05247a8cbcc1ff903154496b191
URL:    http://source.winehq.org/git/?p=wine.git;a=commit;h=1249c64277e8e05247a8cbcc1ff903154496b191

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Wed Aug  2 13:26:36 2006 +0200

opengl32: Make some functions and variables static.

---

 dlls/opengl32/wgl.c     |   14 +++++++++++++-
 dlls/opengl32/wgl_ext.c |   30 +++++++++++++++---------------
 dlls/opengl32/wgl_ext.h |   13 -------------
 3 files changed, 28 insertions(+), 29 deletions(-)

diff --git a/dlls/opengl32/wgl.c b/dlls/opengl32/wgl.c
index 178cb6b..548ea7d 100644
--- a/dlls/opengl32/wgl.c
+++ b/dlls/opengl32/wgl.c
@@ -47,8 +47,20 @@ #include "wine/debug.h"
 WINE_DEFAULT_DEBUG_CHANNEL(wgl);
 WINE_DECLARE_DEBUG_CHANNEL(opengl);
 
+typedef struct wine_glx_s {
+  unsigned     version;
+  /** SGIX / 1.3 */
+  GLXFBConfig* (*p_glXChooseFBConfig) (Display *dpy, int screen, const int *attrib_list, int *nelements);
+  int          (*p_glXGetFBConfigAttrib) (Display *dpy, GLXFBConfig config, int attribute, int *value);
+  XVisualInfo* (*p_glXGetVisualFromFBConfig) (Display *dpy, GLXFBConfig config); 
+  /** 1.3 */
+  GLXFBConfig* (*p_glXGetFBConfigs) (Display *dpy, int screen, int *nelements);
+  void         (*p_glXQueryDrawable) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
+  Bool         (*p_glXMakeContextCurrent) (Display *, GLXDrawable, GLXDrawable, GLXContext);
+} wine_glx_t;
+
 /** global glx object */
-wine_glx_t wine_glx;
+static wine_glx_t wine_glx;
 
 /* x11drv GDI escapes */
 #define X11DRV_ESCAPE 6789
diff --git a/dlls/opengl32/wgl_ext.c b/dlls/opengl32/wgl_ext.c
index f7c95df..0147e59 100644
--- a/dlls/opengl32/wgl_ext.c
+++ b/dlls/opengl32/wgl_ext.c
@@ -90,21 +90,21 @@ static char *WGL_extensions = NULL;
  *
  * @TODO: use a struct to handle parameters 
  */
-BOOL query_function_make_current_read(glXGetProcAddressARB_t proc, const char *gl_version, const char *gl_extensions, 
+static BOOL query_function_make_current_read(glXGetProcAddressARB_t proc, const char *gl_version, const char *gl_extensions, 
 				      const char* glx_version, const char *glx_extensions,
 				      const char *server_glx_extensions, const char *client_glx_extensions)
 {
   return 0 <= strcmp("1.3", glx_version);
 }
 
-BOOL query_function_multisample(glXGetProcAddressARB_t proc, const char *gl_version, const char *gl_extensions, 
+static BOOL query_function_multisample(glXGetProcAddressARB_t proc, const char *gl_version, const char *gl_extensions, 
 				const char* glx_version, const char *glx_extensions,
 				const char *server_glx_extensions, const char *client_glx_extensions)
 {
   return NULL != strstr(glx_extensions, "GLX_ARB_multisample");
 }
 
-BOOL query_function_pbuffer(glXGetProcAddressARB_t proc, const char *gl_version, const char *gl_extensions, 
+static BOOL query_function_pbuffer(glXGetProcAddressARB_t proc, const char *gl_version, const char *gl_extensions, 
 			    const char* glx_version, const char *glx_extensions,
 			    const char *server_glx_extensions, const char *client_glx_extensions)
 {
@@ -114,7 +114,7 @@ BOOL query_function_pbuffer(glXGetProcAd
   return 0 <= strcmp("1.3", glx_version) || NULL != strstr(glx_extensions, "GLX_SGIX_pbuffer");
 }
 
-BOOL query_function_pixel_format(glXGetProcAddressARB_t proc, const char *gl_version, const char *gl_extensions, 
+static BOOL query_function_pixel_format(glXGetProcAddressARB_t proc, const char *gl_version, const char *gl_extensions, 
 				 const char* glx_version, const char *glx_extensions,
 				 const char *server_glx_extensions, const char *client_glx_extensions)
 {
@@ -126,12 +126,12 @@ BOOL query_function_pixel_format(glXGetP
  * http://oss.sgi.com/projects/ogl-sample/registry/ARB/wgl_render_texture.txt
  * ~/tmp/ogl/ogl_offscreen_rendering_3
  */
-Bool (*p_glXBindTexImageARB)(Display *dpy, GLXPbuffer pbuffer, int buffer);
-Bool (*p_glXReleaseTexImageARB)(Display *dpy, GLXPbuffer pbuffer, int buffer);
-Bool (*p_glXDrawableAttribARB)(Display *dpy, GLXDrawable draw, const int *attribList);
-int  use_render_texture_emulation = 0;
-int  use_render_texture_ati = 0;
-BOOL query_function_render_texture(glXGetProcAddressARB_t proc, const char *gl_version, const char *gl_extensions, 
+static Bool (*p_glXBindTexImageARB)(Display *dpy, GLXPbuffer pbuffer, int buffer);
+static Bool (*p_glXReleaseTexImageARB)(Display *dpy, GLXPbuffer pbuffer, int buffer);
+static Bool (*p_glXDrawableAttribARB)(Display *dpy, GLXDrawable draw, const int *attribList);
+static int  use_render_texture_emulation = 0;
+static int  use_render_texture_ati = 0;
+static BOOL query_function_render_texture(glXGetProcAddressARB_t proc, const char *gl_version, const char *gl_extensions, 
 				   const char* glx_version, const char *glx_extensions,
 				   const char *server_glx_extensions, const char *client_glx_extensions)
 {
@@ -165,8 +165,8 @@ BOOL query_function_render_texture(glXGe
   return bTest;
 }
 
-int (*p_glXSwapIntervalSGI)(int);
-BOOL query_function_swap_control(glXGetProcAddressARB_t proc, const char *gl_version, const char *gl_extensions, 
+static int (*p_glXSwapIntervalSGI)(int);
+static BOOL query_function_swap_control(glXGetProcAddressARB_t proc, const char *gl_version, const char *gl_extensions, 
 				 const char* glx_version, const char *glx_extensions,
 				 const char *server_glx_extensions, const char *client_glx_extensions)
 {
@@ -1212,7 +1212,7 @@ GLboolean WINAPI wglQueryPbufferARB(HPBU
   return GL_TRUE;
 }
 
-GLboolean WINAPI wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuffer)
+static GLboolean WINAPI wglBindTexImageARB(HPBUFFERARB hPbuffer, int iBuffer)
 {
   Wine_GLPBuffer* object = (Wine_GLPBuffer*) hPbuffer;
   TRACE("(%p, %d)\n", hPbuffer, iBuffer);
@@ -1255,7 +1255,7 @@ GLboolean WINAPI wglBindTexImageARB(HPBU
   return GL_FALSE;
 }
 
-GLboolean WINAPI wglReleaseTexImageARB(HPBUFFERARB hPbuffer, int iBuffer)
+static GLboolean WINAPI wglReleaseTexImageARB(HPBUFFERARB hPbuffer, int iBuffer)
 {
   Wine_GLPBuffer* object = (Wine_GLPBuffer*) hPbuffer;
   TRACE("(%p, %d)\n", hPbuffer, iBuffer);
@@ -1295,7 +1295,7 @@ GLboolean WINAPI wglReleaseTexImageARB(H
   return GL_FALSE;
 }
 
-GLboolean WINAPI wglSetPbufferAttribARB(HPBUFFERARB hPbuffer, const int *piAttribList)
+static GLboolean WINAPI wglSetPbufferAttribARB(HPBUFFERARB hPbuffer, const int *piAttribList)
 {
   Wine_GLPBuffer* object = (Wine_GLPBuffer*) hPbuffer;
   WARN("(%p, %p): alpha-testing, report any problem\n", hPbuffer, piAttribList);
diff --git a/dlls/opengl32/wgl_ext.h b/dlls/opengl32/wgl_ext.h
index 29cbc5a..084c520 100644
--- a/dlls/opengl32/wgl_ext.h
+++ b/dlls/opengl32/wgl_ext.h
@@ -39,17 +39,4 @@ typedef struct {
 extern WGL_extension wgl_extension_registry[];
 extern int wgl_extension_registry_size;
 
-typedef struct wine_glx_s {
-  unsigned     version;
-  /** SGIX / 1.3 */
-  GLXFBConfig* (*p_glXChooseFBConfig) (Display *dpy, int screen, const int *attrib_list, int *nelements);
-  int          (*p_glXGetFBConfigAttrib) (Display *dpy, GLXFBConfig config, int attribute, int *value);
-  XVisualInfo* (*p_glXGetVisualFromFBConfig) (Display *dpy, GLXFBConfig config); 
-  /** 1.3 */
-  GLXFBConfig* (*p_glXGetFBConfigs) (Display *dpy, int screen, int *nelements);
-  void         (*p_glXQueryDrawable) (Display *dpy, GLXDrawable draw, int attribute, unsigned int *value);
-  Bool         (*p_glXMakeContextCurrent) (Display *, GLXDrawable, GLXDrawable, GLXContext);
-} wine_glx_t;
-extern wine_glx_t wine_glx;
-
 #endif /* __DLLS_OPENGL32_WGL_EXT_H */




More information about the wine-cvs mailing list