Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(684)

Side by Side Diff: native_client_sdk/doc_generated/devguide/coding/3D-graphics.html

Issue 488133003: Second batch of corrections for incorrect paths. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix more paths. Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 {{+bindTo:partials.standard_nacl_article}} 1 {{+bindTo:partials.standard_nacl_article}}
2 2
3 <section id="d-graphics"> 3 <section id="d-graphics">
4 <span id="devguide-coding-3d-graphics"></span><h1 id="d-graphics"><span id="devg uide-coding-3d-graphics"></span>3D Graphics</h1> 4 <span id="devguide-coding-3d-graphics"></span><h1 id="d-graphics"><span id="devg uide-coding-3d-graphics"></span>3D Graphics</h1>
5 <p>Native Client applications use the <a class="reference external" href="http:/ /en.wikipedia.org/wiki/OpenGL_ES">OpenGL ES 2.0</a> API for 3D rendering. This d ocument 5 <p>Native Client applications use the <a class="reference external" href="http:/ /en.wikipedia.org/wiki/OpenGL_ES">OpenGL ES 2.0</a> API for 3D rendering. This d ocument
6 describes how to call the OpenGL ES 2.0 interface in a Native Client module and 6 describes how to call the OpenGL ES 2.0 interface in a Native Client module and
7 how to build an efficient rendering loop. It also explains how to validate GPU 7 how to build an efficient rendering loop. It also explains how to validate GPU
8 drivers and test for specific GPU capabilities, and provides tips to help ensure 8 drivers and test for specific GPU capabilities, and provides tips to help ensure
9 your rendering code runs efficiently.</p> 9 your rendering code runs efficiently.</p>
10 <aside class="note"> 10 <aside class="note">
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
387 </ul> 387 </ul>
388 <h3 id="don-ts">Don&#8217;ts</h3> 388 <h3 id="don-ts">Don&#8217;ts</h3>
389 <ul class="small-gap"> 389 <ul class="small-gap">
390 <li><strong>Don&#8217;t use client side buffers.</strong> OpenGL ES 2.0 can use client side data with 390 <li><strong>Don&#8217;t use client side buffers.</strong> OpenGL ES 2.0 can use client side data with
391 <code>glVertexAttribPointer</code> and <code>glDrawElements</code>, but this is really slow. Try 391 <code>glVertexAttribPointer</code> and <code>glDrawElements</code>, but this is really slow. Try
392 to avoid client side buffers. Use Vertex Buffer Objects (VBOs) instead.</li> 392 to avoid client side buffers. Use Vertex Buffer Objects (VBOs) instead.</li>
393 <li><strong>Don&#8217;t mix vertex data and index data.</strong> By default, Pep per 3D binds buffers 393 <li><strong>Don&#8217;t mix vertex data and index data.</strong> By default, Pep per 3D binds buffers
394 to a single point. You could create a buffer and bind it to both 394 to a single point. You could create a buffer and bind it to both
395 <code>GL_ARRAY_BUFFER</code> and <code>GL_ELEMENT_ARRAY_BUFFER</code>, but that would be 395 <code>GL_ARRAY_BUFFER</code> and <code>GL_ELEMENT_ARRAY_BUFFER</code>, but that would be
396 expensive overhead and it is not recommended.</li> 396 expensive overhead and it is not recommended.</li>
397 <li><strong>Don&#8217;t call ``glGet*`` or ``glCheck*`` during rendering.</stron g> This is normal 397 <li><strong>Don&#8217;t call glGet* or glCheck* during rendering.</strong> This is normal
398 advice for OpenGL programs, but is particularly important for 3D on 398 advice for OpenGL programs, but is particularly important for 3D on
399 Chrome. Calls to any OpenGL ES 2.0 function whose name begins with these 399 Chrome. Calls to any OpenGL ES 2.0 function whose name begins with these
400 strings blocks the Native Client thread. This includes <code>glGetError</code>; avoid 400 strings blocks the Native Client thread. This includes <code>glGetError</code>; avoid
401 calling it in release builds.</li> 401 calling it in release builds.</li>
402 <li><strong>Don&#8217;t use fixed point (``GL_FIXED``) vertex attributes.</stron g> Fixed point 402 <li><strong>Don&#8217;t use fixed point (GL_FIXED) vertex attributes.</strong> F ixed point
403 attributes are not supported in OpenGL ES 2.0, so emulating them in OpenGL ES 403 attributes are not supported in OpenGL ES 2.0, so emulating them in OpenGL ES
404 2.0 is slow. By default, <code>GL_FIXED</code> support is turned off in the Pepp er 3D 404 2.0 is slow. By default, <code>GL_FIXED</code> support is turned off in the Pepp er 3D
405 API.</li> 405 API.</li>
406 <li><strong>Don&#8217;t read data from the GPU.</strong> Don&#8217;t call <code> glReadPixels</code>, as it is slow.</li> 406 <li><strong>Don&#8217;t read data from the GPU.</strong> Don&#8217;t call <code> glReadPixels</code>, as it is slow.</li>
407 <li><strong>Don&#8217;t update a small portion of a large buffer.</strong> In th e current OpenGL ES 407 <li><strong>Don&#8217;t update a small portion of a large buffer.</strong> In th e current OpenGL ES
408 2.0 implementation when you update a portion of a buffer (with 408 2.0 implementation when you update a portion of a buffer (with
409 <code>glSubBufferData</code> for example) the entire buffer must be reprocessed. To 409 <code>glSubBufferData</code> for example) the entire buffer must be reprocessed. To
410 avoid this problem, keep static and dynamic data in different buffers.</li> 410 avoid this problem, keep static and dynamic data in different buffers.</li>
411 <li><strong>Don&#8217;t call ``glDisable(GL_TEXTURE_2D)``.</strong> This is an O penGL ES 2.0 411 <li><strong>Don&#8217;t call glDisable(GL_TEXTURE_2D).</strong> This is an OpenG L ES 2.0
412 error. Each time it is called, an error messages will appear in Chrome&#8217;s 412 error. Each time it is called, an error messages will appear in Chrome&#8217;s
413 <code>about:gpu</code> tab.</li> 413 <code>about:gpu</code> tab.</li>
414 </ul> 414 </ul>
415 </section> 415 </section>
416 416
417 {{/partials.standard_nacl_article}} 417 {{/partials.standard_nacl_article}}
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698