Originally posted by GoldFinger
Hey,
I found some strange things and I would like you to answer me:
function grTexDownloadMipMa […]
Show full quote
Originally posted by GoldFinger
Hey,
I found some strange things and I would like you to answer me:
function grTexDownloadMipMapLevel
calls Textures->DownloadMipMap that then calls
int size = TextureMemRequired( evenOdd, info );
this does not seem right as it will calculate teh space necessary for all mipmaps and we are only downloading 1 of them, changing that to
made Unreal not crash anymore.
int size = MipMapMemRequired( info->smallLod, info->aspectRatio, info->format );
The problem with Unreal is the Window handling as we do not create a window anymore.
Please answer me soon and I would like you to test this new build with other games as RB3D and others.
I'd expect to have introduced a few bugs, especially in this area because I had to completely rewrite the Texture class so that it created OpenGL textures only when definitely needed and destroyed them when no longer needed. I introduced a completely new way of handling textures there, pulling all the palette stuff into one place. However, I have not connected all the Glide calls through to this class properly.
The solution: the current version (and, I believe, the original from which I started) does not use the client games mipmap levels below the main one. Hence grTexDownloadMipMapLevelshould do nothing unless thisLod == largeLod, and in that case it should do the same as grTexDownloadMipMap. Just adding
if(thisLod != largeLod)
return;
should fix it. I have done this in Glidos (naughty, I should have pushed the bug correction down into OpenGLide) for Dreams of Reality which the only game I have that calls grTexDownloadMipMapLevel, and that works fine now.
UPDATE!!!! […]
Show full quote
UPDATE!!!!
Well, the previous code seems right, but the problem is there and it is exactly in this part of the code, strange... 😀
I am still looking at it and anyway I found that this code is not too good, I found some strange thing in it anyway.
I will think about it and maybe we can solve several bugs... 😀
I'm going to be away for three days, but I should have web access. I'll try to help you with this. We should keep the discussions going until we are sure we have the right solution.