This commit is contained in:
Andrey Sidorov 2012-12-11 16:05:18 +11:00
parent e712fdb0a5
commit a5087c35c6
2 changed files with 16 additions and 1 deletions

View file

@ -9,6 +9,9 @@ module.exports = {
DEPTH_TEST: 0x0B71,
NORMALIZE: 0x0BA1,
BLEND: 0x0BE2,
POLYGON_SMOOTH: 0x0B41,
// glShadeModel
FLAT: 0x1D00,
SMOOTH: 0x1D01,
@ -43,6 +46,10 @@ module.exports = {
COMPILE: 0x1300,
// Hint
POLYGON_SMOOTH_HINT: 0x0C53,
NICEST: 0x1102,
// glGetString
RENDERER: 0x1F01,
VERSION: 0x1F02,

View file

@ -52,6 +52,12 @@ module.exports = function(GLX) {
buffers.push(res);
};
function serialize2i(opcode, value1, value2) {
var res = commandBuffer(opcode, 12);
res.writeUInt32LE(value1, 4);
res.writeUInt32LE(value2, 8);
buffers.push(res);
}
function serialize1i(opcode, value) {
var res = commandBuffer(opcode, 8);
@ -127,6 +133,8 @@ module.exports = function(GLX) {
ShadeModel: function(model) {
serialize1i(104, model);
},
Hint: function(target, mode) {
serialize2i(85, target, mode);
}
};
}