-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Add GLFW/glfw3.h and update opengl.h #28
Conversation
remove debug printing
This reverts commit 8be4fa6.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TotallyGamerJet Looks good overall, is it ready for the merge, or you want to add something else?
I noticed that there are a few notes regarding incorrect signatures and different types returned. I suggest using the same approach as is used for SDL: make a small adapter library to convert signatures.
I wouldn't merge it just yet. I wanted to make sure the header looked good before I wrote an adapter. I had a few questions:
|
Yes, looking at the name we can fake it for now.
If I understand correctly you are asking how to define a pointer to a type, before defining the type, right? If so, you can check how
Yes, if it's okay for you. It would be easier to move it to the same org. I should also invite you to the organization, by the way. |
@dennwc sorry I haven’t been working on this. I have been busy with uni. I’m not sure when I’ll have time again to work on the commit. It is just missing some callbacks and methods but overall it is correct. If you want to just merge this in you can or wait until I have time to add the rest. Also the gotranspile/glfw is 100% done as long as there are no future functions that need specific changes. I don’t know any off the top of my head. |
Hello, I was wondering if the end-goal of this work is to transpile glfw to pure go ? |
Hey @Zyko0 ! Cxgo could be used to eventually transpile GLFW to pure Go, but that's not the main goal. This specific PR make it easier to transpile C projects that use GLFW to Go. Having said that, it would be interesting to try what you proposed. |
Thank you for clarifying ! Yes we might need to port glfw to Go for https://github.com/hajimehoshi/ebiten project anyway, so I wanted to know if this work started somewhere else 😅 |
@Zyko0 I've actually really wanted to port glfw to pure go. The main issue is that it would require porting the windowing apis for windows and linux. There are many pure go windows api libraries but none are complete so someone would need to use the metadata to generate it (see this issue). For linux, there is an XCB port but glfw uses XLib and wayland so those would need to be ported. Then headers will also need to be written which would be a lot of work. Either way, glfw on mac would still require c because there is no way to create a window without ObjC. It's a noble effort that I hope eventually gets done! |
@TotallyGamerJet Thanks for your explanations about the current state of such a port ! 😄 |
This is open for quite a while now, so I'll review it again and will port these changes to main branch. |
Oh wow it definitely has. I totally forgot about this. I could take a look today and if it's not too difficult to port to main I can do that. |
Updated from gotranspile#28. I also removed the OpenGL parts to make it easier to merge.
Closing in favor of #71 |
Updated from #28. I also removed the OpenGL parts to make it easier to merge.
No description provided.