added BindTexImage / ReleaseTexImage

This commit is contained in:
Andrey Sidorov 2014-03-06 22:52:15 +11:00
parent 10b68eecad
commit 6f455fffd9

View file

@ -49,9 +49,15 @@ exports.requireExt = function(display, callback)
X.pack_stream.flush();
}
ext.CreatePixmap = function(screen, visual, pixmap, glxpixmap) {
ext.CreateGLXPixmap = function(screen, visual, pixmap, glxpixmap) {
X.seq_num++;
X.pack_stream.pack('CCSLLLL', [ext.majorOpcode, 22, 5, screen, pixmap, glxpixmap]);
X.pack_stream.pack('CCSLLLL', [ext.majorOpcode, 13, 5, screen, visual, pixmap, glxpixmap]);
console.log('CreateGlxPix', X.seq_num);
console.log(ext.majorOpcode, 13, 5, screen, visual, pixmap, glxpixmap);
console.trace();
X.pack_stream.flush();
}
@ -239,11 +245,32 @@ exports.requireExt = function(display, callback)
ext.VendorPrivate = function(ctx, code, data) {
X.seq_num++;
X.pack_stream.pack('CCSLL', [ext.majorOpcode, 16, 3+data.length, code, ctx]);
X.pack_stream.pack('CCSLL', [ext.majorOpcode, 16, 3+data.length/4, code, ctx]);
X.pack_stream.write_queue.push(data);
X.pack_stream.flush();
}
// 1330 - X_GLXvop_BindTexImageEXT
// 1331 - X_GLXvop_ReleaseTexImageEXT
ext.BindTexImage = function(ctx, drawable, buffer, attribs) {
if (!attribs)
attribs = [];
var data = new Buffer(12 + attribs.length*4);
data.writeUInt32LE(drawable, 0);
data.writeUInt32LE(buffer, 4);
data.writeUInt32LE(attribs.length, 8);
for (var i=0; i < attribs.length; ++i)
data.writeUint32LE(attribs.length, 12+i*4);
ext.VendorPrivate(ctx, 1330, data);
}
ext.ReleaseTexImage = function(ctx, drawable, buffer) {
var data = new Buffer(8);
data.writeUint32LE(drawable, 0);
data.writeUint32LE(buffer, 4);
ext.VendorPrivate(ctx, 1331, data);
}
// VendorPrivateWithReply - opcode 17
ext.RenderLarge = function(ctx, requestNum, requestTotal, data) {