>> >> Their are a few of problems with adding this sort of API. >> First, there is no standard low level support for this sort >> of feature. So, at a minimum, we would simply render the model >> twice with some sort of polygon offset. Calculating the appropriate >> polygon offset is another issue, because it is generally model >> specific. Finally, and most importantly, this feature tends to be >> application specific. The outlines that we would draw, would almost >> never be what you really want. So, it makes sense to leave this in >> application space for now. > >But let's assume that the user provides the polygon offset unit and factor, >and selects PolygonAtributes.POLYGON_FILLED_OUTLINE, it would still be >*much* more beneficial for the renderer to render each polygon twice rather >than require the application to do it. Basically, I'm wondring if Java3D >could do what is shown in the polyoff.c program in the "RedBook": > >... > glEnable(GL_LIGHTING); > glEnable(GL_POLYGON_OFFSET_FILL); > glPolygonOffset(polyfactor, polyunits); > glCallList (list); > glDisable(GL_POLYGON_OFFSET_FILL); > > glDisable(GL_LIGHTING); > glColor3f (lineColorR, lineColorG, lineColorB); > glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); > glCallList (list); > glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); >... >
We could do this, but it would be one of many possible outlines that an application may want. >When you say "there is no standard low level support for this sort of >feature." does that mean that there is no corresponding capability in >DirectX? I could understand that being a feature killer (except for the fact >that things like anti-aliased points and line width are exposed in J3D even >though there isn't DirectX support). > Neither OpenGL or DirectX support a "fill and outline" mode. They support a fill mode and a line mode, but not both in a single render. >Also, what do you mean by "outlines that we would draw, would almost never >be what you really want"? Are the properties in LineAttributes not specific >enough to describe what is desired? There are many ways to interpret what the outline should be. Should we just connect line segments from the geometry specified? Should we just use the OpenGL method shown above? Both of these techniques give different results because of the way OpenGL defines polygon mode. And they outline the render is the tesselation of the object. What if the application wants just the outline of the whole object? This is what I meant. There are two many interpretations. By using two geometries with different attributes, you will actually get better performance than the method above because of our state sorting. And, if you can use the same geometry for both modes, memory overhead is small. Doug. =========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".
