OLD | NEW |
1 .. _devguide-coding-3D-graphics: | 1 .. _devguide-coding-3D-graphics: |
2 | 2 |
3 ########### | 3 ########### |
4 3D Graphics | 4 3D Graphics |
5 ########### | 5 ########### |
6 | 6 |
7 Native Client applications use the `OpenGL ES 2.0 | 7 Native Client applications use the `OpenGL ES 2.0 |
8 <http://en.wikipedia.org/wiki/OpenGL_ES>`_ API for 3D rendering. This document | 8 <http://en.wikipedia.org/wiki/OpenGL_ES>`_ API for 3D rendering. This document |
9 describes how to call the OpenGL ES 2.0 interface in a Native Client module and | 9 describes how to call the OpenGL ES 2.0 interface in a Native Client module and |
10 how to build an efficient rendering loop. It also explains how to validate GPU | 10 how to build an efficient rendering loop. It also explains how to validate GPU |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
153 | 153 |
154 What to do when there are problems | 154 What to do when there are problems |
155 ---------------------------------- | 155 ---------------------------------- |
156 | 156 |
157 Using the vetting procedure described above, you should be able to detect the | 157 Using the vetting procedure described above, you should be able to detect the |
158 most common problems before your application runs. If there are problems, your | 158 most common problems before your application runs. If there are problems, your |
159 code should describe the issue as clearly as possible. That's easy if there is a | 159 code should describe the issue as clearly as possible. That's easy if there is a |
160 missing feature. Failure to create a graphics context is tougher to diagnose. At | 160 missing feature. Failure to create a graphics context is tougher to diagnose. At |
161 the very least, you can suggest that the user try to update the driver. You | 161 the very least, you can suggest that the user try to update the driver. You |
162 might want to linke to the Chrome page that describes `how to do updates | 162 might want to linke to the Chrome page that describes `how to do updates |
163 <http://support.google.com/chrome/bin/answer.py?hl=en&answer=1202946>`_. | 163 <https://support.google.com/chrome/answer/1202946>`_. |
164 | 164 |
165 If a user can't update the driver, or their problem persists, be sure to gather | 165 If a user can't update the driver, or their problem persists, be sure to gather |
166 information about their graphics environment. Ask for the contents of the Chrome | 166 information about their graphics environment. Ask for the contents of the Chrome |
167 ``about:gpu`` page. | 167 ``about:gpu`` page. |
168 | 168 |
169 Document unreliable drivers | 169 Document unreliable drivers |
170 --------------------------- | 170 --------------------------- |
171 | 171 |
172 It can be helpful to include information about known dubious drivers in your | 172 It can be helpful to include information about known dubious drivers in your |
173 user documentation. This might help identify if a rogue driver is the cause of a | 173 user documentation. This might help identify if a rogue driver is the cause of a |
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
521 * **Don't read data from the GPU.** Don't call ``glReadPixels``, as it is slow. | 521 * **Don't read data from the GPU.** Don't call ``glReadPixels``, as it is slow. |
522 | 522 |
523 * **Don't update a small portion of a large buffer.** In the current OpenGL ES | 523 * **Don't update a small portion of a large buffer.** In the current OpenGL ES |
524 2.0 implementation when you update a portion of a buffer (with | 524 2.0 implementation when you update a portion of a buffer (with |
525 ``glSubBufferData`` for example) the entire buffer must be reprocessed. To | 525 ``glSubBufferData`` for example) the entire buffer must be reprocessed. To |
526 avoid this problem, keep static and dynamic data in different buffers. | 526 avoid this problem, keep static and dynamic data in different buffers. |
527 | 527 |
528 * **Don't call glDisable(GL_TEXTURE_2D).** This is an OpenGL ES 2.0 | 528 * **Don't call glDisable(GL_TEXTURE_2D).** This is an OpenGL ES 2.0 |
529 error. Each time it is called, an error messages will appear in Chrome's | 529 error. Each time it is called, an error messages will appear in Chrome's |
530 ``about:gpu`` tab. | 530 ``about:gpu`` tab. |
OLD | NEW |