Go to the source code of this file.
Defines | |
#define | ST_VERSION_STRING "0.1" |
Functions | |
static const GLubyte * | st_get_string (GLcontext *ctx, GLenum name) |
void | st_init_string_functions (struct dd_function_table *functions) |
#define ST_VERSION_STRING "0.1" |
Definition at line 43 of file st_cb_strings.c.
static const GLubyte* st_get_string | ( | GLcontext * | ctx, | |
GLenum | name | |||
) | [static] |
Definition at line 46 of file st_cb_strings.c.
References pipe_winsys::get_name, pipe_screen::get_name, pipe_screen::get_vendor, st_context::pipe, st_context::renderer, pipe_context::screen, st_context(), ST_VERSION_STRING, util_snprintf, st_context::vendor, and pipe_screen::winsys.
00047 { 00048 struct st_context *st = st_context(ctx); 00049 struct pipe_screen *screen = st->pipe->screen; 00050 00051 switch (name) { 00052 case GL_VENDOR: { 00053 const char *vendor = screen->get_vendor( screen ); 00054 const char *tungsten = "Tungsten Graphics, Inc."; 00055 00056 /* Tungsten Graphics, Inc. developed the state_tracker module 00057 * (and much of Mesa), but the driver itself may come from elsewhere. 00058 * The additional string allows "and XyzCorp" to reflect this. 00059 */ 00060 if (vendor && strcmp(vendor, tungsten) != 0) 00061 util_snprintf(st->vendor, sizeof(st->vendor), 00062 "%s and %s", tungsten, vendor); 00063 else 00064 util_snprintf(st->vendor, sizeof(st->vendor), "%s", tungsten); 00065 00066 return (GLubyte *) st->vendor; 00067 } 00068 00069 case GL_RENDERER: 00070 util_snprintf(st->renderer, sizeof(st->renderer), "Gallium %s, %s on %s", 00071 ST_VERSION_STRING, 00072 screen->get_name( screen ), 00073 screen->winsys->get_name( screen->winsys )); 00074 00075 return (GLubyte *) st->renderer; 00076 00077 default: 00078 return NULL; 00079 } 00080 }
void st_init_string_functions | ( | struct dd_function_table * | functions | ) |
Definition at line 83 of file st_cb_strings.c.
References st_get_string().
00084 { 00085 functions->GetString = st_get_string; 00086 }