Author Topic: Orthographic camera  (Read 2177 times)

Offline matty47

  • Mr. Drawsprite
  • **
  • Posts: 71
    • View Profile
    • Matt and Marg's Homesite
Orthographic camera
« on: 2013-Jan-18 »
Hopefully not too dumb a question but I need a drawing surface that has 0,0 at the bottom left corner and increases in x and y across and up respectfully. I think I could use a 3d screen with an orthographic camera to implement this however I can't seem to find a command that would make the camera orthographic and not perspective. Is this possible in GLBasic? and (of course) some guidance on how to do it would be greatly appreciated.
Thanks in advance
Matthew

Offline Moru

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1793
    • View Profile
    • Homepage
Re: Orthographic camera
« Reply #1 on: 2013-Jan-18 »
Make a function that converts coordinates from upper left to bottom left instead. Or make your own draw routines for every draw function you will be using, converting each Y to the inverse Y.

Offline kanonet

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1137
    • View Profile
    • My GLBasic code archiv
Re: Orthographic camera
« Reply #2 on: 2013-Jan-18 »
You can use X_MAKE3D x, y, -1 to get an orthographic view. Dont know if this helps you.
Lenovo Thinkpad T430u: Intel i5-3317U, 8GB DDR3, NVidia GeForce 620M, Micron RealSSD C400 @Win7 x64

Offline mentalthink

  • Prof. Inline
  • *****
  • Posts: 3375
  • Integrated Brain
    • View Profile
Re: Orthographic camera
« Reply #3 on: 2013-Jan-18 »
Thanks Kano... :good: I think I did somtime whit X_Camera x,y,0.1 or a very low value...

Offline matty47

  • Mr. Drawsprite
  • **
  • Posts: 71
    • View Profile
    • Matt and Marg's Homesite
Re: Orthographic camera
« Reply #4 on: 2013-Jan-18 »
Thanks all - I did not know about the -1 at the end of XMake3d

Offline Wampus

  • Prof. Inline
  • *****
  • Posts: 1004
    • View Profile
Re: Orthographic camera
« Reply #5 on: 2013-Jan-20 »
You can use X_MAKE3D x, y, -1 to get an orthographic view. Dont know if this helps you.

Wow, that is worth knowing. I see its in the manual but I just never saw that. :D