ebook img

Learn OpenGL ES: For Mobile Game and Graphics Development PDF

309 Pages·2013·7.21 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview Learn OpenGL ES: For Mobile Game and Graphics Development

Learn OpenGL ES For Mobile Game and Graphics Development Prateek Mehta Learn OpenGL ES Copyright © 2013 by Prateek Mehta This work is subject to copyright. All rights are reserved by the Publisher, whether the whole or part of the material is concerned, specifically the rights of translation, reprinting, reuse of illustrations, recitation, broadcasting, reproduction on microfilms or in any other physical way, and transmission or information storage and retrieval, electronic adaptation, computer software, or by similar or dissimilar methodology now known or hereafter developed. Exempted from this legal reservation are brief excerpts in connection with reviews or scholarly analysis or material supplied specifically for the purpose of being entered and executed on a computer system, for exclusive use by the purchaser of the work. Duplication of this publication or parts thereof is permitted only under the provisions of the Copyright Law of the Publisher’s location, in its current version, and permission for use must always be obtained from Springer. Permissions for use may be obtained through RightsLink at the Copyright Clearance Center. Violations are liable to prosecution under the respective Copyright Law. ISBN-13 (pbk): 978-1-43025053-1 ISBN-13 (electronic): 978-1-4302-5054-8 Trademarked names, logos, and images may appear in this book. Rather than use a trademark symbol with every occurrence of a trademarked name, logo, or image we use the names, logos, and images only in an editorial fashion and to the benefit of the trademark owner, with no intention of infringement of the trademark. The use in this publication of trade names, trademarks, service marks, and similar terms, even if they are not identified as such, is not to be taken as an expression of opinion as to whether or not they are subject to proprietary rights. The images of the Android Robot (01 / Android Robot) are reproduced from work created and shared by Google and used according to terms described in the Creative Commons 3.0 Attribution License. Android and all Android and Google-based marks are trademarks or registered trademarks of Google, Inc., in the U.S. and other countries. Apress Media, L.L.C. is not affiliated with Google, Inc., and this book was written without endorsement from Google, Inc. While the advice and information in this book are believed to be true and accurate at the date of publication, neither the authors nor the editors nor the publisher can accept any legal responsibility for any errors or omissions that may be made. The publisher makes no warranty, express or implied, with respect to the material contained herein. President and Publisher: Paul Manning Lead Editor: Steve Anglin Developmental Editor: Tom Welsh Technical Reviewer: Shane Kirk Editorial Board: Steve Anglin, Mark Beckner, Ewan Buckingham, Gary Cornell, Louise Corrigan, Morgan Ertel, Jonathan Gennick, Jonathan Hassell, Robert Hutchinson, Michelle Lowman, James Markham, Matthew Moodie, Jeff Olson, Jeffrey Pepper, Douglas Pundick, Ben Renow- Clarke, Dominic Shakeshaft, Gwenan Spearing, Matt Wade, Tom Welsh Coordinating Editor: Jill Balzano Copy Editor: Lori Cavanaugh Compositor: SPi Global Indexer: SPi Global Artist: SPi Global Cover Designer: Anna Ishchenko Distributed to the book trade worldwide by Springer Science+Business Media New York, 233 Spring Street, 6th Floor, New York, NY 10013. Phone 1-800-SPRINGER, fax (201) 348-4505, e-mail orders- [email protected], or visit www.springeronline.com. Apress Media, LLC is a California LLC and the sole member (owner) is Springer Science + Business Media Finance Inc (SSBM Finance Inc). SSBM Finance Inc is a Delaware corporation. For information on translations, please e-mail [email protected], or visit www.apress.com. Apress and friends of ED books may be purchased in bulk for academic, corporate, or promotional use. eBook versions and licenses are also available for most titles. For more information, reference our Special Bulk Sales–eBook Licensing web page at www.apress.com/bulk- sales. Any source code or other supplementary materials referenced by the author in this text is available to readers at www.apress.com. For detailed information about how to locate your book’s source code, go to www.apress.com/source-code/. Dedicated to my parents and my brother for their everlasting support and encouragement. And to the Stack Overflow community, for making computer programming less troublesome. Contents at a Glance About the Author About the Technical Reviewer Acknowledgments Preface Chapter 1: Benefits of the New API Chapter 2: Implementation Prerequisites Chapter 3: ES 2.0 Fundamentals Chapter 4: 3D Modeling Chapter 5: Texturing and Shading Chapter 6: Taking the Development Ahead Index Contents About the Author About the Technical Reviewer Acknowledgments Preface Chapter 1: Benefits of the New API Modern Graphic-rendering API Devices Love It Easy App Development: Let’fs Create an OpenGL Surface View Determining OpenGL ES Version Creating the OpenGL Surface ES 2.0 Is for the Ambitious Where Are the Developers? Summary Chapter 2: Implementation Prerequisites Selecting a Development Device: Why Upgrade to Gingerbread? Choosing Inputs That Your Game Needs Tank Fence Creating Menus for the Game Setting Views Using setContentView and addContentView Sleek Design of XML Views Working with Buttons and the Counter Class Using Touch for Rotation Rotation Using Android Sensors Summary Chapter 3: ES 2.0 Fundamentals EGL on Android The GLSurfaceView Class Setting up the Renderer Renderer Thread Decoupling for Dedicated Performance Thread Safety Implemented Methods Anatomy of a Renderer GL SURFACE CHANGED Application Framebuffer Double Buffering Clearing the Color Buffer Setting the Viewport GLSL Shader Program Vertex Shader Example Data Types Fragment Shader Example GL POINT BASIC Application Using the loadShader Method Attributes Drawing Line and Triangle Primitives Varyings Triangle Primitive Normalized Device Coordinate System 3D-Transformation Types of Transformations The Matrix Class State Management Cull Face Depth Test Summary Chapter 4: 3D Modeling Drawing Shapes Using glDrawElements GL POINT ELEMENTS Application Drawing Line and Triangle Primitives Blender for Modeling Default Layout Using Object Mode Translating Objects Using the Lasso-Select Command Modeling Objects for the Game Parsing Objects for OpenGL ES Installing Perl Downloading Parser Using the Parser Using the Mesh Data Adding the Player Object Basic Components in the Blender Interface: Screenshots Summary Chapter 5: Texturing and Shading

Description:
Want to create sophisticated games and graphics-intensive apps? Learn OpenGL ES gets you started immediately with OpenGL ES.  After mastering the basics of OpenGL ES itself, you will quickly find yourself writing and building game apps, without having to learn about object oriented programming tech
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.