![]() GLES20.glVertexAttrib3f(pointPositionHandle, lightLocation, lightLocation, lightLocation) GLES20.glAttachShader(mProgram, fragmentShader) įinal int pointMVPMatrixHandle = GLES20.glGetUniformLocation(mProgram, "u_MVPMatrix") įinal int pointPositionHandle = GLES20.glGetAttribLocation(mProgram, "a_Position") GLES20.glAttachShader(mProgram, vertexShader) Int fragmentShader = MyGLRenderer.loadShader( Int vertexShader = MyGLRenderer.loadShader( initialize byte buffer for the draw list My Renderer: public class MyGLRenderer implements GLSurfaceView.Renderer //*********ok ![]() The shader code was completely as the same as the example. I followed the example downloaded from link below this article: After I add lighting and shader codes, the model is still there but turns out black. Rendering without adding light was pretty good. I tried to load stl files and show it on the screen. ![]() This problem bothers me for about a week.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |