PDA

View Full Version : question about textures



11-30-2003, 04:55 PM
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?

mikael_aronsson
11-30-2003, 11:08 PM
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).]

12-01-2003, 01:35 PM
Originally posted by mikael_aronsson:
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).]

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

mikael_aronsson
12-01-2003, 11:04 PM
No, there is no way to let OpenGL compare textures for you.

Mikael