Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x/mobile: DrawElements doesn't show anything #12727

Closed
nzlov opened this issue Sep 23, 2015 · 4 comments

Comments

Projects
None yet
4 participants
@nzlov
Copy link

commented Sep 23, 2015

android 5.0 log

09-23 21:14:51.733: I/GoLog(30969): gl.Disable(CULL_FACE) 
09-23 21:14:51.733: I/GoLog(30969): gl.Clear(gl.Enum(0x4100)) 
09-23 21:14:51.733: I/GoLog(30969): gl.ClearColor(0.1764706, 0.21176471, 0.21960784, 1) 
09-23 21:14:51.733: I/GoLog(30969): gl.DepthMask(false) 
09-23 21:14:51.733: I/GoLog(30969): gl.UseProgram(Program(1)) 
09-23 21:14:51.733: I/GoLog(30969): gl.ActiveTexture(TEXTURE0) 
09-23 21:14:51.733: I/GoLog(30969): gl.BindTexture(TEXTURE_2D, Texture(1)) 
09-23 21:14:51.738: I/GoLog(30969): gl.UniformMatrix4fv(Uniform(1:), len(16)) 
09-23 21:14:51.738: I/GoLog(30969): gl.BindBuffer(ARRAY_BUFFER, Buffer(2)) 
09-23 21:14:51.738: I/GoLog(30969): gl.BufferSubData(ARRAY_BUFFER, 0, len(80000)) 
09-23 21:14:51.738: I/GoLog(30969): gl.EnableVertexAttribArray(Attrib(0:)) 
09-23 21:14:51.738: I/GoLog(30969): gl.EnableVertexAttribArray(Attrib(2:)) 
09-23 21:14:51.738: I/GoLog(30969): gl.EnableVertexAttribArray(Attrib(1:)) 
09-23 21:14:51.738: I/GoLog(30969): gl.VertexAttribPointer(Attrib(0:), 2, FLOAT, false, 20, 0) 
09-23 21:14:51.738: I/GoLog(30969): gl.VertexAttribPointer(Attrib(2:), 2, FLOAT, false, 20, 8) 
09-23 21:14:51.743: I/GoLog(30969): gl.VertexAttribPointer(Attrib(1:), 4, UNSIGNED_BYTE, true, 20, 16) 
09-23 21:14:51.743: I/GoLog(30969): gl.BindBuffer(ELEMENT_ARRAY_BUFFER, Buffer(1)) 
09-23 21:14:51.743: I/GoLog(30969): gl.DrawElements(TRIANGLES, 160, UNSIGNED_SHORT, 0) 
09-23 21:14:51.743: I/GoLog(30969): gl.DisableVertexAttribArray(Attrib(0:)) 
09-23 21:14:51.743: I/GoLog(30969): gl.DisableVertexAttribArray(Attrib(2:)) 
09-23 21:14:51.743: I/GoLog(30969): gl.DisableVertexAttribArray(Attrib(1:)) 
09-23 21:14:51.743: I/GoLog(30969): gl.BindBuffer(ARRAY_BUFFER, Buffer(0)) 
09-23 21:14:51.743: I/GoLog(30969): gl.BindTexture(TEXTURE_2D, Texture(0)) 
09-23 21:14:51.743: I/GoLog(30969): gl.DepthMask(true) 
09-23 21:14:51.743: I/GoLog(30969): gl.UseProgram(Program(0)) 
09-23 21:14:51.748: I/GoLog(30969): gl.Flush() 

you can run https://github.com/mandroa/examples test example .

@bradfitz bradfitz changed the title DrawElements doesn't show anything x/mobile: DrawElements doesn't show anything Sep 23, 2015

@ianlancetaylor ianlancetaylor added this to the Unreleased milestone Sep 23, 2015

@crawshaw

This comment has been minimized.

Copy link
Contributor

commented Sep 28, 2015

This is most likely a bug in your GLSL shader, or in some way the GL state machine has been configured. Does this run on the desktop? I notice your app makes use of GLFW, which means you're probably not running in ES 2 on the desktop. OpenGL shaders are not automatically compatible between the desktop and ES 2.

@nzlov

This comment has been minimized.

Copy link
Author

commented Sep 29, 2015

thx.But use the same code, the early x/mobile no problem.

@crawshaw

This comment has been minimized.

Copy link
Contributor

commented Sep 29, 2015

I'm sorry, there's not enough information here for me to help you debug. Your example program is too big for me to work through, and there are too many ways this could be incompatible with the GL spec or tickling a bug in a specific GL driver.

@crawshaw crawshaw removed their assignment Sep 29, 2015

@nzlov

This comment has been minimized.

Copy link
Author

commented Sep 29, 2015

thank you very much.

@nzlov nzlov closed this Sep 29, 2015

@golang golang locked and limited conversation to collaborators Sep 28, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.