Re: [Plib-users] dimensions of a texture?
Brought to you by:
sjbaker
From: Steve B. <sjb...@ai...> - 2001-10-19 22:45:54
|
Albin Holmgren wrote: > > Is there a way to get the dimensions of a texture stored in a ssgTexture? > > I want the height and width, in pixels, of a texturemap. You ask SSG for the OpenGL texture map handle (use ssgTexture::getHandle()), then you can use OpenGL to ask about the texture using glGetTexImage(...) > If not, is there a reson why this information, used when loading a texture, > is not stored? SSG doesn't store it directly because OpenGL does. > Another thing, has anyone done any atempt to modify the fnt library to load > truetype fonts? No - but you can use Mark Kilgard's mktexfont program to make TXF font textures from any font that X-windows can render - so I presume you could convert TrueType fonts into TXF and render them that way. If you were thinking of getting all the rescalability and general niceness of Truetype fonts then FNT isn't really the right library for you. Try GLTT. There are several problems with doing this in FNT: 1) Patent/copyright bullshit. The TrueType algorithms are patented and I don't want to get into that nonsense. 2) It's almost impossible to render TT fonts *efficiently* in OpenGL. GLTT does a reasonable job - but it's probably a hundred or more times slower than FNT. ----------------------------- Steve Baker ------------------------------- Mail : <sjb...@ai...> WorkMail: <sj...@li...> URLs : http://web2.airmail.net/sjbaker1 http://plib.sf.net http://tuxaqfh.sf.net http://tuxkart.sf.net http://prettypoly.sf.net http://freeglut.sf.net http://toobular.sf.net http://lodestone.sf.net |