Forums > Jitter

jit.gl.lua RTT

March 13, 2008 | 9:19 pm

Hi,

I’m trying to use RTT with jit.gl.lua, but it doesn’t seem to be working. I
figured a good start would be the RTT.capture example patch that comes with
jit.gl.lua. On my system the window stays black. I don’t see anything.
Selecting the backend, FBO gives me the following errors:

jit.gl.fbo: unsupported framebuffer format!
jit.gl.fbo: error updating framebuffer attachment!

For the RTT backend there are no errors, but still the output is empty. I’ve
also tried the RTT.slab example. This one doesn’t work either but odly the
fbo backend doesn’t generate errors in this patch. Both backend options
just show a black screen.

I’m using the latest max/jitter/jit.gl.lua on an intel mac running
10.5.2with an NVidia 7300GT

Any ideas?

I’m already trying this as an alternative to the accum buffer which I failed
to get working. I’m running out of options.

Cheers,
Thijs


March 13, 2008 | 9:31 pm

Here’s the most trivial RTT example. If this doesn’t work then
something is out of whack.:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 83 181 44 196617 sel 116;
#P newex 83 159 40 196617 key;
#P newex 15 181 64 196617 prepend call;
#P newex 15 159 31 196617 r lua;
#P message 135 181 23 196617 file;
#P newex 135 207 153 196617 jit.gl.lua test @file rtt.demo.lua;
#P message 150 75 34 196617 reset;
#P newex 150 95 186 196617 jit.gl.handle test @inherit_transform 1;
#P newex 15 95 48 196617 r render;
#P toggle 130 66 15 0;
#N vpatcher 53 128 279 297;
#P inlet 106 30 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P newex 43 95 47 196617 gate 1 1;
#P newex 42 116 41 196617 s draw;
#P window linecount 1;
#P newex 17 52 58 196617 t b b erase;
#P inlet 17 32 15 0;
#P outlet 17 83 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P fasten 2 2 0 0 70 75 22 75;
#P connect 4 0 3 0;
#P fasten 5 0 4 0 111 88 48 88;
#P fasten 2 1 4 1 46 83 85 83;
#P lcolor 15;
#P pop;
#P newobj 68 95 42 196617 p Draw;
#P toggle 206 34 15 0;
#P message 206 54 68 196617 fullscreen $1;
#N vpatcher 30 89 166 253;
#P window setfont "Sans Serif" 9.;
#P newex 50 71 35 196617 sel 27;
#P newex 50 50 40 196617 key;
#P outlet 50 93 15 0;
#P connect 1 0 2 0;
#P connect 2 0 0 0;
#P pop;
#P newobj 223 34 33 196617 p Esc;
#P newex 206 72 151 196617 jit.window test @depthbuffer 1;
#P toggle 68 47 15 0;
#P newex 68 66 57 196617 qmetro 30;
#P newex 68 122 187 196617 jit.gl.render test @erase_color 0 0 0 1;
#P connect 14 0 15 0;
#P connect 2 0 1 0;
#P connect 1 0 7 0;
#P fasten 9 0 0 0 20 117 73 117;
#P connect 7 0 0 0;
#P fasten 10 0 0 0 155 117 73 117;
#P connect 16 0 17 0;
#P fasten 8 0 7 1 135 88 105 88;
#P connect 17 0 13 0;
#P connect 13 0 12 0;
#P fasten 15 0 12 0 20 203 140 203;
#P connect 11 0 10 0;
#P connect 4 0 6 0;
#P connect 6 0 5 0;
#P connect 5 0 3 0;
#P window clipboard copycount 18;

Script———————————————-

local scene = jit.new("jit.gl.texture", this.drawto)
local vplane = jit.new("jit.gl.videoplane", this.drawto)
vplane.transform_reset = 2
vplane.automatic = 0
vplane.texture = scene.name

function draw()
jit.gl.begincapture(scene.name, 0)
gl.Begin("TRIANGLES")
gl.Vertex(-1, 0, 0)
gl.Vertex(0, 1, 0)
gl.Vertex(1, 0, 0)
gl.End()
jit.gl.endcapture(scene.name, 0)

vplane:draw()
end


March 13, 2008 | 10:21 pm

On Thu, Mar 13, 2008 at 9:31 PM, Wesley Smith wrote:

> Here’s the most trivial RTT example. If this doesn’t work then
> something is out of whack.:
>
>
Thanks Wes, it appears to work. At least for the RTT backend. FBO still
generates the same errors I reported earlier. I tried to find where the
difference is and the problem appears to be the slab. If I take out the slab
from RTT.capture.lua.demo then the patch works. If I use the slab, I see
only the first frame (without effect) and then the screen goes black. I can
see the first frame again by reloading the lua file.

I tried co.inverse.jxs instead of wobble, but the output is the same. Any
more tests I could do related to the slab issue?

Btw, is FBO going to give a lot better performance over RTT?

Cheers,
Thijs


Viewing 3 posts - 1 through 3 (of 3 total)