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

Cannot use createTexture in mac #56

Open
remorses opened this issue Apr 5, 2022 · 3 comments
Open

Cannot use createTexture in mac #56

remorses opened this issue Apr 5, 2022 · 3 comments

Comments

@remorses
Copy link

remorses commented Apr 5, 2022

Mac OpenGl version is stuck on OpenGL 4.1

The following line is using a function that requires 4.5 (glCreateTextures)

zgl/zgl.zig

Line 1357 in b2c0379

c.glCreateTextures(@enumToInt(texture_target), 1, &tex_name);

Does this mean that zgl cannot run on mac systems? Is there any workaraound?

@remorses
Copy link
Author

remorses commented Apr 5, 2022

I am a total OpenGL noob that is trying to run this project on mac and getting this error

There is probably an alternative function to create textures that work on previous opengl version right? So probably the problem is that specific code and not zgl

@ikskuh
Copy link
Member

ikskuh commented Apr 6, 2022

Yeah, zgl was built with OpenGL 4.5 in mind right now. I don't intent to change this soon, but maybe enable a API wrapper to allow the use of GL_ARB_direct_state_access instead.

But i have to be honest: I don't use zgl anymore personally and keep the project in maintainance mode. Feel free to figure out a way and PR it though!

@quantumedbox
Copy link

I am a total OpenGL noob that is trying to run this project on mac and getting this error

There is probably an alternative function to create textures that work on previous opengl version right? So probably the problem is that specific code and not zgl

Yes, you can use glGenTextures instead, which is wrapped under genTexture and available from version 2.0. I personally have no issues using extended OpenGL 2.1 with zgl. Probably too late of an answer, but somebody might be looking at it in the future, so.

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