multiple objects in t_jit_glchunk


    Dec 19 2007 | 2:01 am
    So this time I made sure I RTFM a couple of times before asking. It's not
    all in the last paragraph of the ob3d docs this time;-)
    I'm creating a number of shapes in different sizes, extracted from a video
    matrix. The process reallocates a new jit_glchunk every time because the
    vertex count varies. All is good, I managed to populated the chunk and draw
    it to the screen or output it as a gl matrix. I have one questions still.
    What is the way to put multiple separate shapes in a chunk? Do I need to
    generate a connections matrix to distinguish between them? Or maybe generate
    a separate chunk for every shape and link them together using the next_chunk
    pointer?
    Cheers,
    Thijs

    • Dec 19 2007 | 2:14 am
      Hi Thijs,
      How are you planning on integrating your object into the jitter opengl
      environment? I'm asking because there might be better ways to handle
      your output geometry than making chunks. On example that comes to
      mind is to output 2 matrices. One would be a vertex matrix and the
      other an index matrix. The vertex matrix can be some maximum size
      because the index matrix would tell jit.gl.mesh what vertices to
      actually draw, so there could be extra data on the end of the matrix
      that isn't actually used.
      best,
      wes
      On Dec 18, 2007 6:01 PM, Thijs Koerselman wrote:
      > So this time I made sure I RTFM a couple of times before asking. It's not
      > all in the last paragraph of the ob3d docs this time;-)
      >
      > I'm creating a number of shapes in different sizes, extracted from a video
      > matrix. The process reallocates a new jit_glchunk every time because the
      > vertex count varies. All is good, I managed to populated the chunk and draw
      > it to the screen or output it as a gl matrix. I have one questions still.
      >
      > What is the way to put multiple separate shapes in a chunk? Do I need to
      > generate a connections matrix to distinguish between them? Or maybe generate
      > a separate chunk for every shape and link them together using the next_chunk
      > pointer?
      >
      > Cheers,
      > Thijs
      >
      >
      >
    • Dec 19 2007 | 3:08 am
      Hi Wes, I'm not sure actually. The shapes might even be rendered back to a
      video matrix:-) This external, for now, serves as an input for other people
      to do some video animations. I figured because its not for my personal use,
      I'd best stick to the jitter standards as much as possible.
      I like your idea of separating the matrices. The index matrix will still be
      dynamic, no? Or can I fill the remaining space with -1 or something, so
      jit.gl.mesh ignores it?
      When you create an index matrix for a glchunk isn't it output as a separate
      matrix anyway? I'm a bit unclear what the difference is between a glchunk
      and the separate matrix approach. Does jit.gl.mesh take a glchunk as input
      or do you have to split it first?
      Cheers,
      Thijs
      On Dec 19, 2007 2:14 AM, Wesley Smith wrote:
      > Hi Thijs,
      > How are you planning on integrating your object into the jitter opengl
      > environment? I'm asking because there might be better ways to handle
      > your output geometry than making chunks. On example that comes to
      > mind is to output 2 matrices. One would be a vertex matrix and the
      > other an index matrix. The vertex matrix can be some maximum size
      > because the index matrix would tell jit.gl.mesh what vertices to
      > actually draw, so there could be extra data on the end of the matrix
      > that isn't actually used.
      >
      > best,
      > wes
      >
      > On Dec 18, 2007 6:01 PM, Thijs Koerselman > wrote:
      > > So this time I made sure I RTFM a couple of times before asking. It's
      > not
      > > all in the last paragraph of the ob3d docs this time;-)
      > >
      > > I'm creating a number of shapes in different sizes, extracted from a
      > video
      > > matrix. The process reallocates a new jit_glchunk every time because the
      > > vertex count varies. All is good, I managed to populated the chunk and
      > draw
      > > it to the screen or output it as a gl matrix. I have one questions
      > still.
      > >
      > > What is the way to put multiple separate shapes in a chunk? Do I need to
      > > generate a connections matrix to distinguish between them? Or maybe
      > generate
      > > a separate chunk for every shape and link them together using the
      > next_chunk
      > > pointer?
      > >
      > > Cheers,
      > > Thijs
      > >
      > >
      > >
      >
      --