I am a newbie to Panda3D, so perhaps my question is stupid and not posted at the right place.
I need to play a fullscreen video so I have take a look at the sample “media player” and I encounter a problem : my video is cropped.
So I have checked with the sample and there is the same problem.
To be sure the video as the same aspect ratio as the video I resize the video from the sample (with the two pandas) to 800x600 as my window is 800x600 too. And the video with the two pandas is cropped too.
Any idea why ?
The sample is pretty simple
# Load the texture. We could use loader.loadTexture for this, # but we want to make sure we get a MovieTexture, since it # implements synchronizeTo. self.tex = MovieTexture("name") assert self.tex.read(MEDIAFILE), "Failed to load video!" # Set up a fullscreen card to set the video texture on. cm = CardMaker("My Fullscreen Card"); cm.setFrameFullscreenQuad() cm.setUvRange(self.tex) card = NodePath(cm.generate()) card.reparentTo(render2d) card.setTexture(self.tex) card.setTexScale(TextureStage.getDefault(), self.tex.getTexScale())
For me it can come from the line
what is the solution ? Can it be related to a problem of “power of two” (as 800x600 is not power of two) ?