colorlkp.blogg.se

Xojo database tutorial
Xojo database tutorial








Add the following code to the SurfaceWindow.Paint event handler:Ĩ. Position and size Surface to fill the whole window, and set its locking to left, top, bottom and right.ħ. Enter "Tutorial011" as the Application Name, and click OK.Ħ. Using the above coordinate system as a reference, we can now easily map a texture, or part thereof, to a polygon as shown below.Ģ. The diagram below illustrates the UV-coordinate system, or UV Map, that we use when mapping texture bitmaps to polygons. The image below illustrates how the coordinates of a texture bitmap might be matched with the vertices of polygons. OpenGL will automatically handle the drawing of the texture onto the polygon. We simply need to match the coordinates on a texture bitmap to the vertices of a polygon. The mapping of texture bitmaps onto polygons is a very straightforward process. Power-of-two dimensions ensure backward compatibility with older hardware and in certain cases improve the rendering speed.

xojo database tutorial

It is best practice to ensure that the dimensions of your textures are power-of-two (e.g. PNG supports loss-less data compression (high quality images) and has full alpha channel support (transparency). The PNG file format is the recommended format for storing texture bitmaps. Consider the following image that could potentially be used as a texture bitmap. Texture mapping is a technique used to "paint" an image, or part thereof, onto a polygon.










Xojo database tutorial