Last change
on this file since 75401 was 54905, checked in by vboxsync, 10 years ago |
Host 3D: Chromium server: add Expando SPU and DLM module in order to record and save OpenGL Display Lists (currently disabled).
|
-
Property svn:eol-style
set to
native
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.1 KB
|
Line | |
---|
1 | /* $Id: dlm_error.c 54905 2015-03-23 11:20:58Z vboxsync $ */
|
---|
2 | #include <stdio.h>
|
---|
3 | #include <stdarg.h>
|
---|
4 | #include "chromium.h"
|
---|
5 | #include "cr_mem.h"
|
---|
6 | #include "dlm.h"
|
---|
7 | #include "cr_environment.h"
|
---|
8 | #include "cr_error.h"
|
---|
9 |
|
---|
10 | #define GLCLIENT_LIST_ALLOC 1024
|
---|
11 |
|
---|
12 | void crdlmWarning( int line, char *file, GLenum error, char *format, ... )
|
---|
13 | {
|
---|
14 | char errstr[8096];
|
---|
15 | va_list args;
|
---|
16 |
|
---|
17 | if (crGetenv("CR_DEBUG")) {
|
---|
18 | char *glerr;
|
---|
19 | va_start( args, format );
|
---|
20 | vsprintf( errstr, format, args );
|
---|
21 | va_end( args );
|
---|
22 |
|
---|
23 | switch (error) {
|
---|
24 | case GL_NO_ERROR:
|
---|
25 | glerr = "GL_NO_ERROR";
|
---|
26 | break;
|
---|
27 | case GL_INVALID_VALUE:
|
---|
28 | glerr = "GL_INVALID_VALUE";
|
---|
29 | break;
|
---|
30 | case GL_INVALID_ENUM:
|
---|
31 | glerr = "GL_INVALID_ENUM";
|
---|
32 | break;
|
---|
33 | case GL_INVALID_OPERATION:
|
---|
34 | glerr = "GL_INVALID_OPERATION";
|
---|
35 | break;
|
---|
36 | case GL_STACK_OVERFLOW:
|
---|
37 | glerr = "GL_STACK_OVERFLOW";
|
---|
38 | break;
|
---|
39 | case GL_STACK_UNDERFLOW:
|
---|
40 | glerr = "GL_STACK_UNDERFLOW";
|
---|
41 | break;
|
---|
42 | case GL_OUT_OF_MEMORY:
|
---|
43 | glerr = "GL_OUT_OF_MEMORY";
|
---|
44 | break;
|
---|
45 | case GL_TABLE_TOO_LARGE:
|
---|
46 | glerr = "GL_TABLE_TOO_LARGE";
|
---|
47 | break;
|
---|
48 | default:
|
---|
49 | glerr = "unknown";
|
---|
50 | break;
|
---|
51 | }
|
---|
52 |
|
---|
53 | crWarning( "DLM error in %s, line %d: %s: %s\n",
|
---|
54 | file, line, glerr, errstr );
|
---|
55 | }
|
---|
56 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.