From: Alban C. <aco...@wa...> - 2002-07-02 12:02:56
|
>I am trying to load some VRML files that already exist. But the image >sizes that come with it are all weird size (123x843 or whatever) > >I can't load them unless they are the same size horizontally and >vertically. Is this normal? I was expecting that I could either >load any size or only load 64x64, 128x128, 256x256, 512x512... ect.... > >Or should I open the pngTextureLoader and adding the support? > >Or has anyone created a Graphic Texture Loader? (anythign inside a >standard Graphic can be loaded)... So you create a graphic of the size you >want and paste the image. This might be a cool addition so that you could >create a texture using AWT and standard components. > >thanks I personnaly have no problem loading non squared images using pngTextureLoader. pngTextureLoader DOES automatically resize maps loaded within the method readTexture() so they are forwarded to OpenGL as squared length. So if you are using another class than pngLoader to load your texture, you should make sure they are squared. If your class is a subclass of gl4java.utils.TextureTool you can use the method setTextureSize() (wich is called inside pngLoader.readTexture()) to obtain a squared texture. If you are using the pngTextureLoader.readTexture() method, I have no clue of what's going wrong. To my knowledge, nobody ever created a graphic texture loader. |