lookitecno.blogg.se

Xojo database tutorial
Xojo database tutorial






xojo database tutorial

A display list is effectively an object that is created and stored in OpenGL's memory. One feature of OpenGL that saves CPU processing time, and thereby increases your frame rate, is display lists. There are plenty of ways to increase the rendering speed of your 3D scenes, when you make clever use of the features provided by OpenGL. All the polygons of a model use the same texture array to eliminate duplicate texture instances, and thereby improving memory usage. These texture indexes can be any value between 0 and m. In the following diagram, a, b and c are Integer values that point to textures stored in a global texture array. With this approach it is easy for multiple polygons to access the same texture. A texture can then be accessed in this global list by an index that is stored in the polygon. More than one polygon will usually use the same texture during texture mapping, so it makes sense to store a texture instance once in a global list, rather than storing a separate instance of the texture in each polygon. All the polygons of a model use the same vector array to eliminate duplicate vectors, and thereby improving memory usage. These vertex indexes can be any value between 0 and n. In the following diagram, a, b and c are Integer values that point to vectors stored in a global vector array. We now only have to store a vertex once, but can use it as many times as needed by using index pointers. Our polygon then simply stores an index that points to a vertex in this global list, instead of storing the vertex itself. To achieve the above explained reduction in memory usage, we need to change the architecture to store all the vertices used by the model in a global list. If you remember from the previous tutorials, each polygon stores its own list of vertices. Memory usage is now reduced to 192 bytes, a considerable saving of 77.78%. If we use a single vertex instance on each corner of the cube and shared it between polygons, rather than having six separate vertices, then the total number of vertices required to represent the cube is reduced to only eight vertices (see the green vertices). Some vertices occupies the same position in space and are really only duplicates of each other.

xojo database tutorial

Let's have another look at the cube model. You can imagine that with more detailed models, memory usage can quickly become a concern. The amount of memory required to store the vertex data of a simple cube is, therefore, 36*24=864 bytes. The total memory required to store a vertex is, therefore, 8*3=24 bytes. Each vertex consists of three double values (x, y and z). Each polygon requires three vertices that amounts to a total of 12*3=36 vertices. When we consider the cube model below, it is easy to determine that a basic cube with six faces (front, left, top, right, back and bottom), results in a total of 12 triangular polygons.








Xojo database tutorial