Posts Tagged indexbuffer

When getSize() Lies

Tags: , , , , , , , , , , ,

flash.sampler.getSize() is a handy tool for figuring out how much memory a class instance uses. However, it is often flat-out wrong. Today’s article tries it out on a variety of classes to find out which ones it works on and which ones it doesn’t.

Read the rest of this article »


Double the Performance of Stage3D Apps

Tags: , , , , , ,

To draw with Flash Player 11’s Stage3D API, you must set up the state of various GPU resources before finally calling drawTriangles. Inevitably, you’ll end up calling drawTriangles multiple times during a single frame to draw your characters, terrain, sky, and so forth. In between these calls you will change the GPU’s state by calling Context3D‘s set* functions. This article will show you which of these functions can literally cut your app’s performance in half.

Read the rest of this article »


Simple 2D With Stage3D

Tags: , , , , , , , ,

Along with Flash Player 11’s new Stage3D class have come hardware-accelerated 2D rendering engines. Impressive results have already been demonstrated by advanced engines like Starling and ND2D. Today’s article shows a simple Stage3D-based sprite class to help learn more about how these engines are implemented and provides a simplified alternative to the more complex 2D engines that still delivers hardware-accelerated performance.

Read the rest of this article »


Stage3D Upload Speed Tester

Tags: , , , , ,

Since Flash Player 11’s new Stage3D allows us to utilize hardware-acceleration for 3D graphics, that entails a whole new set of performance we need to consider. Today’s article discusses the performance of uploading data from system memory (RAM) to video memory (VRAM), such as when you upload textures, vertex buffers, and index buffers. Is it faster to upload to one type rather than another? Is it faster to upload from a Vector, a ByteArray, or a BitmapData? Is there a significant speedup when using software rendering so that VRAM is the same as RAM? Find out the answers to all of these questions below.

Read the rest of this article »