Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic

2012-05-27 Thread Kevin Fishburne
On 05/27/2012 03:29 AM, tommyl...@eircom.net wrote: > Simply speaking, "near" and "far" clipping planes is something like two > vertical planes in front of your eyes, and the view is rendered between them. > Like hologram generator. Both of the planes must be in front of you, so > "near" must be

Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic

2012-05-27 Thread tommyline
ettings, so it makes nice blurr, but doesn't affect close range picture. Tomek - Original Message - From: "Kevin Fishburne" To: gambas-user@lists.sourceforge.net Sent: Sunday, 27 May, 2012 8:12:46 AM Subject: Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic On 05/

Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic

2012-05-27 Thread Kevin Fishburne
On 05/27/2012 02:40 AM, tommyl...@eircom.net wrote: > Ok, > > first - you've got perspective range as > > Glu.Perspective(45, sWidth / sHeight, -1, 1)<- should be positve and bigger > ie. Glu.Perspective(45, sWidth / sHeight, 0.1, 500) or even more if the world > is big. > > second - you're too l

Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic

2012-05-26 Thread tommyline
A quote from NeHe tutorial: "We push the matrix (which basically saves the position of everything on the screen) and use glScalef(1.0f,-1.0f,1.0f) to flip the object upside down (creating a real looking reflection). Setting the y value of glScalef({x},{y},{z}) to a negative value forces OpenG

Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic

2012-05-26 Thread tommyline
d of "flipped", increase eyez in glu.LookAt(). See it it works, then we can sort out the rest. Tomek - Original Message - From: "Kevin Fishburne" To: gambas-user@lists.sourceforge.net Sent: Sunday, 27 May, 2012 7:14:31 AM Subject: Re: [Gambas-user] gb3: OpenGL Rotate and Tra

Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic

2012-05-26 Thread Kevin Fishburne
On 05/27/2012 02:14 AM, Kevin Fishburne wrote: > On 05/26/2012 01:17 PM, tommyl...@eircom.net wrote: >> Oops! >> >> I just realized, you use Gl.Ortho mode. That means Glu.LookAt is not for >> you, I spent few hours trying to figure out how to make it work in ortho, >> but I can't. It behaves

Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic

2012-05-26 Thread Kevin Fishburne
On 05/26/2012 01:17 PM, tommyl...@eircom.net wrote: > Oops! > > I just realized, you use Gl.Ortho mode. That means Glu.LookAt is not for you, > I spent few hours trying to figure out how to make it work in ortho, but I > can't. It behaves like mad, no matter what origin you set up. Sorry, tha

Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic

2012-05-26 Thread tommyline
1 AM Subject: Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic On 05/25/2012 10:58 AM, tommyl...@eircom.net wrote: > Hi Kevin, > > I attach simple project that uses glu.lookat and rotates around a point on > the floor. Try it and tell if it's what you're looking for. &

Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic

2012-05-25 Thread Kevin Fishburne
On 05/25/2012 10:58 AM, tommyl...@eircom.net wrote: > Hi Kevin, > > I attach simple project that uses glu.lookat and rotates around a point on > the floor. Try it and tell if it's what you're looking for. > > Tomek Yes, that's what I'm looking for. I boiled that program down to the up vector for

Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic

2012-05-24 Thread Kevin Fishburne
On 05/24/2012 05:00 AM, tommyl...@eircom.net wrote: > > Hi Kevin. > I think you should concider using Glu.LookAt function, which should solve all > your problems. > > I used it in collision project (attached) to follow the ball. > You just set the camera with few parameters, and that's it! Please

Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic

2012-05-23 Thread Kevin Fishburne
> - Original Message - > From: "Kevin Fishburne" > To: gambas-user@lists.sourceforge.net > Sent: Tuesday, 22 May, 2012 5:14:02 AM > Subject: [Gambas-user] gb3: OpenGL Rotate and Translate logic > > Disclaimer: I've been working on this for days and nei

Re: [Gambas-user] gb3: OpenGL Rotate and Translate logic

2012-05-22 Thread tommyline
in fact moves your object by (-1,1,0...I think:)) ). That's for the moment, the rest we can discuss if you want. regards Tomek - Original Message - From: "Kevin Fishburne" To: gambas-user@lists.sourceforge.net Sent: Tuesday, 22 May, 2012 5:14:02 AM Subject: [Gambas-user] gb3: Op

[Gambas-user] gb3: OpenGL Rotate and Translate logic

2012-05-21 Thread Kevin Fishburne
Disclaimer: I've been working on this for days and neither Google nor trial and error is adequate, apparently. I'm trying to render an overhead, 2D scene with the "camera" at the center of the screen and the world objects rotated around it. Here are my variables: Camera.WorldX As Single '