VirtualBox

source: vbox/trunk/src/VBox/GuestHost/OpenGL/packer/pack_error.c@ 33475

最後變更 在這個檔案從33475是 33475,由 vboxsync 提交於 14 年 前

crOpenGL/wddm: multithreading fix

  • 屬性 svn:eol-style 設為 native
  • 屬性 svn:keywords 設為 Id
檔案大小: 1.6 KB
 
1/* Copyright (c) 2001, Stanford University
2 * All rights reserved.
3 *
4 * See the file LICENSE.txt for information on redistributing this software.
5 */
6
7
8#include "cr_error.h"
9#include "cr_environment.h"
10#include "cr_pack.h"
11#include "packer.h"
12
13
14/*
15 * Set the error handler callback
16 */
17void crPackErrorFunction( CRPackContext *pc, CRPackErrorHandlerFunc function )
18{
19 pc->Error = function;
20}
21
22
23/*
24 * This function is called by the packer functions when it detects and
25 * OpenGL error.
26 */
27void __PackError( int line, const char *file, GLenum error, const char *info)
28{
29 CR_GET_PACKER_CONTEXT(pc);
30
31 if (pc->Error)
32 pc->Error( line, file, error, info );
33
34 if (crGetenv("CR_DEBUG"))
35 {
36 char *glerr;
37
38 switch (error) {
39 case GL_NO_ERROR:
40 glerr = "GL_NO_ERROR";
41 break;
42 case GL_INVALID_VALUE:
43 glerr = "GL_INVALID_VALUE";
44 break;
45 case GL_INVALID_ENUM:
46 glerr = "GL_INVALID_ENUM";
47 break;
48 case GL_INVALID_OPERATION:
49 glerr = "GL_INVALID_OPERATION";
50 break;
51 case GL_STACK_OVERFLOW:
52 glerr = "GL_STACK_OVERFLOW";
53 break;
54 case GL_STACK_UNDERFLOW:
55 glerr = "GL_STACK_UNDERFLOW";
56 break;
57 case GL_OUT_OF_MEMORY:
58 glerr = "GL_OUT_OF_MEMORY";
59 break;
60 case GL_TABLE_TOO_LARGE:
61 glerr = "GL_TABLE_TOO_LARGE";
62 break;
63 default:
64 glerr = "unknown";
65 break;
66 }
67
68 crWarning( "GL error in packer: %s, line %d: %s: %s",
69 file, line, glerr, info );
70 }
71}
注意: 瀏覽 TracBrowser 來幫助您使用儲存庫瀏覽器

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette