Java-Gaming.org
Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
Featured games (78)
games approved by the League of Dukes
Games in Showcase (406)
games submitted by our members
Games in WIP (293)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  LWJGL camera orientation  (Read 372 times)
0 Members and 1 Guest are viewing this topic.
Offline Porlus

Junior Member





« Posted 2013-01-15 19:03:02 »

Hi everyone,
I've started using OpenGL, or more specifically LWJGL and I've had a concern in the way the scene is rendered. In the main class I've created a sample floor made out of a single quad that spans from the origin to positive 10 in the X axis and positive 10 in the Y axis. The camera class I've written was cobbled together from the sample code given in glframe.h in the OpenGL Superbible 4th Edition, if anyone's familiar with that. I also have a Camera class that manages changes in the orientation and the position of the first person view. I've pastebinned this so you can see (I tried to keep the length short and directly relevant):

http://pastebin.com/jtfA2jnA

The default orientation I have for the camera is looking up the positive Z direction (I'm fairly certain) and at (0,0,0), so the floor should be in front of the view, to the right like this:



The circle being the camera. However it appears to be rendering on the left hand side of the character and not the right. So like the above image, but flipped vertically. This may just be a glitch in the way I've copied it over from the C++ example, but can anyone spot what's causing this?

Thanks,

Paul
Offline Porlus

Junior Member





« Reply #1 - Posted 2013-01-15 23:57:27 »

If you need anything explained in more detail, please ask. Smiley
Pages: [1]
  ignore  |  Print  
 
 

Play Revenge of the Titans! The situation is critical. We need fancy commanders to defend Earth, the moon, Mars!
 
Browse for soundtracks for your game!

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

The invasion has landed! On Mars! And you're there to beat 'em!
cubemaster21 (76 views)
2013-05-17 21:29:12

alaslipknot (89 views)
2013-05-16 21:24:48

gouessej (119 views)
2013-05-16 00:53:38

gouessej (113 views)
2013-05-16 00:17:58

theagentd (125 views)
2013-05-15 15:01:13

theagentd (113 views)
2013-05-15 15:00:54

StreetDoggy (156 views)
2013-05-14 15:56:26

kutucuk (178 views)
2013-05-12 17:10:36

kutucuk (178 views)
2013-05-12 15:36:09

UnluckyDevil (186 views)
2013-05-12 05:09:57
Complex number cookbook
by Roquen
2013-04-24 12:47:31

2D Dynamic Lighting
by Oskuro
2013-04-17 16:46:12

2D Dynamic Lighting
by Oskuro
2013-04-17 16:45:57

2D Dynamic Lighting
by Oskuro
2013-04-17 16:23:20

Noise (bandpassed white)
by Roquen
2013-04-05 17:36:01

Noise (bandpassed white)
by Roquen
2013-04-03 16:17:38

Java Data structures
by Roquen
2013-03-29 13:21:12

Topic Request
by kutucuk
2013-03-22 21:42:01
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!
Page created in 0.075 seconds with 20 queries.