![]() ![]() STexUniformHandle = GLES20.glGetUniformLocation(sProgramHandle, "u_Texture") After this, I set my handles accordingly - I also set u_Texture to point to texture unit 0 because this does not change. ![]() I create, compile, and attach these shaders to the program without error. " gl_FragColor = texture2D(u_Texture, v_TexCoord) " + Private static final String FRAGMENT_SHADER_SOURCE = private static final String VERTEX_SHADER_SOURCE = They worked just fine in project A, so I don't think this is the source of the problem, just including for the sake of completeness. I have tried much debugging and much googling all to no avail. Everything works the exact same, except texture2D() returns black for some reason. I then tried implementing this very simple rendering system in a game engine (project B). I followed a number of tutorials and was able to set up a very simple renderer class that properly loaded and rendered textures (project A). No, I'm not sure if I can phrase the title any better in an appropriate amount of characters. No, none of them were helpful to my situation. To preface this: Yes, I have looked at the large amount of "Android OpenGL ES 2.0 black textures" questions asked previously on this site. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |