Bug 28790

Summary: Improve OpenGL ES 2.0 gears demo
Product: Mesa Reporter: Alexandros Frantzis <alexandros.frantzis>
Component: DemosAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: medium    
Version: git   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: Improve es2gears.c gears demo
Improve es2gears.c gears demo (version 2)

Description Alexandros Frantzis 2010-06-28 05:05:54 UTC
The attached patch improves the es2gears.c gears demo by:

* Refactoring and making more readable the way gears are drawn.
* Providing correct normals for the gear surfaces (so that lighting works correctly).
* Adding comments.
Comment 1 Alexandros Frantzis 2010-06-28 05:06:42 UTC
Created attachment 36572 [details] [review]
Improve es2gears.c gears demo
Comment 2 Alexandros Frantzis 2010-07-13 07:43:04 UTC
Created attachment 36993 [details] [review]
Improve es2gears.c gears demo (version 2)

Improve GLES2 port:
 * Refactor gear drawing.
 * Use correct normals for surfaces.
 * Improve shader.
 * Use perspective projection transformation.
 * Add FPS count.
 * Add comments.
Comment 3 Chia-I Wu 2010-07-14 19:26:38 UTC
This looks good.  I've committed v2 as bf546ba0e51423841f063cac5826faf85465ce1e.
(You may use "git format-patch HEAD^" to generate the patch next time to retain the author/commit message.)

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.