Black Background behind MediaView Replicating 3D Movie Cube (original) (raw)

Peter Pilgrim peter.pilgrim at gmail.com
Fri Oct 26 05:07:43 PDT 2012


Hi

This is nothing to do with OpenJFX codebase or anything else

I was working on ScalaFX just now. Writing a port of the CubeSystem Graphic 3D with MediaView instead of Rectangles. I am using my own downloaded movie trailers e.g. The Hobbit, Prometheus, Looper, Flight etc

I want to give the MediaView a black background for the videos, keep the aspect ratio, and effectively give each cube a backing rectangle, so I naively did

MediaViewCubeFace(val size: Double) extends Group { val backRect: Rectangle { fill = Color.Black } val mediaView: MediaView { fitWidth = size; fitHeight = size } Group { children = Seq( backRect, mediaView) }

/* ... */ }

None of the above compiles, does not matter. What I found was on MacOS 10.8 Retine Display Java FX 7 update 9 there is a lot of flickering? "So I think I must be doing this wrong?" The media view rendered with the rectangle in front and sometimes behind. DepthTest is switched on. I tried setting a backRect.translateZ = -0.05 and that makes the problem worse. So there something I don't understand about 3D, can't put my finger on it.

What did the JavaFX SDK team do to in the JavaOne (2011) demo? Did you put the MediaView inside a Pane or something else?

-- Peter Pilgrim, Java Champion, Java EE Software Development / Design / Architect for financial services, London, UK

JavaFX ++ Scala ++ Groovy ++ Android ++ Java

:: http://www.xenonique.co.uk/blog/ :: :: http://twitter.com/peterpilgrim :: :: http://audio.fm/profile/peterpilgrim :: :: Skype Call peterpilgrim :: :: http://java-champions.java.net/ ::



More information about the openjfx-dev mailing list