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

OSX glfw window blank until re-positioned #665

Closed
diclophis opened this issue Oct 15, 2018 · 4 comments
Closed

OSX glfw window blank until re-positioned #665

diclophis opened this issue Oct 15, 2018 · 4 comments
Labels
platform: macOS macOS platform

Comments

@diclophis
Copy link

I noticed the same issue here: faiface/pixel#140 is present in this project... I figured I might open this ticket so anyone searching for things like, blank window osx glfw might find this article and know that the current workaround is moving the window by 1px on init...

SetWindowPosition((GetMonitorWidth() - GetScreenWidth())/2, ((GetMonitorHeight() - GetScreenHeight())/2)+1);

Is what I rigged up...

Please close this issue if you feel it is not relevant.

@a3f
Copy link
Contributor

a3f commented Oct 15, 2018

Do you have the newest master checked out? #655 ought to fix that.

@diclophis
Copy link
Author

Shoot, looking now it does look like I am on an older build of raylib, let me double check a newer tag, i am pretty sure it will fix my issue.

@raysan5 raysan5 added the platform: macOS macOS platform label Oct 17, 2018
@a3f
Copy link
Contributor

a3f commented Oct 17, 2018

@diclophis Did you have time to check whether the issue still exists?

@diclophis
Copy link
Author

@a3f yea it looks like the fix is good, thanks again for the heads up.

Side note, I have been enjoying using this framework and integrating it with mruby here: https://github.com/diclophis/kit1zx

I am building out a wrapper to hopefully take advantage of some of the DSL like abilities of ruby, crossed with the lightweight nature of this framework to produce small demo/art like applications

class SimpleCube < GameLoop
  def play
    size = 1.0
    cube = Cube.new(size, size, size, 1.0)

    lookat(1, 10.0, 5.0, 10.0, 1.0, 1.0, 1.0, 60.0)

    main_loop { |gtdt|
      global_time, delta_time = gtdt

      drawmode {
        threed {
          draw_grid(33, size * 2.0)
          cube.deltap(Math.sin(global_time), 1.0, 1.0)
          cube.draw(true)
        }

        twod {
          cube.label(global_time.to_i.to_s)
        }
      }
    }
  end
end

SimpleCube.new("simple_cube", 512, 512, 0).play

To produce...

screen shot 2018-10-17 at 8 27 31 pm

a3f added a commit to a3f/raylib that referenced this issue Oct 27, 2018
glfw/glfw@5595fa3ae6 implements a proper fix for the macOS Mojave
problem of OpenGL windows not being rendered until moved or manually
updated.

Pull in the current master and rebase the two commits we have for reuse
of the GLFW CMake build system for Wayland on top. It hasn't been merged
(or acknowledged..) upstream yet.

Fixes raysan5#655 and raysan5#665.
a3f added a commit to a3f/raylib that referenced this issue Jan 6, 2019
glfw/glfw@5595fa3ae6 implements a proper fix for the macOS Mojave
problem of OpenGL windows not being rendered until moved or manually
updated.

Pull in the current master and rebase the three patches we have on top:
- two commits we have for reuse of the GLFW CMake build system for Wayland
It hasn't yet to be acknowledged upstream.
- one commit removing #include <windows.h> in glfw3native.h to avoid
duplicate declarations.

Fixes raysan5#655 and raysan5#665.
a3f added a commit to a3f/raylib that referenced this issue Jan 6, 2019
glfw/glfw@5595fa3ae6 implements a proper fix for the macOS Mojave
problem of OpenGL windows not being rendered until moved or manually
updated.

Pull in the current master and rebase the three patches we have on top:
- two commits we have for reuse of the GLFW CMake build system for Wayland
It hasn't yet to be acknowledged upstream.
- one commit removing #include <windows.h> in glfw3native.h to avoid
duplicate declarations.

Fixes raysan5#655 and raysan5#665.
a3f added a commit to a3f/raylib that referenced this issue Jan 7, 2019
glfw/glfw@5595fa3ae6 implements a proper fix for the macOS Mojave
problem of OpenGL windows not being rendered until moved or manually
updated.

Pull in the current master and rebase the three patches we have on top:
- two commits we have for reuse of the GLFW CMake build system for Wayland
It hasn't yet to be acknowledged upstream.
- one commit removing #include <windows.h> in glfw3native.h to avoid
duplicate declarations.

Fixes raysan5#655 and raysan5#665.
a3f added a commit to a3f/raylib that referenced this issue Jan 7, 2019
glfw/glfw@5595fa3ae6 implements a proper fix for the macOS Mojave
problem of OpenGL windows not being rendered until moved or manually
updated.

Pull in the current master and rebase the three patches we have on top:
- two commits we have for reuse of the GLFW CMake build system for Wayland
It hasn't yet to be acknowledged upstream.
- one commit removing #include <windows.h> in glfw3native.h to avoid
duplicate declarations.

Fixes raysan5#655 and raysan5#665.
a3f added a commit that referenced this issue Jan 8, 2019
glfw/glfw@5595fa3ae6 implements a proper fix for the macOS Mojave
problem of OpenGL windows not being rendered until moved or manually
updated.

Pull in the current master and rebase the three patches we have on top:
- two commits we have for reuse of the GLFW CMake build system for Wayland
It hasn't yet to be acknowledged upstream.
- one commit removing #include <windows.h> in glfw3native.h to avoid
duplicate declarations.

Fixes #655 and #665.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: macOS macOS platform
Projects
None yet
Development

No branches or pull requests

3 participants