PDA

View Full Version : Texturing



KShots
10-14-2002, 04:13 PM
Hello, I'm working on some interesting new ideas in OpenGL with a graphic artist friend, and at this moment I have some very complex meshes up along with a texture map already provided... the trick I'm running into is how to tell OpenGL exactly how to deal with this. Can anyone either give me a step-by-step or point me to one? I'm using glTexCoord2fv in this case as from what I've looked at this seems to be the best method. I believe I need to know:

1. What initialization I need to be doing and where

2. A way of loading a .tif file into memory appropriately (This is the texture)

Any help and/or ideas would be welcomed http://www.opengl.org/discussion_boards/ubb/wink.gif

nexusone
10-14-2002, 04:21 PM
There is a graphics library out there that supports a lot of diffrent file formats, but I don't know if tif is one of them.

But you could also just convert the tif to a tga format. Most good paint programs support saving TGA format.


Originally posted by KShots:
Hello, I'm working on some interesting new ideas in OpenGL with a graphic artist friend, and at this moment I have some very complex meshes up along with a texture map already provided... the trick I'm running into is how to tell OpenGL exactly how to deal with this. Can anyone either give me a step-by-step or point me to one? I'm using glTexCoord2fv in this case as from what I've looked at this seems to be the best method. I believe I need to know:

1. What initialization I need to be doing and where

2. A way of loading a .tif file into memory appropriately (This is the texture)

Any help and/or ideas would be welcomed http://www.opengl.org/discussion_boards/ubb/wink.gif

vivekgupta
10-14-2002, 06:05 PM
Hi,
I am sorry this is no reply to ur question, but since one of ur problems is quiet similar to what I have, I just wanted to know that did u find any way to upload the .tif file. Because, I am myself looking for the same thing. If u have, plz hlp ,me too.
Thankx

lockng
10-15-2002, 01:55 PM
Are you using Windows OS? if you are then go to msdn.microsoft.com search for gdiplus. This is a new graphics lib for WinXP [redistributed version is availble for other Win OS]

This is an object oriented [C++] lib. Image class works with .tiff, jpeg, png, gif, bmp...

After open the image, you can easily get the bits out of the image then feed the bits [pixels] to any program.

zeckensack
10-15-2002, 02:17 PM
Originally posted by lockng:
Are you using Windows OS? if you are then go to msdn.microsoft.com search for gdiplus. This is a new graphics lib for WinXP [redistributed version is availble for other Win OS]

...That's probably the worst way imaginable to handle this.

Just convert that tif to a sane format now, instead of bugging users with yet another dubious OS 'extension'.

KShots
10-15-2002, 03:12 PM
As this code stands now, it compiles on both Linux and Windows machines...I'd like to keep it that way if at all possible.

So OK, I can convert the images...I intend to output everything I get into a combined binary file anyways so format doesn't matter much so long as it is interpretted correctly.

So with that in mind, how would I go about doing this with a .tga file or <stick your favorite type here>?