[jitter] Re: jxs shaders in jit.gl.lua?
Wesley Smith
wesley.hoke at gmail.com
Sun Feb 3 20:46:15 MST 2008
- Previous message: [jitter] Re: jxs shaders in jit.gl.lua?
- Next message: [jitter] Re: jxs shaders in jit.gl.lua?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi Keith, I didn't quite follow your last response. What are you trying to do? Why do you keep talking about multiple binds? A Shader in OpenGL configures the hardware pipeline to process vertices and pixels in a particular manner. Obviously, if you only have 1 card, you only have 1 pipeline thus you can only have 1 shader active at any given time. Make sense? wes On Feb 3, 2008 7:31 PM, keith manlove <keithmanlove at gmail.com> wrote: > I see... I didn't realize that. I thought that it was only one > shader, but I didn't realize that it was a hardware thing. I'll look > into the multiple binds. Thanks for that. > > Keith > > > On Feb 3, 2008 9:16 PM, Wesley Smith <wesley.hoke at gmail.com> wrote: > > Multiple bindings of shaders or not available on any hardware. There > > can only be one shader at a time running on the GPU. You can however > > have multiple compiled shaders that you bind at different times. > > > > wes > > > > > > On Feb 3, 2008 6:16 PM, Keith Manlove <keithmanlove at gmail.com> wrote: > > > Hey Wesley, > > > > > > I'm not around my computer to try it, but are multiple bindings > > > available? > > > > > > Keith > > > > > > On Feb 3, 2008, at 1:24 PM, "Wesley Smith" <wesley.hoke at gmail.com> > > > wrote: > > > > > > > > > > This is how you use shaders. You just make a shader object and call > > > > its bind methods. > > > > wes > > > > > > > > > > > > shader = jit.new("jit.gl.shader", this.drawto) > > > > shader.file = "cc.brcosa.jxs" --shader file to load > > > > > > > > function draw() > > > > > > > > > > > > shader:bind() > > > > > > > > gl.Begin("QUADS") > > > > --top left > > > > gl.TexCoord(0., 1.) > > > > gl.Vertex(-0.5, 0.5, 0.) > > > > > > > > --bottom left > > > > gl.TexCoord(0., 0.) > > > > gl.Vertex(-0.5, -0.5, 0.) > > > > > > > > --bottom right > > > > gl.TexCoord(1., 0.) > > > > gl.Vertex(0.5, -0.5, 0.) > > > > > > > > --top right > > > > gl.TexCoord(1., 1.) > > > > gl.Vertex(0.5, 0.5, 0.) > > > > gl.End() > > > > > > > > shader:unbind() > > > > > > > > end > > > > > > > _______________________________________________ > > > > jitter mailing list > > > > jitter at cycling74.com > > > > http://www.cycling74.com/mailman/listinfo/jitter > > > _______________________________________________ > > > jitter mailing list > > > jitter at cycling74.com > > > http://www.cycling74.com/mailman/listinfo/jitter > > > > > _______________________________________________ > > jitter mailing list > > jitter at cycling74.com > > http://www.cycling74.com/mailman/listinfo/jitter > > > _______________________________________________ > jitter mailing list > jitter at cycling74.com > http://www.cycling74.com/mailman/listinfo/jitter >
- Previous message: [jitter] Re: jxs shaders in jit.gl.lua?
- Next message: [jitter] Re: jxs shaders in jit.gl.lua?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
