Skip to content
This repository has been archived by the owner on Dec 2, 2019. It is now read-only.

pixel centers #347

Open
inolen opened this issue Feb 15, 2017 · 6 comments
Open

pixel centers #347

inolen opened this issue Feb 15, 2017 · 6 comments

Comments

@inolen
Copy link
Contributor

inolen commented Feb 15, 2017

On menus that are rendered starting at (0, 0) I'm having an issue where I see a 1 pixel line at the top of the menu across Windows / Mac / Linux platforms. From a quick look, this seems to be related to the 0.5 offset applied to each vertex coordinate generated from inside of nuklear.

I'm not a graphics buff, but it seems that applying this offset here may be causing a fragment to not be generated during rasterization as the pixel is assumed to be outside of the primitive (precision issues?). Should the 0.5 really be being applied by nuklear when generating the coordinates?

dashboard

Edit: To note, I'm rendering with AA, padding spacing, borders, etc. all off and removing the offsets does indeed fix the issue I'm experiencing.

@vurtun
Copy link
Owner

vurtun commented Mar 4, 2017

Thanks for the issue. Does the problem go away if you set the menu position to (0,-0.5)? Also what happens if your nuklear window fills the complete os window?. For example for me with demo/sdl_opengl3 I fill out the complete window:

window

@inolen
Copy link
Contributor Author

inolen commented May 7, 2017

Wow, totally forgot to reply on this.

-0.5f doesn't do the trick, but -1.0f does.

I can make that demo fill the entire window by moving the window around. However, I didn't see a maximize button so I manually filled it out, and I can manually move the window to a negative x / y coordinate.

@inolen
Copy link
Contributor Author

inolen commented May 7, 2017

Also, could these issues be related:
#401
#409

@inolen
Copy link
Contributor Author

inolen commented May 23, 2017

Just wanted to bump this, let me know if there's any more info I can provide.

@vurtun
Copy link
Owner

vurtun commented May 23, 2017

Hm just a quick guess. What happens if you activate window border or increase and decrease the border width?

@inolen
Copy link
Contributor Author

inolen commented Jun 8, 2017

Interestingly, I just went to repo and realized I believe this only repros for me when I'm running the official NVIDIA drivers vs mesa.

Will change drivers back to NVIDIA soon soon and try to repro again.

@ghost ghost mentioned this issue Sep 19, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants