info-inventor
[Top] [All Lists]

Re: Creating a movie

To: info-inventor@xxxxxxxxxxx
Subject: Re: Creating a movie
From: Kevin Fitch <kfitch@xxxxxxxxxxx>
Date: Thu, 30 Aug 2001 17:11:42 -0400
References: <3B8E9E49.3010900@segmail.com> <20010830163836B.kkonaka@softalia.com>
Sender: owner-inventor@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux 2.4.8 i686; en-US; rv:0.9.1) Gecko/20010622

Thanks ... actually the glPixelStorei(GL_PACK_ALIGNMENT, 1) seems to have helped (well that and I realized that I didnt actually have a current GL context, oooops).


kkonaka@xxxxxxxxxxxx wrote:

hi!

similar code I've written several years ago looks something
like this; I'm not sure if this really helps -- but anyway:

void readLeft(void *, SoAction *)
{
  static int c;
  unsigned char *p;
  unsigned char *tail = (unsigned char *) ImageLeft + sizeof ImageLeft;

// printf("readframe_left_buffer %d\n", c);
glPushMatrix();
glReadBuffer(GL_FRONT);
glPixelStorei(GL_PACK_ALIGNMENT, 1);
glReadPixels(0, 0, IMAGEW, IMAGEH, GL_RGBA, GL_UNSIGNED_BYTE, ImageLeft);
for (p = (unsigned char *) ImageLeft; p < tail; )
*(p++) &= 0xf0;
glPopMatrix();
}



(actually I don't remember why I was doing *(p++) &= 0xf0;

part; maybe it's not necessary at all :p)


My guess is you were doing red/green 3-d glasses stuff.

Kevin



<Prev in Thread] Current Thread [Next in Thread>