-
Notifications
You must be signed in to change notification settings - Fork 168
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
Basic framework for support of the OES_standard_derivatives. #72
Conversation
…ly not integrated with ANGLE's extension system properly.
@@ -890,6 +894,9 @@ gl.getExtension = function getExtension (name) { | |||
ext = new STACKGL_resize_drawingbuffer() | |||
ext.resize = this.resize.bind(this) | |||
break | |||
case 'OES_standard_derivatives': | |||
ext = new OES_standard_derivatives() | |||
break; |
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.
Extra semicolon
In order to enable the extension we'll need to stick the following preprocessor directive in the head of each shader: #extension GL_OES_standard_derivatives : enable I think the right way to do this would be to have the WebGL context track a list of all shader extensions, then when it is enabled prepend it to all future created shaders when enabled. We should also use the #extension GL_OES_standard_derivatives : enable
// ... and any other extensions ...
#line 1 |
I know that if you want to use this in WebGL, you need to start your share with:
I sort of figured that this WebGL glsl directive was converted automatically into OpenGL via the ANGLE project? Or am I mistaken. I guess I keep expecting it to work easily because ANGLE already supports this extension (as well as quite a few others.) |
Yeah, disregard that last remark, I was confused. I think you should just be able to query the extension from ANGLE and load it directly. Can't dig into it right now, my attention is split a bit. |
@mikolalysenko, Okay I understand. Let me know if you wanted compensation for your time to help make this library better. We can offer some. |
What's the status of this? Does it work? Can it be merged? Wouldn't this approach work for other extensions? |
So I've done a bit of the work to support the OES_standard_derivates extension, but it is not complete. I am missing how to integrate it with ANGLE. I notice in the angle code base there is extensions.standardDerivates but I do not see how it is set:
I would appreciate some guidance or some existing example code to follow. Maybe I should be looking at the Chromium source code?
If we could figure out how to do this glue to ANGLE we can likely support a ton of extensions quite quickly.
Thanks for any help.