shorter error messages when calling a GL function without a bound context (FDO bug...
authorBrian Paul <brian.paul@tungstengraphics.com>
Fri, 5 Nov 2004 18:32:02 +0000 (18:32 +0000)
committerBrian Paul <brian.paul@tungstengraphics.com>
Fri, 5 Nov 2004 18:32:02 +0000 (18:32 +0000)
src/mesa/glapi/glapi.c

index 0f0add891554296cfbd8558b2b7dc887e6a35651..9c488169591f154317d7a534058dabba1e54eee7 100644 (file)
@@ -100,17 +100,15 @@ warn(void)
 
 #define F NULL
 
-#define DISPATCH(func, args, msg)                                      \
-   if (warn()) {                                                       \
-      warning_func(NULL, "GL User Error: called without context:");    \
-      warning_func msg;                                                        \
+#define DISPATCH(func, args, msg)                                            \
+   if (warn()) {                                                             \
+      warning_func(NULL, "GL User Error: called without context: %s", #func); \
    }
 
-#define RETURN_DISPATCH(func, args, msg)                               \
-   if (warn()) {                                                       \
-      warning_func(NULL, "GL User Error: called without context:");    \
-      warning_func msg;                                                        \
-   }                                                                   \
+#define RETURN_DISPATCH(func, args, msg)                                     \
+   if (warn()) {                                                             \
+      warning_func(NULL, "GL User Error: called without context: %s", #func); \
+   }                                                                         \
    return 0
 
 #define DISPATCH_TABLE_NAME __glapi_noop_table