Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Davi

Pages: 1 2 [3]
31
Support / Re: why my texture can't show on md2 model?
« on: October 28, 2011, 10:25:57 am »
can you see that log

[attachment deleted by admin]

32
Support / why my texture can't show on md2 model?
« on: October 28, 2011, 04:34:20 am »
public void onSurfaceCreated(GL10 gl, EGLConfig config) {

      world = new World(); 
      world.setAmbientLight(150, 150, 150);   
      TextureManager.getInstance().addTexture("tris3", new Texture(BitmapFactory.decodeResource(this.getResources(), R.drawable.tris3))); 
      snork = Loader.loadMD2(LoadAssets.loadf("tris3.md2"), scale); 
      snork.setTexture("tris3");
      snork.strip(); 
      snork.build(); 
      world.addObject(snork);
}
public void onSurfaceChanged(GL10 gl, int width, int height) {
      if (fb != null) { 
         fb = null; 
      } 

      this.width=width;
      this.height=height;
      fb = new FrameBuffer(gl,width, height); 
}
onDrawFrame(GL10 gl) {
      doAnim(); 
      world.renderScene(fb);
      world.draw(fb);
      fb.display();
}
above is my key code to show texture,the md2 model loading is ok,but the texture can't show on the model,I don't know what wrong is?
Please help me ?

33
Support / why I can't rotate my md2 model?
« on: October 28, 2011, 03:57:56 am »
before use world.addObject(md2); I want to let my model rotate 90 angle,
I use md2.rotateX(90);
or
   
Matrix ma=new Matrix();
      ma.rotateX(90);
      ma.rotateY(90);
      ma.rotateZ(90);
        snork.setRotationMatrix(ma);

 But why it can't work???

Pages: 1 2 [3]