Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
Hi, I am attempting to port an OpenGL/C++ program that uses lighting (i.e. materials with diffuse/ambient/specular color, vertices with normals, and OpenGL lighting (GL_LIGHT_0...) ) to Copperlicht. I have found some hints (Vertex3D.Normal and Scene.RENDER_MODE_LIGHTS) but other than that I wasn't able to find any references to lighting. From reading http://www.ambiera.com/forum.php?t=931 I concluded that at this moment OpenGL lighting is not supported. First question: Is this reasoning correct? (If I am wrong, I would appreciate it if anybody could give me some help or samples.) As a workaround (until OpenGL lighting is build into Copperlicht), I have started to play with the idea of hardcoding some constant lights into shaders - not using OpenGL lighting, but by using a shader that calculates the angle between the normals (assuming that normals are correctly processed in the current version of Copperlicht) and some fixed coordinates that describe the lights position and then uses that angle to vary texture color. Second question: Would this seem doable? Thanks in advance for any help on this issue, ty78 |
||||
|
Hi, yes, dynamic lighting isn't currently supported in CopperLicht. But you can of course write your own shader (there is a tutorial on that in the documentation) for this, with hardcoded light sources, but even real, dynamic light sources should be possible. |
||||
|
|