I dont know what should I call next or what type of shader should I use GlFramebufferTexture2D(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_TEXTURE_2D, depthFrameBufferValue, 0) GlBindFramebuffer(GL_FRAMEBUFFER, depthFrameBufferValue) Int depthFrameBufferValue = depthBuffer.get() IntBuffer depthFrameBuffer = BufferUtils.newIntBuffer(1) The rest of the code // This code should attach the depth texture into frame buffer 2D(GL20.GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, (), (), 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, null) I have seen examples for iOS where they put NULL. I don't know what should I put as glTexImage2D last parameter. Next line crashes the JVM 2D(GL20.GL_TEXTURE_2D, 0, GL_DEPTH_COMPONENT, (), (), 0, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, BufferUtils.newIntBuffer(1)) I have no idea what glTexImage2D does, I suppose It should generate depth texture. I now bind the texture, so I can use it. Int depthBufferValue = depthBuffer.get() AFAIK this puts 1 texture name into depthBuffer. IntBuffer depthBuffer = BufferUtils.newIntBuffer(1) While trying to create a depth buffer, my JVM crashes. I have read some tutorials and trying to wrap my head around OpenGL ES 2.0.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |