![]() ![]() Private final int vertexStride = COORDS_PER_VERTEX * 4 // 4 bytes per vertexĪ _surface īyteBuffer bb = ByteBuffer.allocateDirect( Private final int vertexCount = squareCoords.length / COORDS_PER_VERTEX Private final int mTextureCoordinateDataSize = 2 Private short drawOrder = // order to draw vertices number of coordinates per vertex in this array "gl_FragColor = (texture2D(u_Texture, v_TexCoordinate)) " + Private final String fragmentShaderCode = Here is my drawing code, it is initialised in the onSurfaceCreated() of the MainActivity class, and drawn from onEyeDraw() which is Cardboard's draw function. Overwhelmed by so many new concepts that I don't know, I'm not able to debug or just understand if the two approach can be used like this. Putting the 2 together I get a blank screen and occasionally get : GL_INVALID_OPERATION in the console window. I have followed the Android documentation on how to initialise Open GL ES 2.0 and use it, and also this tutorial on texturing. I can't use a TextureView and implement SurfaceTextureListener as per this tutorial since I am using Google Cardboard. I'm trying to capture video and display it to the screen by setting an Open GL ES texture to an android surfaceTexture. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |