These procedures can be used to load 2D texture data. Note that these, too, should only be called when an OpenGL context is active!
These procedures all load the alpha (transparancy) values as premultiplied alpha. Since this is the only form of alpha blending which leads to correct results in all cases, no effort has been made to support other forms of alpha blending.
(glBlendFunc GL_ONE GL_ONE_MINUS_SRC_ALPHA) (glEnable GL_BLEND)
Note that some (older) OpenGL implementations may restrict textures to sizes which are powers of two.
→ exact-nonnegative->integer? bm : (is-a?/c bitmap%) mipmap : any/c = #t repeat-mode : (one-of/c 'none 'x 'y 'both) = 'none
The parameter mipmap (interpreted as a boolean) controls whether or not mipmapping is done. Mipmapping is a technique to avoid aliasing when an image is scaled down. If you are sure that your image will never be scaled down, you can save a small amount of memory and runtime by setting this parameter to #f.
The repeat-mode controls what happens if you use texture coordinates outside the range between 0 and 1. The parameter controls whether or not the image is repeated (tiled), and if it is repeated, it defines along which of the specified axes (x, y, or both) the image is to be repeated.
The parameters mipmap and repeat-mode have the same meaning as with bitmap->texture.