[javascript-dev] Video Texture on OpenGL in Javascript
Andrew Roth
aroth21 at rogers.com
Fri Nov 16 21:09:43 MST 2007
- Previous message: [javascript-dev] jit.buffer~
- Next message: [javascript-dev] Video Texture on OpenGL in Javascript
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
How do I apply a video texture to openGL objects in Javascript? I've looked through the documentation and can't seem to find it.
I'm just modifying tutorial 47 at the moment, this is what I have so far. I think i'm just missing a name but I'm not sure the syntax for arguements in GL objects:
//set video texture from movie
var myvideo = new JitterObject("jit.qt.movie", 320, 240);
//set Matrix for video
var mymatrix = new JitterMatrix(4, "char", 320, 240);
//Read a movie
function read(filename)
{
if(arguments.length==0) {
//no movie specified, so open a dialog
myvideo.read();
}
else {myvideo.read(filename);
}
}
//create texture
var tex1 = new JitterObject("jit.gl.texture", "ListenWindow");
// create a [jit.gl.gridshape] object for use to control with the mouse
var mywidget = new JitterObject("jit.gl.gridshape","ListenWindow");
mywidget.shape = "sphere";
mywidget.lighting_enable = 1;
mywidget.smooth_shading = 1;
mywidget.texture = tex1;
mywidget.scale = [0.1,0.1,0.1];
mywidget.color = [1,1,1,0.5] ;
mywidget.blend_enable = 1;
mywidget.position = [0,0];
- Previous message: [javascript-dev] jit.buffer~
- Next message: [javascript-dev] Video Texture on OpenGL in Javascript
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
