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

Replace Gfx 3D API backends with sokol_gfx.h #298

Open
wants to merge 92 commits into
base: master
Choose a base branch
from
Open

Conversation

floooh
Copy link
Owner

@floooh floooh commented May 5, 2018

No description provided.

floooh added 30 commits January 5, 2018 17:30
- removed hardwired vertex attrs from MeshBuilder and ShapeBuilder
- MeshBuilder and ShapeBuilder no longer return a MeshSetup, but
  instead a Result object
- convert uniform block definitions when creating sokol shaders
- remove uniform block type hash
@pixelherodev
Copy link
Contributor

What still needs to be done on this? Anything I can do to help?

@floooh
Copy link
Owner Author

floooh commented Oct 10, 2018

I've been hesitating to merge this because it contains breaking changes, and I was focusing on other things in the past months...

Have you seen this blog post? https://floooh.github.io/2018/05/05/oryol-sokol-gfx-changes.html

I would appreciate some feedback on the API changes (basically either "WTF is this shit", or "that's fine") ;)

@pixelherodev
Copy link
Contributor

Read that multiple times already, and I definitely like it.

What I do recommend though is maybe giving people a bit of notice before merging this.

I don't mind changing my code a bit, but anything using Oryol via git in fips will have problems once it's merged because their code will immediately stop working in CI, or on any new computer, or after fips updateing.

@iboB
Copy link

iboB commented Nov 29, 2018

I think a good idea to proceed would be this:

  • Create a tag on master (for example "v1.0.0"). This will also lead to a GitHub release, so the code will be easy to find and download.
  • Create a branch "Oryol-1.0.0". You may choose to support this branch for a while for people who don't have time to migrate but still want bugfixes. (However don't feel obliged to do so. Supporting older versions can be demoralizing 😄 )
  • Merge this pull request, and create a release Oryol-2.0.0 (semver tells us that breaking changes require a major version upgrade. Still many people are reluctant to upgrade a major version if the breaking changes are only "slightly breaking" 😉 ... 1.1.0 could also be fine)
  • Add an announcement about this at the top of the README. Then after a while remove it from the top and leave it in the release notes alone. People using it through git should know that if they don't want to migrate, they should switch to the tag or branch

@GeertArien
Copy link

Any update on what's the status of this pr? I've read the blog post and I really like the changes. I've just started development on my application so I would much prefer to use this branch, also to avoid extra work in the future. However I noticed this branch is now a few commits behind the master branch.

It's true what they say about breaking existing builds. But fips supports specifying git branch or commit hash, so these problems should be easy to solve for project maintainers.

Is there anything else we could help with?

@floooh
Copy link
Owner Author

floooh commented Feb 28, 2019

I think the branch needs a few fixes for changes that happened in sokol-gfx API, but other then that I don't think there are big outstanding issues.

I'm still not entirely happy with the builder-pattern initialization (compared to C99's designated initialization), but I think it's the best solution for what's allowed in C++.

I need to wrap up a few things in the sokol headers first though, but I think in a couple of weeks its in a state where I can take care of Oryol again.

Another thing I want to do is replace the application wrapper parts with sokol_app.h, this would also remove some big chunks of code from Oryol. But one thing after the other...

@GeertArien
Copy link

That makes a lot of sense, it will also make it easier to maintain these two projects.

The builder-pattern doesn't really bother me that much tbh, I think it's an elegant compromise (for what it's worth: designated initialization should be included in C++20).

Thanks for the update!

@pixelherodev
Copy link
Contributor

My biggest current concern is that this will make Oryol unable to work with Wayland, as to the best of my knowledge Sokol is currently unusable with Wayland (which is the biggest thing stopping me from switching to Sokol for some of my projects).

@floooh
Copy link
Owner Author

floooh commented May 5, 2019

@pixelherodev This branch currently only uses sokol_gfx.h, but not sokol_app.h. On Linux GLFW is used for window creation, so theoretically it should work with Wayland even when sokol_gfx.h is used (I only tested that after your PR for fips-glfw with the GLFW samples in the sokol-samples repo).

@pixelherodev
Copy link
Contributor

Ah, thanks for the clarification. Let me know when this is closer to being ready and I'll happily take it for a test drive under both X11 and Wayland with a few of my existing projects :)

@frink
Copy link

frink commented Sep 4, 2020

Did this idea die a year ago?

@floooh
Copy link
Owner Author

floooh commented Sep 4, 2020

Oryol is a bit on the backburner for quite a while now. The problem with this PR in particular is that I also did a lot of API changes in the Gfx module (adding the builder pattern), and I'm not happy with those changes anymore (C99 designated initialization has spoiled me, and I was hoping that things would get more straightforward when designated init lands in C++20, but it turned out that the C++ version is so crippled that also isn't very helpful, so my motivation to continue with this PR isn't that great either) ;)

@frink
Copy link

frink commented Sep 4, 2020

Sokol has matured so much that it seems like you're on the verge of replacing most of Oryol except for some of the drawing stuff. One thing that is not clear is how you see the relationship between the two libraries. You should probably do another blog post on this and explain where your brain is at now... It seems like Sokol definitely is the one getting most of the love these days.

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.

5 participants