Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
WebGL is a Javascript API for rendering interactive 3D / 2D graphics on the HTML5 canvas element. It is based on OpenGL ES 2.0.
2
votes
why is it faster to draw lots of small arrays than one big array?
Just to elaborate on Stomy's answer - I'd hesitate before describing time spent sorting as "waste"; if the performance gain from being able to batch outweighs the performance loss from sorting, then i …
4
votes
Difference between "buffer" and "array" in OpenGL?
This terminology is rooted in the history of OpenGL. What's important to remember is that, for most of the GL versions which are relevant here, OpenGL was evolved incrementally and by adding new func …
1
vote
Is there any reason for doing back face culling in software?
Sometimes, but it depends on your use case and data structures. You can still get a win if your data is set up so that you can cull groups of faces per test, and if doing so doesn't require you to br …
1
vote
Linking one uniform variable to many shaders
attributes like so:
glVertexAttrib4fv (13, myMatrix[0]);
glVertexAttrib4fv (14, myMatrix[1]);
glVertexAttrib4fv (15, myMatrix[2]);
glVertexAttrib4fv (16, myMatrix[3]);
(Per https://www.khronos.org/registry/webgl … /specs/1.0/ this usage is supported in WebGL). …
2
votes
Proper way to maintain Vertex Buffer Objects
One VBO per polygon, and updating it at runtime as you seem to be doing, is going to perform horribly. You'd be better off with old-school client-side arrays or even (if you weren't using ES) immedia …
3
votes
How to position/transform vertices for 2D UI in shaders?
For 2D UI you typically achieve this by using an orthographic projection matrix, and setting view and model to identity, which collapses the typical transform:
gl_Position = projection * view * model …