-
Notifications
You must be signed in to change notification settings - Fork 263
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
Port freetype-gl examples from GLUT to glfw #75
Conversation
Thanks for the hard work. I just added libglfw3-dev in .travis.yml in order to test it. Can you rebase ? |
That won't work. Travis uses an old Ubuntu version which doesn't provide any glfw3 package. You should better revert the commit on master as it breaks the Travis build. |
Yes, and also I did not see you already changed the travis file. Sorry for the mess. |
I think there is a bug or 'not quite correct use of cmake install' in the glfw3 build system. I will update the PR when I have investigated this some more. |
Ok. I get this from cmake:
|
This is related to an already known issue in glfw (glfw/glfw#483 and glfw/glfw#460). The workaround is to move the cmake config files in the right place and set the right search pathes for includes and libraries. See also: |
Sorry, the PR is still somewhat messy and probably will stay messy until I can fix the travis issues. |
d02c484
to
f6936f9
Compare
Add GLFW 3 as a depedency. Currently the GLFW upstream doesn't provide a proper installation of the glfw3Config.cmake files (glfw/glfw#460) so the .travis script contains a workaround for this.
This fixes also issue rougier#52.
f6936f9
to
dc4359d
Compare
Pull request is ready for review. |
On OSX, I still get the glfw3Config.cmake not found error (see above). To fix on OSX:
Maybe it's worth adding some words about linux/osx fix in the README, no ? |
Ok, good for me. I have some resolution problems because glfw handles "retina" screen by considering separately window size from framebuffer size. The solution is to use |
Yes, we should add a note about this bug. And I assume you meant
instead of
According to grep there is no |
You're right. This is the initial In the meantime, I think we can merge. |
Here is the fix, can you test it in one demo to check it is working on your side ?
|
I don't know if this is right way to fix this. Where does the 512 come from? Also it's not entirely clear to me what is the actual problem on the retina displays. Are the created windows too small? |
512 comes from the initial window size (512x512 in texture.c) and the initial window on OSX/retina is too big (1024x1204 instead of 512x512). We've already encountered the problem in vispy: vispy/vispy#99 |
I don't quite understand why the demos must be pixel exact in size. Isn't the whole purpose of the retina displays to provide a higher resolution display image regardless of the screen coordinates?
It doesn't work reliable. Sometime the texture demo starts properly, sometimes it's throws an X11 window error about a bad configuration, that's because the framebuffer size is not fetched properly. For some reason it returns the initial size of 1, sometimes it returns the resized size of 512 pixels, regardless if I call |
Ok, I'll investigate. In the meantime, we can merge this PR. |
Port freetype-gl examples from GLUT to glfw
Is it necessary to link the library itself with glfw3? Why not just link all the examples with glfw3 instead? |
For some reason I'm unable to append new commits to PR #54, so I open a new PR.