Cool~ Would you like to share it when you done? This will give others(include me ) a lot of help.
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.
Show posts Menu
//first use 1 texture
car.setTexture("car_1");
//after a while, use 2 to blending
int id = TextureManager.getInstance().getTextureID("car_1");
int id2 = TextureManager.getInstance().getTextureID("car_2");
TextureInfo info = new TextureInfo(id);
info.add(id2, TextureInfo.MODE_MODULATE);
car.setTexture(info);
GLSLShader.setShaderLocator(new ShaderLocator(getAssets()));
12-12 14:40:07.394: W/dalvikvm(10293): threadid=15: thread exiting with uncaught exception (group=0x41578930)
12-12 14:40:07.416: W/System.err(10293): java.lang.RuntimeException: [ 1386830407375 ] - ERROR: before: glError 1280
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.Logger.log(Logger.java:193)
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.GL20.checkError(GL20.java:147)
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.GL20.glGenBuffers(GL20.java:1354)
12-12 14:40:07.416: W/System.err(10293): at com.threed.jpct.CompiledInstanceFP.compileToVBO(CompiledInstanceFP.java:1199)
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.CompiledInstanceFP.render(CompiledInstanceFP.java:74)
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.GLRenderer.drawVertexArray(GLRenderer.java:2211)
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.World.draw(World.java:1351)
12-12 14:40:07.417: W/System.err(10293): at com.threed.jpct.World.draw(World.java:1091)
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.renderWorld(GameRenderer.java:596)
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.handleGameRender(GameRenderer.java:516)
12-12 14:40:07.417: W/System.err(10293): at com.zwenyu.woo3d.components.GameRenderer.onDrawFrame(GameRenderer.java:171)
12-12 14:40:07.418: W/System.err(10293): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1516)
12-12 14:40:07.418: W/System.err(10293): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1240)
Texture t = new NPOTTexture(w, h);
frameBuffer.resize(w, h);
renderToTarget();
frameBuffer.resize(oldW, oldH);
framBuffer.blit(t);
private void init(){
mTexture = new Texture(256, 128);
mTexture.setMipmap(false);
TextureManager.getInstance().addTexture("rt", mTexture);
}
private void update(World world, FrameBuffer frameBuffer){
int screenWidth = 800;
int screenHeight = 480;
//first rendering
world.renderScene(frameBuffer);
world.draw(frameBuffer);
//second rendering
frameBuffer.setRenderTarget(mTexture);
world.renderScene(frameBuffer);
world.draw(frameBuffer);
frameBuffer.blit(mTexture, 0, 0, 0, 0, screenWidth/4, screenHeight/4, false);
frameBuffer.removeRenderTarget();
}
Page created in 0.034 seconds with 12 queries.