-
Notifications
You must be signed in to change notification settings - Fork 511
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
All solid edges shown as occluded #378
Comments
@whitequark probably here is the problem caused by e383b7f |
@Evil-Spirit No, it was a problem as far as I can remember, I just never paid attention to it. It renders the same way if I revert e383b7f. |
On my system it looks like the occluded lines are drawn by drawing all lines (in whichever style) without Z-buffer, and then drawing all of them again in normal style with the Z-buffer enabled. It looks like some kind of fighting between the two line styles rather than only using the right one for each edge. Is that what's happening? @Evil-Spirit ? EDIT: This look a lot like it's not applying the depth test correctly for occluded lines. Meaning this:
Probably isn't correctly affecting this:
It's actually saying to draw the one line style only for things hidden by the Z-buffer, but that's not working. |
Probably, I can blame glDepthRangef following after this. I suppose for hidden lines it should be performed in a different way. |
Also, depth write probably should be switched off (glDepthMask(GL_FALSE)) for non-occluded edges. |
@Evil-Spirit its behaving like depth testing is turned off for occluded edges. And yes, depth write should probably be off for all edges. |
The problem has to be that there are multiple areas in the code affecting this. I can go in Group::Draw(Canvas *canvas) and comment out the entire section enclosed by if(SS.GW.showEdges) { .... } and I'm still able to use the toggle buttons to produce most of the options including showing the occluded lines. The bug is because a lot of this section of code is redundant in some way - I just haven't figured out what's stepping on it. |
OK, commenting out everyting but:
It's still drawing almost all edges (no silhouettes) and allowing 3 options for them with zero calls to DrawOutlines. This is also enabled/disabled via the "show all / hide all" links in the text window. I thought those were only supposed to toggle entities and the toolbar buttons determined which edges are visible and what style. EDIT: no, It's just drawing the entities in 3 styles. It correctly draws the hidden ones when that option is enabled. So fixing this I should probably test with all entities turned off until the actual edges behave better. |
System information
SolveSpace version: 3.0~10123738
Operating system: Debian 9.x Stretch
Expected behavior
Only really occluded edges should be shown as hidden
Actual behavior
All solid edges shown as occluded
Additional information
The text was updated successfully, but these errors were encountered: