This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Game Development and the fly likes OpenGL plane Lighting (Small code) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "OpenGL plane Lighting (Small code)" Watch "OpenGL plane Lighting (Small code)" New topic
Author

OpenGL plane Lighting (Small code)

Joshua Waring
Greenhorn

Joined: Sep 04, 2012
Posts: 13
Recently I've moved into a more advance part of OpenGL which is lighting, but as what follows is an error which I keep hitting, I don't know if it's light positioning or what, but I've tried playing with positions and I can't seem to get it working correctly. There's just a plane which is positioned on the screen and I've created a moving triangle which moved horizontal to the light and the same problem occurs. simple enough said no one ever(apart from everyone who's not me Help is greatly appreciated.

fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11152
    
  16

I know nothing about OpenGL. Having said that...

It is not clear from your post what exactly the problem is. You say "I can't seem to get it working correctly", "the same problem occurs", and "an error which i keep hitting", but I don't see where you state what any of those are.

Does it compile? Does it run? Do you get an actual error message - and if so, can you post it here?

Does it run but not do what you expect? If so, what do you expect, and what does it actually do?


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Joshua Waring
Greenhorn

Joined: Sep 04, 2012
Posts: 13
Okay we'll that was a tiny fail
It's a scenario error where it doesn't appear tr way expected although has no returned errors.
The plane has a constant lighting (ambient) and if unaffected my the actual light. Basically it's dark grey all the time even if I place it dead on with the light or at least I think I am.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: OpenGL plane Lighting (Small code)
 
Similar Threads
JOGL 1 vs JOGL 2.0?
Data Types
Why doesn't my cube rotate normally
Float literals.
Particle System, always equals 0 ?