Skip to content

Commit

Permalink
remove scissor, see #668
Browse files Browse the repository at this point in the history
  • Loading branch information
lexaknyazev committed Aug 11, 2016
1 parent 6af7b77 commit 01b46a3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 32 deletions.
21 changes: 5 additions & 16 deletions specification/2.0/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -837,9 +837,9 @@ Render states define the fixed-function GL state when a primitive is rendered. T
* `enable`: an array of integers corresponding to Boolean GL states that should be enabled using GL's `enable` function.
* `functions`: a dictionary object containing properties corresponding to the names of GL state functions to call. Each property is an array, where the elements correspond to the arguments of the GL function.
Valid values for elements in the `enable` array are `3042` (`BLEND`), `2884` (`CULL_FACE`), `2929` (`DEPTH_TEST`), `32823` (`POLYGON_OFFSET_FILL`), `32926` (`SAMPLE_ALPHA_TO_COVERAGE`), and `3089` (`SCISSOR_TEST`). If any of these values are not in the array, the GL state should be disabled (which is the GL default state). If the `enable` array is not defined in the `pass`, all of these Boolean GL states are disabled.
Valid values for elements in the `enable` array are `3042` (`BLEND`), `2884` (`CULL_FACE`), `2929` (`DEPTH_TEST`), `32823` (`POLYGON_OFFSET_FILL`), and `32926` (`SAMPLE_ALPHA_TO_COVERAGE`). If any of these values are not in the array, the GL state should be disabled (which is the GL default state). If the `enable` array is not defined in the `pass`, all of these Boolean GL states are disabled.
Each property in `functions` indicates a GL function to call and the arguments to provide. Valid property names are `"blendColor"`, `"blendEquationSeparate"`, `"blendFuncSeparate"`, `"colorMask"`, `"cullFace"`, `"depthFunc"`, `"depthMask"`, `"depthRange"`, `"frontFace"`, `"lineWidth"`, `"polygonOffset"`, and `"scissor"`. If a property is not defined, the GL state for that function should be set to the default value(s) shown in the example below.
Each property in `functions` indicates a GL function to call and the arguments to provide. Valid property names are `"blendColor"`, `"blendEquationSeparate"`, `"blendFuncSeparate"`, `"colorMask"`, `"cullFace"`, `"depthFunc"`, `"depthMask"`, `"depthRange"`, `"frontFace"`, `"lineWidth"`, and `"polygonOffset"`. If a property is not defined, the GL state for that function should be set to the default value(s) shown in the example below.
The following example `states` object indicates to enable all Boolean states (see the `enable` array) and use the default values for all the GL state functions (which could be omitted).
Expand All @@ -850,8 +850,7 @@ The following example `states` object indicates to enable all Boolean states (se
2884, // CULL_FACE
2929, // DEPTH_TEST
32823, // POLYGON_OFFSET_FILL
32926, // SAMPLE_ALPHA_TO_COVERAGE
3089 // SCISSOR_TEST
32926 // SAMPLE_ALPHA_TO_COVERAGE
], // empty by default
"functions": {
"blendColor": [0.0, 0.0, 0.0, 0.0], // (red, green, blue, alpha)
Expand All @@ -872,8 +871,7 @@ The following example `states` object indicates to enable all Boolean states (se
"depthRange": [0.0, 1.0], // (zNear, zFar)
"frontFace": [2305], // CCW
"lineWidth": [1.0],
"polygonOffset": [0.0, 0.0], // (factor, units)
"scissor": [0, 0, 0, 0] // (x, y, width, height)
"polygonOffset": [0.0, 0.0] // (factor, units)
}
}
```
Expand Down Expand Up @@ -3119,7 +3117,7 @@ Additional properties are not allowed.
### states.enable
WebGL states to enable. States not in the array are disabled. Valid values for each element correspond to WebGL enums: `3042` (BLEND), `2884` (CULL_FACE), `2929` (DEPTH_TEST), `32823` (POLYGON_OFFSET_FILL), `32926` (SAMPLE_ALPHA_TO_COVERAGE), and `3089` (SCISSOR_TEST).
WebGL states to enable. States not in the array are disabled. Valid values for each element correspond to WebGL enums: `3042` (BLEND), `2884` (CULL_FACE), `2929` (DEPTH_TEST), `32823` (POLYGON_OFFSET_FILL), and `32926` (SAMPLE_ALPHA_TO_COVERAGE).
* **Type**: `integer[]`
* Each element in the array must be unique.
Expand Down Expand Up @@ -3171,7 +3169,6 @@ Arguments for fixed-function rendering state functions other than `enable()`/`di
|**frontFace**|`integer[1]`|Integer value passed to `frontFace()`.|No, default: `[2305]`|
|**lineWidth**|`number[1]`|Floating-point value passed to `lineWidth()`.|No, default: `[1]`|
|**polygonOffset**|`number[2]`|Floating-point value passed to `polygonOffset()`. [factor, units]|No, default: `[0,0]`|
|**scissor**|`number[4]`|Floating-point value passed to `scissor()`. [x, y, width, height].|No, default: `[0,0,0,0]`|
|**extensions**|`object`|Dictionary object with extension-specific objects.|No|
|**extras**|`any`|Application-specific data.|No|
Expand Down Expand Up @@ -3273,14 +3270,6 @@ Floating-point value passed to `polygonOffset()`. [factor, units]
* **Required**: No, default: `[0,0]`
* **Related WebGL functions**: `polygonOffset()`
### functions.scissor
Floating-point value passed to `scissor()`. [x, y, width, height]. The default is the dimensions of the canvas when the WebGL context is created. width and height must be greater than zero.
* **Type**: `number[4]`
* **Required**: No, default: `[0,0,0,0]`
* **Related WebGL functions**: `scissor()`
### functions.extensions
Dictionary object with extension-specific objects.
Expand Down
3 changes: 1 addition & 2 deletions specification/2.0/schema/examples/techniques.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"u_jointMatrix": "jointMatrix"
},
"states" : {
"enable" : [3042, 2884, 2929, 32823, 32926, 3089],
"enable" : [3042, 2884, 2929, 32823, 32926],
"functions" : {
"blendColor": [0.0, 0.0, 0.0, 0.0],
"blendEquationSeparate" : [32774, 32774],
Expand All @@ -100,7 +100,6 @@
"frontFace" : [2305],
"lineWidth" : [1.0],
"polygonOffset" : [0.0, 0.0],
"scissor" : [0, 0, 0, 0],
"extensions" : {
"extension_name" : {
"extension specific" : "value"
Expand Down
12 changes: 0 additions & 12 deletions specification/2.0/schema/technique.states.functions.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,18 +142,6 @@
"maxItems" : 2,
"default" : [0.0, 0.0],
"gltf_webgl" : "`polygonOffset()`"
},
"scissor" : {
"type" : "array",
"description" : "Floating-point value passed to `scissor()`. [x, y, width, height].",
"items" : {
"type" : "number"
},
"minItems" : 4,
"maxItems" : 4,
"default" : [0.0, 0.0, 0.0, 0.0],
"gltf_detailedDescription" : "Floating-point value passed to `scissor()`. [x, y, width, height]. The default is the dimensions of the canvas when the WebGL context is created. width and height must be greater than zero.",
"gltf_webgl" : "`scissor()`"
}
},
"additionalProperties" : false
Expand Down
4 changes: 2 additions & 2 deletions specification/2.0/schema/technique.states.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"description" : "WebGL states to enable.",
"items" : {
"type" : "integer",
"enum" : [3042, 2884, 2929, 32823, 32926, 3089],
"gltf_enumNames" : ["BLEND", "CULL_FACE", "DEPTH_TEST", "POLYGON_OFFSET_FILL", "SAMPLE_ALPHA_TO_COVERAGE", "SCISSOR_TEST"]
"enum" : [3042, 2884, 2929, 32823, 32926],
"gltf_enumNames" : ["BLEND", "CULL_FACE", "DEPTH_TEST", "POLYGON_OFFSET_FILL", "SAMPLE_ALPHA_TO_COVERAGE"]
},
"uniqueItems" : true,
"default" : [],
Expand Down

0 comments on commit 01b46a3

Please sign in to comment.