12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <base href="../../" />
- <script src="list.js"></script>
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- <h1>[name]</h1>
- <p class="desc">
- This buffer attribute class does not construct a VBO. Instead, it uses
- whatever VBO is passed in constructor and can later be altered via the
- *buffer* property.<br /><br />
- It is required to pass additional params alongside the VBO. Those are:
- the GL context, the GL data type, the number of components per vertex
- and the number of vertices.<br /><br />
- The most common use case for this class is when some kind of GPGPU
- calculation interferes or even produces the VBOs in question.
- </p>
- <h2>Constructor</h2>
- <h3>[name]( [param:WebGLRenderingContext gl], [param:WebGLBuffer buffer], [param:GLenum type], [param:Integer itemSize], [param:Integer count] )</h3>
- <p>
- </p>
- <h2>Properties</h2>
- <h3>[property:WebGLBuffer buffer]</h3>
- <p>
- The current <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGLBuffer" target="_blank">WebGLBuffer</a> instance.
- </p>
- <h3>[property:Integer count]</h3>
- <p>
- The expected number of vertices in VBO.
- </p>
- <h3>[property:Integer itemSize]</h3>
- <p>
- How many values make up each item (vertex).
- </p>
- <h3>[property:Integer elementSize]</h3>
- <p>
- Stores the corresponding size in bytes for the current *type* property value.
- </p>
- <p>
- <b>Don't touch</b>.
- </p>
- <h3>[property:GLenum type]</h3>
- <p>
- A <a href="https://developer.mozilla.org/en-US/docs/Web/API/WebGL_API/Constants#Standard_WebGL_1_constants" target="_blank">WebGL Data Type</a> describing the underlying VBO contents.
- </p>
- <p>
- Setting this is only allowed with *setType*.
- </p>
- <h3>[property:Boolean isGLBufferAttribute]</h3>
- <p>
- Should be *true*.
- </p>
- <h2>Methods</h2>
- <h3>[method:null setBuffer]( buffer ) </h3>
- <p>Sets the *buffer* property.</p>
- <h3>[method:null setType]( type ) </h3>
- <p>Sets the *type* property.</p>
- <h3>[method:null setItemSize]( itemSize ) </h3>
- <p>Sets the *itemSize* property.</p>
- <h3>[method:null setCount]( count ) </h3>
- <p>Sets the *count* property.</p>
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- </body>
- </html>
|