VOGONS

Common searches


Problem with Tomb Raider

Topic actions

Reply 20 of 52, by Glidos

User metadata
Rank l33t
Rank
l33t

clamping: Brilliant. I understand now. I hadn't even realised there was two difference types of clamp. I'll push through the changes soon.

mipmapping: I still don't understand. The mipmaps are being generated, otherwise where would the smoothing you see come from.

Reply 21 of 52, by Markus

User metadata

No, I just tried to explain, how it looked like before the patch. After patching everything is perfect and mipmapping really works.
But I just noticed, that you have to disable VertexArrays, it's broken with alphatransparent textures, but it's not related to the mipmapping problem.

Maybe there are others, who want to give it a try, so I've attached my glide2x.dll.
Change openglide.ini to contain:
EnableMipMaps=1
EnableVertexArrayEXT=0

Attachments

  • Filename
    Glide2x.zip
    File size
    88.04 KiB
    Downloads
    155 downloads
    File license
    Fair use/fair dealing exception

Reply 22 of 52, by Glidos

User metadata
Rank l33t
Rank
l33t

Any feel for what is going on? Now you've explained the clamp issue, it seems perfectly clear what was wrong and why your patch fixes it. But the mipmap thing still confuses the hell out of me.

Reply 24 of 52, by Markus

User metadata

According to http://www.mevis.de/~uwe/opengl/glTexParameter.html TEXTURE_MIN_FILTER has to be set to one of GL_NEAREST_MIPMAP_NEAREST,
GL_LINEAR_MIPMAP_NEAREST,
GL_NEAREST_MIPMAP_LINEAR or
GL_LINEAR_MIPMAP_LINEAR in order to use mipmaps at all.

The original openglide code used GL_LINEAR and then set GL_GENERATE_MIPMAP_SGIS to true, it's almost like saying, don't use mipmaps, but generate 'em.
I think the correct behaviour of the opengl subsys in this case should be linear scaling of textures when minimizing, but not using any mips, Atis gl-implementation seems to run amok in this case, generating some mips, forgetting about others and producing random garbage.
I don't know, what nvidia is doing here, if they're generating mipmaps or use linear filtering, but under http://developer.nvidia.com/attach/1365 there's an example, how to do it:

glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_NEAREST );
glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, GL_TRUE );

But after reading some more of glTexParameter.html, I think the following:

glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );

if( use_mipmap_ext )
{
glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, true );
}

should be changed to:

glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );

if( use_mipmap_ext )
{
glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR)
glTexParameteri( GL_TEXTURE_2D, GL_GENERATE_MIPMAP_SGIS, true );
}
else glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

Reply 26 of 52, by Guest

User metadata

I agree with you that GL_Linear should work but with no mipmaps. Very strange that ATI and nVidia should have a similar problem in causing texture drop out. Also strange that old nVidia drivers would do mipmapping with the GL_Linear setting.

Another thing worth mentioning: the use of GL_Generate_Mipmaps_SGIS doesn't happen for palettised textures, and that's what TR1 uses (when not doing texture override). For palettised texures the mipmaps are generated explicitly by OpenGlide.

In any case GL_Linear_Mipmap_Linear is, I think, what should be used.

Reply 27 of 52, by ableeker

User metadata
Rank Newbie
Rank
Newbie

Markus,

Very interesting stuff! You sure sound like you know what you're doing, so I've tried out your Glide2x.dll, but when I start TR1, I get a white screen and an error message (nothing specific, just glide2x.dll has caused an error). Glidos then closes down with the message Read Failure.

From this discussion I'm assuming your Glide2x.dll is a drop-in replacement for the one from (most likely) Openglide 0.09rc6, so I just copied it to the Glidos folder, but this crashes Glidos. Am I using the right version? I'm asking, because your version is (slightly) more than 100 Kb bigger than the old one!

It's a shame, I really wanted to see the difference. My computer: AMD Athlon 1.33 GHz, Windows XP Pro SP1, Glidos 1.26, Ati Radeon 9600 Pro. Could you please provide me with some tips on how to get your Glide2x.dll running?

Aldo Bleeker

Reply 28 of 52, by Guest

User metadata

I can see what's going on now. OpenGlide was setting GL_Linear at first, then defining the texture, and then setting GL_Linear_Mipmap_Linear. Presumably the latest drivers are relying on the correct value being set before the textures is defined.

Anyway, both these changes make perfect sense now, so we can take them on.

Reply 29 of 52, by Markus

User metadata

@Aldo
You're right, it's Openglide 0.09rc6, latest cvs version and the dll has to be in the glidos directory.
My dll is bigger because I used Visual C++ .net 2003 to compile it with every optimization feature turned on and I think this breaks it for you, I should've chosen more conservative settings before posting.
But it's also possible, that it's related to VC's runtime...

@Guest

Another thing worth mentioning: the use of GL_Generate_Mipmaps_SGIS doesn't happen for palettised textures, and that's what TR1 uses (when not doing texture override). For palettised texures the mipmaps are generated explicitly by OpenGlide.

I didn't dive too deep into the code, but that would explain, why some textures showed right with the old code (must've been 8bit then) and some not.

Reply 30 of 52, by Glidos

User metadata
Rank l33t
Rank
l33t

Try this one, don't distribute it widely, because it confuses bug reports if they are based on non-release versions.

Also note that first time you use it, it will throw away yout OpenGLid.INI and replace it with a default one. Then you can make your own alterations to the ini file.

Attachments

  • Filename
    Glide2x.zip
    File size
    34.05 KiB
    Downloads
    155 downloads
    File comment
    OpenGLide - experimental version
    File license
    Fair use/fair dealing exception

Reply 31 of 52, by ableeker

User metadata
Rank Newbie
Rank
Newbie

Thanks, Paul! I've tried your version, and this one works, I can start and play TR1 without crashing. I will try out the old and this new version, and see if I can spot any differences, but it seems that I can use EnableMipMaps=1 without flashing textures.

Reply 33 of 52, by artie150

User metadata

I tried both glide versions posted above and find that the one posted by Marcus on 3/30 - 6:11 PM works perfectly for my setup. I have an ATI 9700 with the latest 4.3 drivers, and Windows XP.
The other glide files seemed to make the action "choppy"-not smooth, and the FMV,s run much better with that file.
Thanks to you both for your great efforts.
Can it get better?-I dought it!!
By the way I am also using the TRX textures, also a great addition as it was in V 1.25.
[/img]

Reply 35 of 52, by Markus

User metadata
Rank Newbie
Rank
Newbie

Just when I thought it was fine...

Artie, what's the processor you're using? And how's glidos working with it's official accompanying glide2x.dll? Is it working smooth or choppy? Maybe it's just my additional optimization (/G7 /arch:SSE2) that gave the neccessary speed for you, but prevented ableeker from running it on his AMD.

Paul, you might want to check, if we were both using the same version of openglide, I checked out the cvs an march, 29th, here's my CVS/Entries, I didn't change anything else beside what I told you and I presume, you didn't either, did you?

Attachments

  • Filename
    Entries.txt
    File size
    2.03 KiB
    Downloads
    170 downloads
    File license
    Fair use/fair dealing exception

Reply 36 of 52, by Glidos

User metadata
Rank l33t
Rank
l33t

Could be that optimisation. That sort of makes sense, but we'd need to verify it. March 29th would have been identical to the version I was using.

For mipmapping, I didn't make exactly the same changes as you. The thing *was*, it was setting GL_LINEAR_MIPMAP_LINEAR, if appropriate, after defining the texture. It was just that it was setting GL_LINEAR before defining the texture. I've copied the code from after texture definition to the point before.

The tests do need rerunning in any case, because there could have been other issues like a virus checker doing a scan during one test but not the other.

Reply 37 of 52, by artie150

User metadata

Markus- I am using the Intel 3.06 P4. The big change I got was when Sys wrote his comments about his Openglide.ini file and added EnableMMX=1.
That cured the missing texture issue.
However guys I am NOT a programmer so adding these little bits and pieces of text to my .ini files is all new to me.
The only glitch I noticed with the .dll file I referred to was that when you hit the escape key during the game the actual game screen is in the upper left hand portion of the screen but the down arrows which ask you to go to another option are full size.
Another glitch I noticed with Pauls .dll file was that sometimes when starting a game I would get a kind of "overhead shot" of Lara on the first level, and when I hit the escape key the next screen would come out completely garbled-video wise but the text on the bottom was OK.
I now have three Glide2xx.dll files to play with.
If you can tell me how I can distiguish between the three I would be happy to be of assistance.
You can attach them to your reply so that maybe I can sort them out.
Like I said I am not a programmer so all this languge You and Paul are talking about is Greek to me.This is my present Openglide.ini file-
Configuration File for OpenGLide

Info:
Priority goes from 0(HIGH) to 5(IDLE)
Texture Memory goes from 2 to 32
Frame Buffer Memory goes from 2 to 16
All other fields are boolean with 1(TRUE) and 0(FALSE)

Version=0.09rc6

[Options]
WrapperPriority=2
EnableMMX=1
CreateWindow=0
InitFullScreen=0
EnableMipMaps=0
IgnorePaletteChange=0
Wrap565to5551=1
EnablePrecisionFix=1
EnableMultiTextureEXT=1
EnablePaletteEXT=1
EnableVertexArrayEXT=0
TextureMemorySize=16
FrameBufferMemorySize=8

If this helps let me know.

Reply 38 of 52, by ableeker

User metadata
Rank Newbie
Rank
Newbie

I've just tried running Markus' Glide2x.dll again, this time on a fresh new Windows XP, with .Net Framework 1.1 installed. Nothing was running, I even disabled the antivirus scanner. This partition is just a few weeks old, and is only used for testing purposes (I'm beta testing SP2 for Microsoft). I'm hoping this doesn't make a difference, but this is also why this XP hasn't SP1 installed, but SP2 RC1.

I've unlocked Glidos on this partition, just in case. (Sorry about that, Paul! I'll let you know if I run out of keys. Again.) Anyway, all this didn't make much of a difference, the results were the same: Paul's Glide2x.dll works, Markus' Glide2x.dll crashes.

It could be the processor (Athlon 1.33 GHz), maybe it doesn't handle Markus' optimizations all that well. The runtime files thing seems a bit doubtful to me, not only have I Framework installed (on both partitons), but on my work partition I also Studio .Net 2003 installed, just like Markus. (I am a programmer, I just haven't programmed in C++, or C#, only VB.)

Apart from this, I've noticed no ill effects when running the new Glide2x.dll with EnableMipmaps=1. TR1 seems to run smoothly, not choppy, like Artie150 noticed. The sound is sometimes a bit laggy, but that might be a problem with VDMSound.

BTW, I just noticed an OpenGlide 0.09 RC7 on Sourceforge. Coincidence? I think not!

Aldo Bleeker

Reply 39 of 52, by ableeker

User metadata
Rank Newbie
Rank
Newbie

Paul, I'm assuming the new OpenGlide RC7 includes Markus' fixes, right?

BTW, is there documentation available on OpenGlide, or OpenGlide.ini? Artie150 mentions EnableMMX=1. I didn't know this option even existed.

Aldo Bleeker