Hi everybody,
i am currently working on some kind of virtual texture implementation. The mipmap levels are used as a level of detail controlling structure. (Every texel in the virtual texture relates to a block of data in the 'real' texture.)
The data exists in several detail levels which result in different block counts in the virtual texture.
Example:
level size of data number of blocks
0 60 4
1 30 2
2 15 1
My idea was to call glTexImage for every detail level in the virtual texture to create the different mipmap levels.
The problem is that altough there are no errors when creating or updating/loading i can't get any data from the texture. Creating only the base level and calling glGenerateMipmap works fine but results in the wrong sizes for some base sizes. (technically they are correct, but not in my case)
I read somewhere that mipmap level sizes must be a division by two (or by two and floor).
The questions:
- Is it possible to load 'custom' mipmap levels?
- Are there any constrains mipmap level sizes?