toxibunny
Posts: 1382
Joined: Thu Aug 18, 2011 9:21 pm

pi3d: Exactly filling the screen?

Mon Nov 19, 2012 8:06 pm

Is anyone else having trouble getting the pi3d 'window' to exactly fill the screen? I'm displaying through composite, and it seems as if I'm just having to guess the resolution... fbset reports it as 608x512, but when I use that, it's too small. What am I doing wrong?
note: I may or may not know what I'm talking about...

User avatar
paddyg
Posts: 2529
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: pi3d: Exactly filling the screen?

Mon Nov 19, 2012 8:16 pm

tox, thanks for reminding me, that's something that occurred to me ages ago and I forgot. In Display() it actually finds out the max values and uses them if you let w,h default to 0,0 i.e.

Code: Select all

# Setup display and initialise pi3d
display = Display()
display.create3D(0,0)   	# x,y,width,height
display.setBackColour(0,0,0,1)    	# r,g,b,alpha
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

toxibunny
Posts: 1382
Joined: Thu Aug 18, 2011 9:21 pm

Re: pi3d: Exactly filling the screen?

Mon Nov 19, 2012 10:17 pm

That seems to work, thanks :).

For information, 3d mode then has various stuffs like display.height and display.width, display.left, display.bottom, etc. 2d mode just has display.max_width and display.max_height...
note: I may or may not know what I'm talking about...

User avatar
paddyg
Posts: 2529
Joined: Sat Jan 28, 2012 11:57 am
Location: UK

Re: pi3d: Exactly filling the screen?

Mon Nov 19, 2012 11:02 pm

Yes that seems a bit arbitrary. There looks to be little difference between the two functions apart from 3D takes an additional parameter 'aspect' that's used in glFrustrumf(). I might add the missing near,far,left,top,right,bottom to 2D for completeness
also https://groups.google.com/forum/?hl=en-GB&fromgroups=#!forum/pi3d

User avatar
Briareos
Posts: 33
Joined: Sun Nov 04, 2012 8:03 pm
Location: Mulhouse, France
Contact: Website

Re: pi3d: Exactly filling the screen?

Tue Nov 20, 2012 7:35 am

Ran into the same 'issue' yesterday night...
Thanks for the answer.

BTW, didn't ever imagined a PI could be so 3D powerful.
Really love your work, paddyg.

Thanks a lot, so much coding fun to come.
Cheers
--
Jean-Philippe

Return to “Python”