is gw.setRndLimits array value #shadeCverts broken ?

is gw.setRndLimits array value #shadeCverts broken ?

kdbusi
Participant Participant
579 Views
3 Replies
Message 1 of 4

is gw.setRndLimits array value #shadeCverts broken ?

kdbusi
Participant
Participant

I am trying to get gw.setRndLimits #shadeCverts  <render_limits_name_array> value to shade triangles in the graphics window however the tag does not seem to work and they are always flat shaded. 

 

my current limits are set to gw.setRndLimits #(#illum, #Specular, #texture, #zBuffer, #polyEdges, #colorVerts, #shadeCverts, #Lighting) 

 

I am placing this within a function and calling this with the callbacks  unregisterRedrawViewsCallback and 
registerRedrawViewsCallback , I am rendering colored triangles fine but they just wont work with shading in the viewport.

 

any one got any ideas if this is breaking or I am missing something ???

cheers.

 

does any one know if this feature is broken ?

 

 

 

0 Likes
580 Views
3 Replies
Replies (3)
Message 2 of 4

denisT.MaxDoctor
Advisor
Advisor

It would be helpful, first of all for yourself, to show your code.
Otherwise, I can only guess that you are doing it wrong.

0 Likes
Message 3 of 4

kdbusi
Participant
Participant

here is the code.

--///////////////////////////////////////////////////////////////////////////////////////

 

fn graphicsWindow =
(
gw.setTransform(Matrix3 1)
gw.setRndLimits #(#illum,#Specular,#colorVerts,#shadeCVerts,#zBuffer)

gw.startTriangles()

gw.triangle #([-27.835,-36.093,25.521],[-27.835,36.093,0],[-27.835,-36.093,0]) #(red,red,red)
gw.triangle #([-27.835,36.093,0],[-27.835,-36.093,25.521],[-27.835,36.093,25.521]) #(red,red,red)
gw.triangle #([-27.835,36.093,25.521],[-27.835,-36.093,25.521],[-23.149,-36.093,30.208]) #(red,red,red)
gw.triangle #([-27.835,36.093,25.521],[-23.149,-36.093,30.208],[-23.149,36.093,30.208]) #(red,red,red)
gw.triangle #([-23.149,36.093,30.208],[-23.149,-36.093,30.208],[27.835,-36.093,30.208]) #(red,red,red)
gw.triangle #([-23.149,36.093,30.208],[27.835,-36.093,30.208],[27.835,36.093,30.208]) #(red,red,red)

gw.endTriangles()

gw.enlargeUpdateRect #whole
gw.updateScreen()

)

unregisterRedrawViewsCallback graphicsWindow
registerRedrawViewsCallback graphicsWindow

0 Likes
Message 4 of 4

denisT.MaxDoctor
Advisor
Advisor

yes.. now I can confirm that is something wrong with all Lighting. It doesn't shade triangles at all. Maybe something wrong with Normals for gw drawn triangles? 

0 Likes