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 - AGP

Pages: 1 2 3 [4] 5 6 ... 102
46
Support / Re: Only thing rendered is the SkyBox
« on: June 23, 2017, 07:41:41 pm »
Please do think about it.

Have you checked Skybox?

47
Support / Re: Only thing rendered is the SkyBox
« on: June 22, 2017, 04:13:05 am »
I can't because I have the world's first self-healing code. I'm getting the two views now. But the SkyBox doesn't work. Any chance you could have a look at it  for me? Just add a SkyBox to your example and see it not appear at all. Also, any chance for a FrameBuffer3D for simplifying this?

48
Support / Re: Only thing rendered is the SkyBox
« on: June 20, 2017, 12:03:26 am »
I did just now (I moved it below the blits and just before the actual renderScene and draw calls). Still crashes on setRenderTarget(target1).

49
Support / Re: Only thing rendered is the SkyBox
« on: June 19, 2017, 10:31:37 pm »
It's just like yours:

Code: [Select]
    public void onDrawFrame(GL10 gl) {
        activity.loopIteration();
        if (this.hasToCreateBuffer) {
            hasToCreateBuffer = false;
            activity.buffer = new FrameBuffer(w, h);
        }
        activity.buffer.clear(Color.BLUE);
        skyBox.render(activity.theWorld, activity.buffer);

        // Render into first target
        activity.buffer.setRenderTarget(activity.target1);
        activity.buffer.clear(RGBColor.BLUE);
        activity.theWorld.getCamera().moveCamera(Camera.CAMERA_MOVERIGHT, -5);
        activity.theWorld.renderScene(activity.buffer);
        activity.theWorld.draw(activity.buffer);
        activity.buffer.display();
        activity.theWorld.getCamera().moveCamera(Camera.CAMERA_MOVERIGHT, 5);
        activity.buffer.removeRenderTarget();
        // Render into second target
        activity.buffer.setRenderTarget(activity.target2);
        activity.buffer.clear(RGBColor.BLUE);
        activity.theWorld.getCamera().moveCamera(Camera.CAMERA_MOVERIGHT, 5);
        activity.theWorld.renderScene(activity.buffer);
        activity.theWorld.draw(activity.buffer);
        activity.buffer.display();
        activity.theWorld.getCamera().moveCamera(Camera.CAMERA_MOVERIGHT, -5);
        activity.buffer.removeRenderTarget();

        activity.theWorld.renderScene(activity.buffer);
        activity.theWorld.draw(activity.buffer);
        activity.buffer.blit(activity.target1, 0, 0, 0, activity.buffer.getHeight(), activity.target1.getWidth(), activity.target1.getHeight(), activity.buffer.getWidth() / 2, -activity.buffer.getHeight(), -1, false);
        activity.buffer.blit(activity.target2, 0, 0, activity.buffer.getWidth() / 2, activity.buffer.getHeight(), activity.target1.getWidth(), activity.target1.getHeight(), activity.buffer.getWidth() / 2, -activity.buffer.getHeight(), -1, false);
        activity.buffer.display();
     }

50
Support / Re: Only thing rendered is the SkyBox
« on: June 19, 2017, 11:30:54 am »
In onDrawFrame at buffer.setRenderTarget(target1);

Everything is initialized properly (and it's not a NullPointerException).

51
Support / Re: Only thing rendered is the SkyBox
« on: June 19, 2017, 10:28:00 am »
Yup:
Quote
06-19 09:25:42.881 30009-30159/ratto.co.vr_one E/AndroidRuntime: FATAL EXCEPTION: GLThread 2267
                                                                 Process: ratto.co.vr_one, PID: 30009
                                                                 java.lang.RuntimeException: [ 1497860742879 ] - ERROR: FrameBuffer: 1 has caused a GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT exception
                                                                     at com.threed.jpct.Logger.log(Logger.java:206)
                                                                     at com.threed.jpct.GL20.checkFrameBufferObject(GL20.java:2101)
                                                                     at com.threed.jpct.GL20.setRenderTarget(GL20.java:2061)
                                                                     at com.threed.jpct.GLRenderer.setRenderTarget(GLRenderer.java:2146)
                                                                     at com.threed.jpct.FrameBuffer.setRenderTarget(FrameBuffer.java:287)
                                                                     at com.threed.jpct.FrameBuffer.setRenderTarget(FrameBuffer.java:249)
                                                                     at co.ratto.vr_one.MyRenderer.onDrawFrame(MyRenderer.java:145)
                                                                     at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1649)
                                                                     at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1354)
06-19 09:25:42.901 30009-30009/ratto.co.vr_one I/System.out: Gyro. Values: 0.0010652645, 0.0010652645, 0.0010652645
06-19 09:25:42.921 30009-30009/ratto.co.vr_one D/SensorManager: unregisterListener ::   
06-19 09:25:43.321 30009-30009/ratto.co.vr_one D/ViewRootImpl: #3 mView = null

52
Support / Re: Hardware renderer frame
« on: June 19, 2017, 04:45:18 am »
I'm sure that getting the output buffer is not the best way to do what you're trying to do, but FrameBuffer.getOutputBuffer will give you the rendered image (although the docs claim that it will be slow for OpenGL).

53
Support / Re: Only thing rendered is the SkyBox
« on: June 18, 2017, 09:38:49 pm »
What do you think is causing setRenderTarget to crash?

Also, have you thought about a FrameBuffer3D for this very purpose?

54
Support / Re: Only thing rendered is the SkyBox
« on: June 17, 2017, 10:42:56 pm »
And actually, what's crashing (I just saw because logcat acts up too much) is the very first call to setRenderTarget. And the targets aren't null or anything.

55
Support / Re: Only thing rendered is the SkyBox
« on: June 17, 2017, 10:17:04 pm »
OK, but then are the final renderScene and draw calls needed (doesn't doing it three times seem redundant and expensive?) just before you display to the screen?

56
Support / Re: Only thing rendered is the SkyBox
« on: June 16, 2017, 06:43:57 pm »
Before I asked I tried without the world, and it crashes. But why do you have to display between painting the textures?

57
Support / Re: Only thing rendered is the SkyBox
« on: June 16, 2017, 03:38:53 am »
What's the purpose of the dummy world on the second example? And also, what's the purpose of drawing into the buffer and displaying for each eye, then blitting the textures into the frame buffer and displaying the buffer?

58
Support / Re: Only thing rendered is the SkyBox
« on: June 14, 2017, 04:10:54 am »
I was using old OpenGL 1 code (which works with other apps). By switching to GLES2 I solved it...

Now, how do I do a view per eye for VR? Two FrameBuffers and two cameras?

59
Support / Only thing rendered is the SkyBox
« on: June 11, 2017, 02:11:43 am »
And even that won't turn with the camera. The screen is being redrawn, the accelerometer data is being updated, and so on and so forth. onDrawFrame calls a loopIteration() method that only rotatesCameraY by a given amount, then redraws the screen. But the SkyBox doesn't rotate. It's the weirdest thing, but it should be a known issue (something that I'm doing wrong that's already been done). Right?

60
Support / Re: Animate an avatar with jpct for Android
« on: June 09, 2017, 06:18:13 pm »
It's a format like any other. Loader.loadMD2 will give you an Object3D with its Animation instance filled.

Pages: 1 2 3 [4] 5 6 ... 102