[PD] pix_movie

Mark Danks mdanks at Stormfront.com
Wed May 9 23:42:55 CEST 2001

  I have looked into glTexSubImage2D, but there is a problem with using it
in the gem system.  Mainly, the generation of texture coordinates.  The GEM
geos create their own texture coordinates, and they assume that the texture
goes from 0,0 to 1,1 (with the potential to wrap).  With sub image, it
doesn't really change how other objects would use the texture, so there
would be a whole bunch of pixels which are garbage.

  In theory, I could extend out how objects deal with texture sizes, but it
isn't there right now and would require some serious structural changes.

Later, Mark

= mdanks at stormfront.com
= Lead Programmer PS2
= http://www.danks.org/mark

> -----Original Message-----
> From: Dan Neveu [mailto:neveu at acsu.buffalo.edu]
> Sent: Wednesday, May 09, 2001 2:36 PM
> To: Mark Danks
> Cc: pd-list at iem.kug.ac.at
> Subject: RE: [PD] pix_movie
> On Mon, 7 May 2001, Mark Danks wrote:
> > To the list,
> > 
> >   What are people's thoughts about how to handle non-power 
> of two sized
> > textures?  My primary goal is always speed, which means 
> that I don't like to
> > use automatic conversions, etc.  I would rather that the texture
> > upload/whatever fail than do a silent conversion for me.  
> However, I know
> > that this approach confuses other people who don't know 
> about the internals
> > of how the hardware needs the textures....
> > 
> > Later, Mark
> > 
> In OpenGL there is a call, glTexSubImage2D, which allows you 
> to partially or
> completely replace an existing texure with another 
> (subImage). The helpful
> thing here is that only the original texture needs to be 
> power of 2. The
> subImage can be of any size up to the original tex size. The main
> restriction is that you would not be able to bind a non-power-of-2
> sub-texture flush to the edges of a polygon, if that's what 
> you require. There
> will have to be a margin on each axis equalling:
> origTexWidth - subTexWidth
> origTexHeight - subTexHeight
> I'm not sure if this is anything you're looking for, or if it 
> has already
> been implemented in GEM, but just thought I'd mention it 
> since I'm currently
> using it on an OpenGL/CAVE project that involves streaming 
> webcam images
> from my house to the VR lab and importing them into the 
> virtual environment.
> No, it's not yet working. I have to learn Perl script to do some 
> pre-processing, first.
> -dan

More information about the Pd-list mailing list