Image bm785.GIF 2D Picture
Create
 
The 2D picture element will create a picture object on the 3D window surface. The picture to be created is entered as the element's parameter. The picture is used as a common texture. Its size, therefore, should be a power of 2. The actual texture smoothing will assert itself.
 
For the picture object other rules are valid than for usual 3D objects. The picture's Y coordinate (vertical) ranges between -0,5 (below) and 0.5 (above), the X coordinate (horizontal) ranges between -0,5 (left) and 0.5 (right). The Z coordinate is not operative. Its value can be utilized in depth sorting of objects. When picture overlapping must be specified, it is more suitable to do so by setting the object's render group. The new picture object is assigned to render group 14. Pictures having a lower render group are drawn under this picture, pictures having a higher group overlap this picture. The depth writing and depth test operations of a picture are normally switched off.
 
The default scale of the picture object is determined by the picture dimensions. The default of the scale is set for the picture to be displayed undistorted. The picture object horizontal scale is set to object_X_scale = picture_real_width / 3D_window_real_width, vertical scale is set to object_Y_scale = picture_real_height / 3D_window_real_height. When changing the 3D window size the picture scale will remain unchanged. The picture will not be adapted to the new 3D window size.
 
The last transformation parameter asserting itself in a picture object, is the rotation around the Z axis. Thus it is made possible to rotate the picture object around its center.
 
For the picture object the contours parameter is automatically set to 0.5. The element returns the identification number of the created 2D picture.
 
The object of a 2D picture can also serve to display a usual 2D graphics from the graphics surface. Onto the graphics surface of the Peter application usual graphics outputs can be effectuated (the graphics surface need not be displayed). A picture can be picked up from the graphics surface and then it can be used as a new texture for the 2D picture object. Thus, for example, a  text can be displayed. It is recommended to minimize the change frequency of the 2D graphics; a frequent generating new textures reduces the 3D graphics speed considerably.

Full Html Context Help of The Peter - Gemtree Software & Children Programming