-
Notifications
You must be signed in to change notification settings - Fork 13
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
The GL.Objects.Shaders documentation on the web page doesn't mention Initialize_Id #107
Comments
I don't understand what "caused me a bit of a headache to track down"?
|
Those examples are fine and work correctly. The problem is that the official documentation (linked at the top of this issue) provides an example and explanation that causes the program to crash with a constraint error on a UInt nested two function calls into the library's private implementation. In my opinion, that should be fixed. |
Agreed. |
By the way, the website's public repo is the |
Ah, I didn't find it. I'll make a pull request shortly. |
Fixed by PR. |
Problem page: https://flyx.github.io/OpenGLAda/gl-objects-shaders.html
This caused me a bit of a headache to track down. As far as I can tell by looking at the examples in this repo, both shaders and GL programs need to be initialised by calling
Initialize_Id
on them before use, but that page of the GitHub site doesn't mention this at all. It's not in the text nor the code example.It has this (shortened):
This exact code causes a constraint error in
Raw_Id
when it's called byLoad_Shader_Source_From_File
. I suppose that's because the ID defaults to -1 and its type is UInt, but I don't know specifically.The example code should be amended to at least have something like this:
The actual text on that page also describes a step-by-step process for using shaders, and it completely fails to mention
Initialize_Id
, so I think that should be updated too.As far as I can tell that GitHub site doesn't have a public repo, so I'm putting this issue here.
The text was updated successfully, but these errors were encountered: