level is the mipmap level you intend to upload. If you say 0, you will upload the main texture. If you say 1, you will upload the first mipmap level of the texture. 2 is the second mipmap level and so on.
If you want to upload the second mipmap level, you must scale your image downwards by 4 (manually, and 4 is 2^n where n=2 for second mipmap level) before uploading the texture.
Yeah, and if you create one mipmap level, you need to create them all… all the way down to 1x1. This can be changed by some functions, dunno name, but it has something to to with BIAS_LOD.
but how does q3 control it?
i dun c any multi version of textures in it’s pk3 files…
it’s all single texture
den r_picmip controls da quality/detail of texture.
Well, the scaling is done by Q3. It loads the main texture and uploads it, then, in system memory, it scales the image downwards and uploads the first mipmap level. When this is done, the image is scaled once more, and uplaoded as second mipmap level. This procedure is done untill all levels has been done.
And concerning texture quality/detail, thats another thing. If you want lower quality/detail (faster texturmapping), you just choose another internal texture format, with less bits per colorelement. A R5G5B5-texture (5 bits for each colorelement) is faster, but also less detailed/less quality compared to a R8G8B8-texture (8 bits per colorelement). The last version occupies more memory and is slower, but looks nicer.