You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello all, exciting to have this on github now! Thank you, Robert!
I'm using 3 monitors in X Windows using the proprietary nVidia linux driver. I have it setup to render across all three displays using one large viewport that is 6568x1080 (the extra pixels are to accommodate bezel width.) Here is my call to readPixels:
osg::Image *image = new osg::Image; image->readPixels(x, y, width, height, GL_RGB, GL_UNSIGNED_BYTE);
If I use a value of x other than 0 or a value of width other than 6568, the resulting image is either empty or just black. I was wondering if anyone could help me with this problem.
What I really want is the full 2D image of one of the three displays, but not the whole viewport. I decided to fall back to letting readPixels get the whole thing and then crop it to include only the region of the monitor that I want. I don't know how to do that with openGL, So, instead I'm taking the image data out of the image object, then using ImageMagick to do the cropping, then putting it back into OSG Image. It works, but seems more complicated than it needs to be.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello all, exciting to have this on github now! Thank you, Robert!
I'm using 3 monitors in X Windows using the proprietary nVidia linux driver. I have it setup to render across all three displays using one large viewport that is 6568x1080 (the extra pixels are to accommodate bezel width.) Here is my call to readPixels:
osg::Image *image = new osg::Image; image->readPixels(x, y, width, height, GL_RGB, GL_UNSIGNED_BYTE);
If I use a value of x other than 0 or a value of width other than 6568, the resulting image is either empty or just black. I was wondering if anyone could help me with this problem.
What I really want is the full 2D image of one of the three displays, but not the whole viewport. I decided to fall back to letting readPixels get the whole thing and then crop it to include only the region of the monitor that I want. I don't know how to do that with openGL, So, instead I'm taking the image data out of the image object, then using ImageMagick to do the cropping, then putting it back into OSG Image. It works, but seems more complicated than it needs to be.
Beta Was this translation helpful? Give feedback.
All reactions