-
-
Notifications
You must be signed in to change notification settings - Fork 237
Visible artifacts on DrawNode::drawCircle() with a corresponding lineWidth > 5 (window resizing issue) #1050
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
Conversation
Tested also with resourceSize(960, 640) or (1280, 720) designSize(480, 320) or (400, 320); Making a deal with the "boss"
Hope all questions be closed |
Let @rh101 help us. |
Good idea. Look on the result of the "red" API if the thickness >10 or more. Thats the reason implementing the green API. (And I want not write a new Api because the drawCircle is connected with the global thicknees. Of course developer can use always a new DrawNode object but this make the rendering slower. |
I'm having a lot of trouble following what this is all about. Can you please summarize, concisely, what the purpose of this change is?
This is confusing. Are you stating that we need to use one API if thickness is less or equal to 10, and a different API for thickness >10? |
I will answer later |
please look here: #1046 |
@aismann A few questions related to your changes: 1 - Will your changes result in a correct representation of a circle being drawn (at the correct scale), with no visible artifacts, regardless of line thickness? 2 - If the answer to the previous question is "Yes", then is the cause of all the confusion in this thread related to this specific test implementation? Now that I'm looking at this specific issue, I do see a problem, which is that the API may also be an issue. It may have been better to leave |
Yes, but its not so fast as the 'original' drawCircle() method which works good if the thickness <5...8.
Yes and No. This PR is optimizing the situation if the window is resizing.
I think having a
That's the same as using Of course the And last but not least: and |
I understand what you mean now, and yes, it may be that a lot of the confusion is coming from that specific test. Now, related to the API, you make a fair point regarding the optimization in that method, and what do you think about changing |
I will make the tester more non confusion with a later PR
I think |
That's actually a good idea. Perhaps you can add more to it so to give it some context, such as "optimizationThreshold" etc, which would indicate what that parameter is being used for. |
I will write some more about this parameter on the APPENDIX.md |
The scale code still confuse me: auto borderScale = (glView->getScaleX() + glView->getScaleY());
drawPolygon(vertices, segments, Color4B(1.0f, 0.0f, 0.0f, 1.0f), _lineWidth / borderScale , color); If glView scale smaller then the borderWidth will be larger? |
My suggestion is don't relay on glView scale just use follow code: drawPolygon(vertices, segments, Color4B(1.0f, 0.0f, 0.0f, 1.0f), _lineWidth, color); |
OK. I make all changes first. |
Yes i will change the Line...no longer need to have the same bevior as the old api. |
_lineWidth/4 is needed => the circle grow to fast without
I have no right access :( to solve the conflicts |
@halx99 |
THIS PROJECT IS IN DEVELOPMENT MODE. Any pull requests should merge to branch
dev
, otherwise will be rejected immediately.Describe your changes
[Fix DrawNode::drawCircle() behavior itf the window is resizing.]
I tested it with cpp-test again => no effects on other nodes, objects or other stuff.
Issue ticket number and link
#1046
Checklist before requesting a review