Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Arrow up icon
GO TO TOP
Lua Game Development Cookbook

You're reading from   Lua Game Development Cookbook Over 70 recipes that will help you master the elements and best practices required to build a modern game engine using Lua

Arrow left icon
Product type Paperback
Published in Jul 2015
Publisher
ISBN-13 9781849515504
Length 360 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Mário Kašuba Mário Kašuba
Author Profile Icon Mário Kašuba
Mário Kašuba
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Lua Game Development Cookbook
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface
1. Basics of the Game Engine FREE CHAPTER 2. Events 3. Graphics – Common Methods 4. Graphics – Legacy Method with OpenGL 1.x–2.1 5. Graphics – Modern Method with OpenGL 3.0+ 6. The User Interface 7. Physics and Game Mechanics 8. Artificial Intelligence 9. Sounds and Networking Index

Rendering to texture


Rendering to texture technique is used whenever you need to apply some kind of postprocessing on screen or to produce dynamic textures in reflections.

Over the past few years, OpenGL introduced a number of ways to obtain screen content and transfer it to texture. You could read directly from the frame buffer and store all data in texture with gl.TexSubImage2D function. This approach is a slow process because all rendering must be stalled in order to obtain a copy of the whole frame. For this kind of operation, there was a P buffer introduced sometime in 2000. It presented a more efficient way of transferring larger blocks of pixel data. However, this kind of buffer wasn't available everywhere and what's more, it was hard to use. Later, it was deprecated in OpenGL 3.0 and subsequently removed from OpenGL 3.1. Currently, the standardized way of working with frame buffer is to work with Render Buffer. Render buffer objects have been available since OpenGL 3.0. They use native...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime
Banner background image