question about textures

How do I load a texture from a .jpg or .bmp image? And how can I compare that two textures I have loaded (assume same dimensions) are equal? Is there any hardware acceleration for texture comparison?

There are lots of libraries to load jpeg files, check out this forums archive and google.

Why do you need to compare the textures ? if you do it when they are loaded you could just do memcmp, otherwise I don’t know.

Mikael

[This message has been edited by mikael_aronsson (edited 12-01-2003).]

Originally posted by mikael_aronsson:
[b]There are lots of libraries to load jpeg files, check out this forums archive and google.

Why do you need to compare the textures ? if you do it when they are loaded you could just do memcmp, otherwise I don’t know.

Mikael

[This message has been edited by mikael_aronsson (edited 12-01-2003).][/b]

memcmp is far too slow in comparison with a possible hardware acceleration. And if I want to find if a texture is part of another I have to do multiple memcmp in software level. If it could be done in hardware these compares are cheap

No, there is no way to let OpenGL compare textures for you.

Mikael