• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Why doesn't my cube rotate normally

 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've got no idea why, I'm new to the 3D area, though I've made a nice pong in 2D.
I've compaired my code to working samples and I can't see the difference, but when I import their code it works normally, but as I said I can't see the difference.

So here it is
Before the loop is

and then
 
Joshua Waring
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I thought it would be nice to explain the problem..
Firstly, the shape seemed REALLY weird due to it being in a perspective view and the values being a bit weird. So that was changed by using glOrtho which gives a straight view.
Secondly during rotation the near clipping was being hit so a simple glTranslate on the view solved that problem (I moved it back 5)

The solution was.

 
reply
    Bookmark Topic Watch Topic
  • New Topic