Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (707)
Games in Android Showcase (208)
games submitted by our members
Games in WIP (781)
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 1598 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.

Galdo (522 views)
2017-01-12 13:44:09

Archive (677 views)
2017-01-02 05:31:41

0AndrewShepherd0 (1149 views)
2016-12-16 03:58:39

0AndrewShepherd0 (1071 views)
2016-12-15 21:50:57

Lunch (1199 views)
2016-12-06 16:01:40

ral0r2 (1435 views)
2016-11-23 16:08:26

ClaasJG (1529 views)
2016-11-10 17:36:32

CoffeeChemist (1486 views)
2016-11-05 00:46:53

jay4842 (1568 views)
2016-11-01 19:04:52

theagentd (1263 views)
2016-10-24 17:51:53
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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!