I'd really appreciate some help with a problem I'm having with the
readRaster method in GraphicsContext3D.
I have a class which extends Canvas3D with a method to get a background
image for immediate mode rendering. When I use readRaster(), I get an
exception:
"Unhandled exception in javaw.exe (OPENGL32.DLL) 0x0000005: Access violation"
The code leading up to readRaster in the method is pretty much identical to
Doug Gehringer's MixedImmediate examples, which run without any problems at
all:
class MarkingCanvas3D extends Canvas3D
{
ImageComponent2D backgroundImageComponent;
Raster backgroundRaster;
Dimension canvasSize;
...
...
public void startImmediate()
{
stopRenderer();
canvasSize = getSize();
if( (backgroundImageComponent==null) || (backgroundRaster==null) ||
(canvasSize.width != backgroundImageComponent.getWidth()) ||
(canvasSize.height != backgroundImageComponent.getHeight()) ) {
backgroundImageComponent = new
ImageComponent2D(ImageComponent.FORMAT_RGB, canvasSize.width,
canvasSize.height);
backgroundRaster = new Raster( rasterPoint, Raster.RASTER_COLOR, 0, 0,
canvasSize.width, canvasSize.height, backgroundImageComponent, null);
}
//read the current background image into the raster
getGraphicsContext3D().readRaster(backgroundRaster);
...
...
}
}
I can't figure out what's going wrong. Can anyone help?
Thanks,
Richard
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".