supplieryer.blogg.se

OpenGL ES 2.0 model
OpenGL ES 2.0 model





For example, a color might be defined as four GLubyte components (red, green, blue, alpha). All components in the attribute share a common data type. You define an attribute as a vector consisting of one to four components. An OpenGL 1.1 app uses attributes defined by the fixed-function pipeline. An OpenGL ES 2.0 or 3.0 app is free to define its own attributes each attribute in the vertex data corresponds to an attribute variable that acts as an input to the vertex shader.

OpenGL ES 2.0 model

This chapter provides a refresher on vertex data and follows it with targeted advice for how to efficiently process vertex data.Ī vertex consists of one or more attributes, such as the position, the color, the normal, or texture coordinates. But no matter which primitives you use in your app or how the pipeline is configured, your app provides vertices to OpenGL ES. In some apps, all primitives are drawn using the same pipeline configuration other apps may render different elements of the frame using different techniques. To render a frame using OpenGL ES your app configures the graphics pipeline and submits graphics primitives to be drawn. Best Practices for Working with Vertex Data To create high-performance code on GPUs, use the Metal framework instead.







OpenGL ES 2.0 model