I am trying to add an option to display the images "stretched" to the screen resolution.
I only have experience with 2D scaling - 3D scaling is ++ much for me
Can someone please explain what values scale expects? (it looks like it is not a direct ratio of how much to scale-by)
Can someone please explain the need for tan & radians (original code posted below)?
Original Slideshow_3d.py code:
Code: Select all
rat = 1.0 * DISPLAY.width / tex.ix / DISPLAY.height * tex.iy
if rat > 1.0:
rat = 1.0
rat *= 1000.0 * tan(radians(CAMERA.lens[2] / 2.0))
wi, hi = tex.ix / tex.iy * rat, rat
slide.set_draw_details(shader,[tex])
slide.scale(wi, hi, 1.0)