Skip to content

Conversation

@Molay
Copy link

@Molay Molay commented Mar 3, 2020

feat(webgl_rendering_context): Add all common parameters to context definition, make method gl.getParameter support int32array and float32array return value.
fix(webgl_rendering_context): Fix the return value of method gl.getContextAttributes.
feat(webgl_extensions): Add WEBGL_draw_buffers extension.
feat(egl_context_wrapper): Add method glGetFloatv to get float parameter value(s).


This change is Reviewable

…efinition, make method gl.getParameter support int32array and float32array return value.

fix(webgl_rendering_context): Fix the return value of method gl.getContextAttributes.
feat(webgl_extensions): Add WEBGL_draw_buffers extension.
feat(egl_context_wrapper): Add method glGetFloatv to get float parameter value(s).
@googlebot
Copy link

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@Molay
Copy link
Author

Molay commented Mar 3, 2020

@googlebot I signed it!

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

…port GLboolean, GLboolean[], BINDING(or null), and etc.

feat(test): Add src/tests/get_parameter_test.ts script.
feat(egl_context_wrapper): Add method glGetBooleanv to get boolean parameter value(s).
Copy link
Contributor

@nkreeger nkreeger left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I was out on leave and missed this!

Just a few comments, thank you for this detailed PR!

const { name, type, subType, length, /*nullable,*/ extension } = parameterDefinition;
let ptarget: any = gl, pname: GLenum;
const result = new VerifyResult();
// if (name === 'DRAW_BUFFER?_WEBGL') return verifyDrawBuffersWebgl(gl, parameterDefinition);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleanup here?

value = gl.getParameter(pname);
}
catch (error) {
// return result.setObject(error);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ditto here.

let numPassed = 0;
parameterDefinitions.forEach((parameterDefinition, index) => {
const result = verifyParameterDefinition(gl, parameterDefinition);
result.passed ? process.stdout.write(`\u001b[92m`) : process.stdout.write(`\u001b[91m`);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like some formatting problems here.

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

Successfully merging this pull request may close these issues.

3 participants