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

[not-an-"issue"] good stuff: gogl42 even works with older GL versions #18

Open
ghost opened this issue Oct 19, 2012 · 1 comment
Open

Comments

@ghost
Copy link

ghost commented Oct 19, 2012

... of course, only if the version-related error returned by gl42.Init() is ignored and if no GL functions are called that the current run-time client GL version doesn't yet support.

Just wanted to say (you probably intended this but not sure) -- that's a feature, not a bug! Please keep it that way. I'd like for this behavior to remain so in future versions, so that I can continue to dynamically support both the newest GL features and remain compatible with older versions easily, without having to create different builds with different gogl imports or anything like that. The current ways of gogl are just perfect in that regard. No need to change a thing here ;)

Heads-up for other gogl users -- can put in the Wiki if you think that's applicable:

  • to find out the current client GL version, gl.GoStringUb(gl.GetString(gl.VERSION))
  • for keeping track of whether any code portions in your code-base reference any gogl functions or enum values that are "newer than a certain minimum GL version", I've written a simple tool to "parse .go source tree and GL XML spec, then print summary of GL API usage of any&all newer-than-said-minimum GL versions", details here

Feel free to close this non-"issue" as desired... & thx for creating gogl!

@jayschwa
Copy link
Contributor

If it is of interest to anyone, I'm developing a branch which returns error values in the same manner as idiomatic / official Go packages. One of the benefits of this is that a "not supported" error can be returned if a call is made to a function not provided by the OpenGL runtime. Previously, the package would panic from trying to call a nil function.

https://github.com/jayschwa/gogl/commits/errors

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

1 participant