Skip to main content

(Shader)Appearance to BufferedImage?

1 reply [Last post]
Anonymous

I have an ShaderAppearance which uses a Cg shader.
What I would like to have is the resulting texture/image in a
BufferedImage object, for further (offscreen) analysis and manipulation.

Preventing the texture from being shown would be ideal. I've tried the
appearance.getTexture() method, but that returns null.
Does anyone have an idea how to achieve the above?

I can ofcourse apply the appearance to an object in the scene and use
the GraphicsContext3D.getRaster() method to store the image, but that
would be a last resort.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Henjo

Does anyone have an idea on how to solve the stated problem?

Henjo schreef:
> I have an ShaderAppearance which uses a Cg shader.
> What I would like to have is the resulting texture/image in a
> BufferedImage object, for further (offscreen) analysis and manipulation.
>
> Preventing the texture from being shown would be ideal. I've tried the
> appearance.getTexture() method, but that returns null.
> Does anyone have an idea how to achieve the above?
>
> I can ofcourse apply the appearance to an object in the scene and use
> the GraphicsContext3D.getRaster() method to store the image, but that
> would be a last resort.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
> For additional commands, e-mail: interest-help@java3d.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net