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 a test for the recent glew accessor functionality #42
Conversation
2b2a839
to
a9c39c6
Compare
Are unprovided versions supposed to die like this, and not return 0 instead?
|
I found that this AM. It is fixed in git and a new developers
release has been uploaded to CPAN.
…On 2/20/2017 08:51, Christian Walde (Mithaldu) wrote:
Are unprovided versions supposed to die like this, and not return 0
instead?
|GLEW_VERSION_4_1 not available on this machine at
t/02_glew_version_accessors.t line 16. |
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAwNeQVs1PQ0jIe19SI0zaWPBEXjfyQgks5reZpEgaJpZM4MGIKY>.
|
a9c39c6
to
5c0b679
Compare
Ah, cool. :) Changed the test and pushed, let's see what Travis thinks. |
47e7c38
to
5cc73ad
Compare
Looks like the most recent change doesn't quite do it:
|
5cc73ad
to
507ce16
Compare
The code for all the GLEW_* accessors is identical. My guess is the answer depends on what type of context you requested. The default is back compatible but that may not be compatible with the latest core functionality. I'll continue to investigate here. |
507ce16
to
88332f3
Compare
@wchristian: Could you please clarify---for the incorrectly reported GLEW_VERSION_M_N, does the functionality actually work even though the state variable is claiming not? |
What happens is that the gl version is 2.1, so i'd expect only things below that to be there. However surprisingly for 3.1 - 4.0 it gets 1 from the GLEW calls, unexpectedly, then the 4.1 - 4.4 ones behave as expected and return 0, and the 4.5 call again returns 1; despite the GL version being only 2.1. |
That aside i'm not sure what you mean with "functionality works". If you look at the test code it only calls the GLEW version calls and compares their output. |
This may have to do with the use of the glewExperimental = GL_TRUE for the glewInit call. What happens if you change that to GL_FALSE and rebuild? |
e23ae10
to
63dfeb5
Compare
Ok, tried deleting the line to see if it helps, didn't, just now pushed a branch where it's explicitly set to GL_FALSE, maybe that helps. |
No change in outcome. |
Thanks for the followup. On my machine, the results are the same as from the glewinfo program that comes with the GLEW distribution. Since I'm not in a position to check the GLEW_VERSION_N_M result with attempts to use the relevant OpenGL API functions, I'm going to assume this is a potential issue that appears to come from the GLEW sources and not from our bindings. |
I'm not even sure if it's incorrect though. Maybe some higher version subsets can be available despite low gl version? |
I asked a friend with some experience with GL and it seems like the version is just a bound on what's guaranteed, but not a limit of what's not provided. So i guess i'll just have to have the test check all the variables below the version for 1, and the ones above for "not a crash". I'll make the appropiate changes tomorrow. |
6bb4a98
to
5b8ace6
Compare
Ok, fixed it up and the test should have some use now at least. |
5b8ace6
to
1b468a8
Compare
Is this request still valid? My understanding is that checking the specific numbers is not 100% reliable. A test that the GLEW_* accessors return values is probably sufficient for a test (sort of an existence proof test). |
It is, see my last two messages before yours, also the changes i made to the code since. :) |
Sorry, the test generation code wasn't clear as to whether it was fixed or not. |
Want me to add some comments to explain what it's doing? |
Nope, still fails which doesn't mean the code is broken, just that the OpenGL context/implementation is not reporting things correctly. How about wrapping the whole thing in a TODO block so we can monitor the success or failure without generating false fails from CPAN Testers? |
Paste the fail here please for future reference. And sure, TODO wrapping should be interesting. Want me to do it? |
|
I would appreciated it. |
1b468a8
to
ab61cde
Compare
Added comments and marked the tests todo. |
Is there a reason the test number begins with 02_ instead of 03_? |
The numbers just specify phasing, outside of being run after the context check i don't particularly care in which order they're run. Feel free to modify if you have an opinion on the order. :) |
I can't test this usefully myself, but this adds a test for your recent glew accessor work and, if run on a non-4.5 machine, should be able to verify whether #38 is fixed.