It's not a secret anymore!
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 Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Game Development
Bookmark "OpenGL plane Lighting (Small code)" Watch "OpenGL plane Lighting (Small code)" New topic

OpenGL plane Lighting (Small code)

Joshua Waring

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

Joined: Oct 02, 2003
Posts: 11956

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

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:
subject: OpenGL plane Lighting (Small code)
It's not a secret anymore!