-
Notifications
You must be signed in to change notification settings - Fork 3
feat(webgl): implement vertexAttrib[1234]f[v] vector methods #400
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
base: main
Are you sure you want to change the base?
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -816,6 +816,62 @@ namespace endor | |||||
| sendCommandBufferRequest(req); | ||||||
| } | ||||||
|
|
||||||
| void WebGLContext::vertexAttrib1fv(const WebGLAttribLocation &index, const vector<float> values) | ||||||
| { | ||||||
| auto req = VertexAttrib1fvCommandBufferRequest(index.programId, index.name, values); | ||||||
| if (index.index.has_value()) | ||||||
| req.setLoc(index.index.value()); | ||||||
| sendCommandBufferRequest(req); | ||||||
| } | ||||||
|
|
||||||
| void WebGLContext::vertexAttrib1fv(int index, const vector<float> values) | ||||||
|
||||||
| void WebGLContext::vertexAttrib1fv(int index, const vector<float> values) | |
| void WebGLContext::vertexAttrib1fv(int index, const vector<float> &values) |
Outdated
Copilot
AI
Oct 29, 2025
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.
The values parameter should be passed by const reference (const vector<float> &values) instead of by value to avoid unnecessary copying of vector data. This matches the pattern used elsewhere in the codebase and improves performance.
Outdated
Copilot
AI
Oct 29, 2025
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.
The values parameter should be passed by const reference (const vector<float> &values) instead of by value to avoid unnecessary copying of vector data. This matches the pattern used elsewhere in the codebase and improves performance.
Outdated
Copilot
AI
Oct 29, 2025
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.
The values parameter should be passed by const reference (const vector<float> &values) instead of by value to avoid unnecessary copying of vector data. This matches the pattern used elsewhere in the codebase and improves performance.
| void WebGLContext::vertexAttrib3fv(const WebGLAttribLocation &index, const vector<float> values) | |
| void WebGLContext::vertexAttrib3fv(const WebGLAttribLocation &index, const vector<float> &values) |
Outdated
Copilot
AI
Oct 29, 2025
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.
The values parameter should be passed by const reference (const vector<float> &values) instead of by value to avoid unnecessary copying of vector data. This matches the pattern used elsewhere in the codebase and improves performance.
Outdated
Copilot
AI
Oct 29, 2025
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.
The values parameter should be passed by const reference (const vector<float> &values) instead of by value to avoid unnecessary copying of vector data. This matches the pattern used elsewhere in the codebase and improves performance.
Outdated
Copilot
AI
Oct 29, 2025
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.
The values parameter should be passed by const reference (const vector<float> &values) instead of by value to avoid unnecessary copying of vector data. This matches the pattern used elsewhere in the codebase and improves performance.
| void WebGLContext::vertexAttrib4fv(int index, const vector<float> values) | |
| void WebGLContext::vertexAttrib4fv(int index, const vector<float>& values) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -392,6 +392,14 @@ namespace endor | |
| void vertexAttrib3f(int index, float v0, float v1, float v2); | ||
| void vertexAttrib4f(const WebGLAttribLocation &, float v0, float v1, float v2, float v3); | ||
| void vertexAttrib4f(int index, float v0, float v1, float v2, float v3); | ||
| void vertexAttrib1fv(const WebGLAttribLocation &, const std::vector<float> values); | ||
| void vertexAttrib1fv(int index, const std::vector<float> values); | ||
| void vertexAttrib2fv(const WebGLAttribLocation &, const std::vector<float> values); | ||
| void vertexAttrib2fv(int index, const std::vector<float> values); | ||
| void vertexAttrib3fv(const WebGLAttribLocation &, const std::vector<float> values); | ||
| void vertexAttrib3fv(int index, const std::vector<float> values); | ||
| void vertexAttrib4fv(const WebGLAttribLocation &, const std::vector<float> values); | ||
| void vertexAttrib4fv(int index, const std::vector<float> values); | ||
|
||
| std::optional<WebGLActiveInfo> getActiveAttrib(std::shared_ptr<WebGLProgram> program, unsigned int index); | ||
| std::optional<WebGLActiveInfo> getActiveUniform(std::shared_ptr<WebGLProgram> program, unsigned int index); | ||
| std::optional<WebGLAttribLocation> getAttribLocation(std::shared_ptr<WebGLProgram> program, const std::string &name); | ||
|
|
||
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.
The
valuesparameter should be passed by const reference (const vector<float> &values) instead of by value to avoid unnecessary copying of vector data. This matches the pattern used elsewhere in the codebase and improves performance.