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 build fixes and issues #36

Merged
merged 6 commits into from
Jan 23, 2017
Merged

macOS build fixes and issues #36

merged 6 commits into from
Jan 23, 2017

Conversation

kainjow
Copy link
Contributor

@kainjow kainjow commented Jan 23, 2017

Fixed some issues compiling the Mac version. Didn't yet try configuring the Tundra build file, but CMake could be used as an alternative/addition where a macOS bundle and dmg can be created very easily (and easy to generate an Xcode project).

Anyways, the program won't run though, I get this:

$ ./build/milton
Running Milton
Initializing SDL... Done.
Loading preferences... Could not open file for writing prefs
Done.
Creating Milton Window
Created OpenGL context with version 2.1 INTEL-10.20.23
    and GLSL 1.20
GL_INVALID_ENUM in: /Users/kainjow/Projects/milton/src/gl_helpers.cc:93
   ---- Expression: glGetIntegerv(GL_NUM_EXTENSIONS, (GLint*)&num_extensions)
Maximum viewport dimensions, 16384.000000x16384.000000
Vendor string: "Intel Inc."
Increased guid to 1
GL_INVALID_OPERATION in: /Users/kainjow/Projects/milton/src/hardware_renderer.cc:299
   ---- Expression: glBufferData(GL_ARRAY_BUFFER, array_count(data)*sizeof(*data), data, GL_DYNAMIC_DRAW)
GL_INVALID_OPERATION in: ../src/../third_party/imgui/imgui_impl_sdl_gl3.cpp:85
   ---- Expression: glBindVertexArray(g_VaoHandle)
GL_INVALID_OPERATION in: ../src/../third_party/imgui/imgui_impl_sdl_gl3.cpp:126
   ---- Expression: glViewport(last_viewport[0], last_viewport[1], (GLsizei)last_viewport[2], (GLsizei)last_viewport[3])
GL_INVALID_OPERATION in: ../src/../third_party/imgui/imgui_impl_sdl_gl3.cpp:85
   ---- Expression: glBindVertexArray(g_VaoHandle)
GL_INVALID_OPERATION in: ../src/../third_party/imgui/imgui_impl_sdl_gl3.cpp:126
   ---- Expression: glViewport(last_viewport[0], last_viewport[1], (GLsizei)last_viewport[2], (GLsizei)last_viewport[3])
Could not open file for writing prefs :(

From a quick google if I add this near the top of third_party/Fxaa3_11.f.glsl it will run and I can do some basic painting, but it gets very glitchy soon and starts showing tons of error on repaint (or whenever the mouse moves):

#extension GL_EXT_gpu_shader4 : enable

Here's the new output:

$ ./build/milton
Running Milton
Initializing SDL... Done.
Loading preferences... Could not open file for writing prefs
Done.
Creating Milton Window
Created OpenGL context with version 2.1 INTEL-10.20.23
    and GLSL 1.20
GL_INVALID_ENUM in: /Users/kainjow/Projects/milton/src/gl_helpers.cc:93
   ---- Expression: glGetIntegerv(GL_NUM_EXTENSIONS, (GLint*)&num_extensions)
Maximum viewport dimensions, 16384.000000x16384.000000
Vendor string: "Intel Inc."
Increased guid to 1
GL_INVALID_OPERATION in: /Users/kainjow/Projects/milton/src/hardware_renderer.cc:299
   ---- Expression: glBufferData(GL_ARRAY_BUFFER, array_count(data)*sizeof(*data), data, GL_DYNAMIC_DRAW)
GL_INVALID_OPERATION in: ../src/../third_party/imgui/imgui_impl_sdl_gl3.cpp:85
   ---- Expression: glBindVertexArray(g_VaoHandle)

@kainjow kainjow changed the title Macos build macOS build fixes and issues Jan 23, 2017
@serge-rgb serge-rgb merged commit f685ab9 into serge-rgb:master Jan 23, 2017
@serge-rgb
Copy link
Owner

Thanks!
I believe tundra has an easy way to generate Bundles, but we'll see...
I will see if I can replicate the glBufferData/glBindVertexArray problem with my macbook
Also, I'll add you to the credits in the next commit

@kainjow
Copy link
Contributor Author

kainjow commented Jan 23, 2017

Yes, I see now that there is bundle support. Just had to find my way around Tundra. I am also working on adding Tundra to Homebrew so it'll be easier to install.

@kainjow
Copy link
Contributor Author

kainjow commented Jan 24, 2017

If you can get the OpenGL stuff working, I can implement fairly easily the missing platform functions for macOS (would need to covert the file to Objective-C).

@kainjow kainjow deleted the macos-build branch January 24, 2017 22:21
@serge-rgb
Copy link
Owner

That would be great! I'll get back to you after fixing the GL problems

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

Successfully merging this pull request may close these issues.

2 participants