-
Enhancement
-
Resolution: Fixed
-
P2
-
fx2.0
This was brought up in the code review of RT-11818:
>>Since off-screen rendering is being made without a window, we have to add a parameter to renderToImage method similar >>to GlassStage.depthBuffer (and to ImageRenderingContext as well).
>>
>>Why not to add an attribute to the Scene about depth instead of Stage ?
>We had considered this earlier when coming up with the API. Since the depth buffer needs to be created when the surface >is created, we need to know whether or not the surface has a depth buffer when the window peer is created.
>
>This might be worth revisiting, though. If we were to move the depthBuffer flag from Window to Scene (and make it >immutable), we would need to check in Window.setScene for a change in the depthBuffer flag and recreate the surface >when it does. But that doesn't seem too hard and would solve the off-screen problem.
>>Since off-screen rendering is being made without a window, we have to add a parameter to renderToImage method similar >>to GlassStage.depthBuffer (and to ImageRenderingContext as well).
>>
>>Why not to add an attribute to the Scene about depth instead of Stage ?
>We had considered this earlier when coming up with the API. Since the depth buffer needs to be created when the surface >is created, we need to know whether or not the surface has a depth buffer when the window peer is created.
>
>This might be worth revisiting, though. If we were to move the depthBuffer flag from Window to Scene (and make it >immutable), we would need to check in Window.setScene for a change in the depthBuffer flag and recreate the surface >when it does. But that doesn't seem too hard and would solve the off-screen problem.
- blocks
-
JDK-8112882 Need to support depthBuffer request for renderToImage
- Resolved