jit.gl.shader and gl_FrontMaterial.ambient binding only after jit.gl.material

Sep 30, 2012 at 11:45pm

jit.gl.shader and gl_FrontMaterial.ambient binding only after jit.gl.material

I’m using the OB3D material attributes in a jit.gl.shader (geometry shader with phong process in fragment) with :
gl_FrontMaterial.emission, gl_FrontMaterial.ambient, gl_FrontMaterial.diffuse, gl_FrontMaterial.specular, gl_FrontMaterial.shininess

it seems that it works only after i bind and then unbind a jit.gl.material.
I suppose the jit.gl.material create a kind of binding??
thanks

#58717
Oct 1, 2012 at 12:02am

it seems that the OB3D ‘color’ attribute overrides the mat_.. attributes.
only after activate/desactivate jit.gl.material, the mat_.. attributes becomes recognise by the shader

#211082
Oct 1, 2012 at 1:47am

if i send a color_matrix to a jit.gl.mesh with a jit.gl.material, it becomes impossible to send color or mat_ attributes either to the mesh or the material, FOR EVER …
Is there a way to get back control on the color and mat attributes for mesh, material and also shader….???
to desactivate the color_matrix?
I suppose, it’s linked to the way OB3D builds the Gl command list.

#211083
Oct 1, 2012 at 4:03am

hi Spa. please post an example patch and i might be able to advise you, or discover a new bug.

#211084

You must be logged in to reply to this topic.