Re: texture problem

New Message Reply Date view Thread view Subject view Author view

From: Bryan Housel (bryan++at++openworlds.com)
Date: 03/21/2001 07:26:22


> the textures to be applied. I know the names of those geodes, but how
> can i apply the textures to them ? Can i use the pfNode::find(char*,
> pfType*) function ? but what pfType is a geode ? i can't find anything
> useful on pfType in the programmer's guide.

The proper way to make the call is:

pfGeode* mynode =
   (pfGeode*) root->find("mynode", pfGeode::getClassType());

(it's all on the pfNode manpage)..

> Also, is it possible to use .gif, .jpg or .tif as textures ?

As far as i know, you need to either write your own code to import these
kinds of textures, or use a separate library to do this..

SGI's IFL library will let you import them.. but if you need to actually
SCALE them to be square, you'll need sgi's IL library.. :(
http://www.sgi.com/software/imagevision/

we ended up just writing our own code to do it.. there's plenty of
sample code on the internet showing how to use the various libjpeg,
libtiff, etc. libs..

or if you're in a hurry, make a system() call that runs an imgcopy
command to turn your image into a square .rgb file.. hehe.

Bryan

-- 
OpenWorlds VRML C++ toolkit                 http://www.openworlds.com


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Wed Mar 21 2001 - 07:43:34 PST

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.