Hi !
Featured games (87)
games approved by the League of Dukes
Games in Showcase (670)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (727)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [Need Help]Java3D mipmap problem!  (Read 1480 times)
0 Members and 1 Guest are viewing this topic.
Offline jiahan

Junior Newbie

Java games rock!

« Posted 2005-03-23 14:03:44 »

When I use mipmap mode in Texture component, I will get following error message..

The code(I use setInterleavedVertexBuffer(J3DBuffer) to set geometry's vertex data):-----------------------------------------
Appearance a = new Appearance();
       Material m = new Material(new Color3f(0.6f,0.6f,0.6f), new Color3f(0,0,0),
               new Color3f(1,1,1), new Color3f(0.8f,0.8f,0.8f),32);
       TextureLoader loader = new TextureLoader(image,"RGBA",
               TextureLoader.BY_REFERENCE|TextureLoader.GENERATE_MIPMAP, null);
       ImageComponent2D tImage = loader.getImage();
       int textureSize =
               RenderingCapabilityManager.getTextureSize(new Dimension(tImage.getWidth(),
       Dimension size = new Dimension(textureSize, textureSize);
       Shape3D shape = new Shape3D(this.createPlane(v), a);
       Texture2D texture =
               new Texture2D(RenderingCapabilityManager.getMipMapMode(),
               Texture.RGBA,size.width, size.height);
       int imageLevel =0;
       boolean mipMode =
       TextureAttributes ta = new TextureAttributes();
       TextureUnitState[] tus = new TextureUnitState[1];
       tus[0] =  new TextureUnitState(texture, ta, null);
       PolygonAttributes pa =
               new PolygonAttributes(PolygonAttributes.POLYGON_FILL,
               PolygonAttributes.CULL_NONE, 0, true);
       TransparencyAttributes tta = new TransparencyAttributes(TransparencyAttributes.NICEST, 1f);
       pa.setUserData(false);//don't modify PolygonAttributes
           tImage = loader.getScaledImage(size.width, size.height);
           texture.setImage(imageLevel++, tImage);
           size.width >>=1;
           size.height >>=1;
       }while(size.width>1 && size.height >1 &&
But if I did't use mipmap mode, use baselevel mode, every thing is working fine..
I do't know why...Is everyone can help me~

My JDK is 1.5,Java3D API is 1.3.1(OpenGl) and video card is Geforce6800 Ultra
Offline misterX

Junior Devvie

java forever!

« Reply #1 - Posted 2005-03-30 16:26:06 »

is your texture size a power of 2?
(if not, that may be the source of the error)
Offline jiahan

Junior Newbie

Java games rock!

« Reply #2 - Posted 2005-03-31 01:33:53 »

Yes, my texture is power of 2, and if I use beas level model, it's all working fine....
Does everyone know why? Huh
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline shawnkendall

Senior Devvie

« Reply #3 - Posted 2006-04-25 16:51:40 »

DId you ever resolve this error?

I am getting it all of a sudden too.

Thanks for any help!

Shawn Kendall
Cosmic Interactive, LLC
Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

IanParcs (36 views)
2016-04-18 14:18:53

KaiHH (36 views)
2016-04-18 08:35:41

KaiHH (67 views)
2016-04-15 12:43:58

theagentd (67 views)
2016-04-14 02:16:17

theagentd (74 views)
2016-04-14 02:15:43

IanParcs (67 views)
2016-04-12 03:51:16

IanParcs (37 views)
2016-04-12 03:50:03

IanParcs (33 views)
2016-04-12 03:49:54

IanParcs (30 views)
2016-04-12 03:49:52

IanParcs (38 views)
2016-04-12 03:49:52
Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50

Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!