OK, so since OpenGL is overall better than D3D (in my opinion) and more portable, i ported my old project over to OpenGL.
HOWEVER, I noticed a rather bothersome inconsistency with the Dirext3D and OpenGL driver.
For some reason, if I have a model with vertex paint, (using b3d format because nothing else Irrlicht supports works for my purposes) in OpenGL, the vert paint only seems to show when lighting is disabled, otherwise the model's vert colors are set to white and then shaded. Is this a problem with the driver, a limitation of OpenGL it uses, or both?
And if so, what would be the simplest fix for it? I've got no problems with modifying the Irrlicht library, as long as I can fix this somehow. Does anyone have a solution?
Any help would be greatly, greatly appreciated. I rely on vertex colors quite a bit.
OpenGL - Vertex colors with lighting
Re: OpenGL - Vertex colors with lighting
You can always write a shader if the fixed pipeline does not satisfy.
Re: OpenGL - Vertex colors with lighting
Well, yeah, but I figured it was an oversight in the fixed pipeline that was fixable, and I could avoid setting up shaders for that material entirely.
I'm still learning GLSL and not that good at it yet.
EDIT: Like, can anyone point me to the code where the OpenGL driver interprets and sets vert colors based on vert data so I can have a whack at it?
That would be much appreciated.
I'm still learning GLSL and not that good at it yet.
EDIT: Like, can anyone point me to the code where the OpenGL driver interprets and sets vert colors based on vert data so I can have a whack at it?
That would be much appreciated.
Re: OpenGL - Vertex colors with lighting
Like, Irrlicht passes the vertex colours to OpenGL, so there is no *fix* you can apply. But maybe you could try setting the material colour and see if this makes a difference. There is an OpenGL setting which makes the engine take the colour from the material and I don't know whether this is set or not. Or if it would help or not.