-
Notifications
You must be signed in to change notification settings - Fork 164
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
Stringify stencilFuncSeparate #212
Conversation
protected stringifyArgs(args: IArguments): string[] { | ||
const stringified = []; | ||
stringified.push(WebGlConstants.stringifyWebGlConstant(args[0], "stencilFuncSeparate")); | ||
stringified.push(WebGlConstants.stringifyWebGlConstant(args[1], "stencilFuncSeparate")); |
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.
nit: I don't like how the command name is typed out here; it would probably be smarter to use the static commandName
variable? However, explicitly writing it out is how it's done everywhere.
@@ -139,6 +140,7 @@ export class CommandSpy { | |||
[GetShaderPrecisionFormat.commandName]: (options: IContextInformation) => new GetShaderPrecisionFormat(options), | |||
[GetTransformFeedbackVarying.commandName]: (options: IContextInformation) => new GetTransformFeedbackVarying(options), | |||
[Scissor.commandName]: (options: IContextInformation) => new Scissor(options), | |||
[StencilFuncSeparate.commandName]: (options: IContextInformation) => new StencilFuncSeparate(options), |
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.
It would probably make sense to also addstencilFunc
support, but I only ran into this issue with stencilFuncSeparate
and needed a fix asap.
Ideally some code could be factored out, or it could be part of the same file?
4197a15
to
f9d3770
Compare
Thanks a lot @JannikGM !!! |
Barely tested; but binary display should help when working with stencil planes.
Before this PR, spector.js would even try to figure out WebGL names for the last 2 arguments, which would always be some meaningless enum constant.