HI Bryan,

My best guess would be an issue with timing of the data copy, but
beyond this I have no idead what might be up.

Robert.

On 4/2/07, Wasileski, Bryan J. <[EMAIL PROTECTED]> wrote:


Hi OSG'ers

I have a client & server app where the server captures video from the frame
buffer and copies it to shared memory.
The client then reads the data from shared memory and displays it. The
client app captures the served image using
the osg::Image class by using osg::Image->setImage(). While this all seems
to work fine, the video that is displayed
seems to have an artifact across the top of the image. I've been unable
locate the source of the artifact. At this
point I'm wondering if I'm using the setImage() method correctly or there's
other information I need. The artifact
seems to be fixed in size because it takes up more of the image if I shrink
the window and much less if I enlarge the window.
What is also strange is that I can see the correct image behind the artifact
as though something is being drawn subsequent
to the image.

Any help or pointed questions would be appreciated. Code snippet below.

Thanks.

Bryan


 // server code
image->readPixels(0,0,IMAGE_SIZE_X,IMAGE_SIZE_Y,GL_RED,GL_UNSIGNED_BYTE);
 unsigned char* d = image->data() ;
 trnIF->setImage(d);

// client code to set the image
unsigned char shmImage[IMAGE_SIZE_X*IMAGE_SIZE_Y]
memcpy(shmImage,shm->image, (unsigned
char)*IMAGE_SIZE_X*IMAGE_SIZE_Y);
image->setImage(IMAGE_SIZE_X, IMAGE_SIZE_Y, 0, 6409 , (GLenum)GL_RED,
(GLenum)GL_UNSIGNED_BYTE,
                        shmImage,osg::Image::NO_DELETE );




_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to