Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: GluPerspective vs. GlOrtho  (Read 11215 times)

0 Members and 2 Guests are viewing this topic.

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
GluPerspective vs. GlOrtho
« on: December 23, 2010, 12:39:31 am »
Well I am having some trouble. I am trying to be able to draw anywhere in the world but be able to move the camera. Like any 3D game. But IDK which one to use, glOrtho or gluperspective. Whenever i try gluperspective and try to draw at 0,0 it is at the center of my screen. I want it to be in the bottom corner... But with glOrtho it makes everything in teh world really small but draws them in the corner.. So could some point me in the right direction.. And also how I would move the camera..

I know there is glulookat but I will use that after I make my player...

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
GluPerspective vs. GlOrtho
« Reply #1 on: December 23, 2010, 12:40:43 am »
Please please please read The Red Book, it's at the link I sent you. This isn't an OpenGL forum. It has all you need to know in it.

http://www.opengl.org/documentation/red_book/ if you forgot.

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
GluPerspective vs. GlOrtho
« Reply #2 on: December 23, 2010, 12:48:08 am »
glOrtho is usually a bad choice - all objects appear the same size no matter how far away they are. It's all in the guide.

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
GluPerspective vs. GlOrtho
« Reply #3 on: December 23, 2010, 12:48:16 am »
Quote from: "tntexplosivesltd"
Please please please read The Red Book, it's at the link I sent you. This isn't an OpenGL forum. It has all you need to know in it.

http://www.opengl.org/documentation/red_book/ if you forgot.


Ok, I will look into it sorry lol but isnt it outdated?

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
GluPerspective vs. GlOrtho
« Reply #4 on: December 23, 2010, 12:51:03 am »
Well, OpenGL is an odd creature. What version of OpenGL do you want to use? OpenGL's version is set by the features of it you use, so it's odd. A lot of the core stuff is the same.

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
GluPerspective vs. GlOrtho
« Reply #5 on: December 23, 2010, 01:00:53 am »
Quote from: "tntexplosivesltd"
Well, OpenGL is an odd creature. What version of OpenGL do you want to use? OpenGL's version is set by the features of it you use, so it's odd. A lot of the core stuff is the same.


Well I only use Opengl to draw stuff, make transformations, and texture, and lighting( or I will). ANyway I am downloading a copy right now.

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
GluPerspective vs. GlOrtho
« Reply #6 on: December 23, 2010, 01:08:55 am »
Right. Some of the high-end fancy features are only in later versions of OpenGL, so you have to be careful. It always pays to consider what version you want to use - this limits/expands your target PCs, e.g. Hardly any GPUs support OpenGL 4.1, so you want to steer clear of that. OpenGL 1.5/2 is usually a safe bet (MineCraft uses OpenGL 1.4).

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
GluPerspective vs. GlOrtho
« Reply #7 on: December 23, 2010, 01:11:42 am »
Quote from: "tntexplosivesltd"
Right. Some of the high-end fancy features are only in later versions of OpenGL, so you have to be careful. It always pays to consider what version you want to use - this limits/expands your target PCs, e.g. Hardly any GPUs support OpenGL 4.1, so you want to steer clear of that. OpenGL 1.5/2 is usually a safe bet (MineCraft uses OpenGL 1.4).


I thought minecraft was in java.... lol. I am on whatever version comes with sfml 2..

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
GluPerspective vs. GlOrtho
« Reply #8 on: December 23, 2010, 01:16:49 am »
It is written in Java. It uses LWJGL (Light Weight Java Game Library), which has an interface to OpenGL (much like SFML)

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
GluPerspective vs. GlOrtho
« Reply #9 on: December 23, 2010, 01:21:40 am »
Quote from: "tntexplosivesltd"
It is written in Java. It uses LWJGL (Light Weight Java Game Library), which has an interface to OpenGL (much like SFML)


Oh ok thx, anyway I will put this book onto my ipod so that I can read it tonight!

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
GluPerspective vs. GlOrtho
« Reply #10 on: December 23, 2010, 01:25:11 am »
Haha I did the same. It is so useful! :D

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
GluPerspective vs. GlOrtho
« Reply #11 on: December 23, 2010, 01:25:32 am »
Quote from: "tntexplosivesltd"
It is written in Java. It uses LWJGL (Light Weight Java Game Library), which has an interface to OpenGL (much like SFML)


Crap the one I got doesnt have an outline. Link in pm?

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
GluPerspective vs. GlOrtho
« Reply #12 on: December 23, 2010, 01:28:50 am »
What do you mean? I'm assuming you went to the HTML version and got the .zip?

Fierce_Dutch

  • Full Member
  • ***
  • Posts: 138
    • View Profile
GluPerspective vs. GlOrtho
« Reply #13 on: December 23, 2010, 01:31:42 am »
Quote from: "tntexplosivesltd"
What do you mean? I'm assuming you went to the HTML version and got the .zip?


No I got a pdf version.

tntexplosivesltd

  • Full Member
  • ***
  • Posts: 163
    • View Profile
GluPerspective vs. GlOrtho
« Reply #14 on: December 23, 2010, 01:34:51 am »
Where from? The .zip from the HTML link has everything, except a glossary.

 

anything