Permalink
Browse files

Extraced error message template to new file

  • Loading branch information...
1 parent 6fc8ec6 commit 27be4e1856afdb83743ed17aa65b7672a48a9658 @ingemaradahl committed Aug 24, 2012
Showing with 33 additions and 27 deletions.
  1. +1 −0 src/client-en.xml
  2. +0 −27 src/webgl/api.js
  3. +32 −0 src/webgl/error_messages.js
View
@@ -449,6 +449,7 @@ window.load_screen_timeout = window.setTimeout(function()
<script src="./webgl/utils.js"/>
<script src="./webgl/mesh_drawer.js"/>
<script src="./webgl/api.js"/>
+<script src="./webgl/error_messages.js"/>
<script src="./webgl/snapshot.js"/>
<script src="./webgl/program.js"/>
<script src="./webgl/buffer.js"/>
View
@@ -1503,30 +1503,3 @@ cls.WebGLAPI.CONSTANTS = {
ZERO: 0
};
-// TODO add more possible solutions.
-cls.WebGLAPI.ERROR_MESSAGES = {
- "drawArrays": {
- "INVALID_VALUE": [{
- "txt": "Parameter 'first' or 'count' is negative.",
- "ref": "http://www.khronos.org/registry/webgl/specs/latest/#5.14.11"
- }],
- "INVALID_ENUM": [{
- "txt": "Parameter 'mode' is not an accepted value.",
- "ref": "http://www.khronos.org/opengles/sdk/docs/man/xhtml/glDrawArrays.xml"
- }],
- "INVALID_FRAMEBUFFER_OPERATION": [{
- "txt": "The currently bound framebuffer is not framebuffer complete (i.e. the return value from checkFramebufferStatus is not FRAMEBUFFER_COMPLETE)."
- }],
- "INVALID_OPERATION": [{
- "txt": "Addition of prameters 'firstVert' and 'numVerts' overflow a 32-bit integer"
- }, {
- "txt": "The bound vertex buffer does not contain enough data."
- }, {
- "txt": "A vertex attribute is enabled as an array via enableVertexAttribArray but no buffer is bound to that attribute via bindBuffer and vertexAttribPointer.",
- "ref": "http://www.khronos.org/registry/webgl/specs/latest/#6.4"
- }]
- },
- "uniform1[fi]v?": {
-
- }
-};
@@ -0,0 +1,32 @@
+"use strict";
+
+window.cls || (window.cls = {});
+
+// TODO add more possible solutions.
+cls.WebGLAPI.ERROR_MESSAGES = {
+ "drawArrays": {
+ "INVALID_VALUE": [{
+ "txt": "Parameter 'first' or 'count' is negative.",
+ "ref": "http://www.khronos.org/registry/webgl/specs/latest/#5.14.11"
+ }],
+ "INVALID_ENUM": [{
+ "txt": "Parameter 'mode' is not an accepted value.",
+ "ref": "http://www.khronos.org/opengles/sdk/docs/man/xhtml/glDrawArrays.xml"
+ }],
+ "INVALID_FRAMEBUFFER_OPERATION": [{
+ "txt": "The currently bound framebuffer is not framebuffer complete (i.e. the return value from checkFramebufferStatus is not FRAMEBUFFER_COMPLETE)."
+ }],
+ "INVALID_OPERATION": [{
+ "txt": "Addition of prameters 'firstVert' and 'numVerts' overflow a 32-bit integer"
+ }, {
+ "txt": "The bound vertex buffer does not contain enough data."
+ }, {
+ "txt": "A vertex attribute is enabled as an array via enableVertexAttribArray but no buffer is bound to that attribute via bindBuffer and vertexAttribPointer.",
+ "ref": "http://www.khronos.org/registry/webgl/specs/latest/#6.4"
+ }]
+ },
+ "uniform1[fi]v?": {
+
+ }
+};
+

0 comments on commit 27be4e1

Please sign in to comment.