Author Topic: Lighting relative to model  (Read 8928 times)

refuzee

  • Jr. Member
  • **
  • Posts: 4
Lighting relative to model
« on: October 19, 2013, 05:46:52 PM »
Hi,

in your tutorial you state how to set light positions and bind them relative to the model or relative to the camera.

http://bonzaiengine.com/tutorials.php?admin=../tutorials.php&id=1





Now we have our own pipeline and use bonzai just for the model loading and details for now. Is it possible to somehow bind the lights in our pipeline to be relative to the model and not to the camera ?
here is our code:

          
maybe someone sees an easy solution ?

jerome_j

  • Administrator
  • *****
  • Posts: 116
    • Bonzai Engine
Re: Lighting relative to model
« Reply #1 on: October 19, 2013, 06:31:02 PM »
Yes, bind your lights after the camera lookThough (which I assume set the opengl modelview matrix ?)