Skip to content
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

macOS: Rendering issues #19

Closed
dobegor opened this issue Aug 8, 2017 · 4 comments
Closed

macOS: Rendering issues #19

dobegor opened this issue Aug 8, 2017 · 4 comments

Comments

@dobegor
Copy link
Contributor

dobegor commented Aug 8, 2017

So I've managed to build all the libraries required (ogg.framework and Vorbis.framework) and launched g3nd.

I've to add

glfw.WindowHint(glfw.OpenGLForwardCompatible, glfw.True)

in window initialization code (glfw.go: newGLFW) to launch it.

$ go run main.go
12:18:49.443939:I:G3ND:G3N Demo v0.2 starting
12:18:49.444835:I:G3ND:Using data directory:data
12:18:49.558976:I:G3ND:OpenGL version: 4.1 ATI-1.51.8
12:18:49.582352:I:G3ND:Apple Computer Inc. version: 1.1
12:18:49.582555:W:G3ND:Error loading libvorbisfile shared library/dll

So far vorbis didn't load, but I've got another issue:
screen shot 2017-08-08 at 15 21 47

@danaugrs
Copy link
Member

danaugrs commented Aug 9, 2017

Can you try running a simpler program such as hellog3n and see if you get any errors?
You may need to comment out the axis helper (lines 62, 63) since it calls glLineWidth internally (see this comment).

@dobegor
Copy link
Contributor Author

dobegor commented Aug 9, 2017

If I move the window a little bit, it triggers rescale and Gokoban works perfectly fine for me (except sound).

It doesn't work for G3ND, though.

You can ping me in slack channel so that I can provide you access to debug machine with OS X, if you want.

@ernstnaezer
Copy link

ernstnaezer commented Aug 23, 2017

The incorrect size issue could have something to do with Retina displays. I've did a bit of digging through projects that use glfw on MacOs and found this freetype-gl demo with a similar issue.

They've resolved it by using window.GetFramebufferSize over window.GetSize. When I plug that in I have a view that is correct from the start.

On my mac window.GetFramebufferSize outputs 1600x1200 or 1600x1182 depending on the scale I pick in Preferences > Display.

screen shot 2017-08-23 at 09 59 39

Edit - It looks like there is going to be a GLFW_HIDPI_RESIZE window hint for controlling high-DPI window resizing in glfw v3.3 - glfw/glfw@e7eb6d8

And here is another one showing the same issue, only rendering the lower left quadrant. Seems also fixed by using GetFramebufferSize. glfw/glfw#49

Curious to learn what the resolution of the Windows build is.

@danaugrs
Copy link
Member

These macOS issues were addressed in 1929d60.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants