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

triangle example cant see any triangles #9

Open
lazytiger opened this issue May 13, 2015 · 4 comments
Open

triangle example cant see any triangles #9

lazytiger opened this issue May 13, 2015 · 4 comments

Comments

@lazytiger
Copy link

No description provided.

@lazytiger
Copy link
Author

It seems that Color attribute does not supplied in Draw
// Use vertices data.
location, ok := r.findAttribLocation(ns, "Vertex")
if ok {
gl.BindBuffer(gl.ARRAY_BUFFER, native.vertices)
gl.EnableVertexAttribArray(location)
defer gl.DisableVertexAttribArray(location)
gl.VertexAttribPointer(location, 3, gl.FLOAT, false, 0, nil)
}

location, ok = r.findAttribLocation(ns, "Color")
if ok {
    gl.BindBuffer(gl.ARRAY_BUFFER, native.colors)
    gl.EnableVertexAttribArray(location)
    defer gl.DisableVertexAttribArray(location)
    gl.VertexAttribPointer(location, 4, gl.FLOAT, false, 0, nil)
}

I added Color attribute binding, and it's ok now. I am not sure if I get the wrong code.

@emidoots
Copy link
Member

Apologies for the late response on this. Thank you for the detailed report @lazytiger -- I'll have to investigate later and see if this is still an issue in gfx.v2 and the gfxv2 branch of the examples.

@awfm9
Copy link

awfm9 commented Sep 11, 2015

I'm experiencing the same issue, but applying the fix did not help. No triangles, only the cleared color rectangles. All other examples run fine.

@emidoots
Copy link
Member

@awishformore @lazytiger can either of you confirm this is still an issue? for record, azul3d_triangles should look basically like this:

image

On OS X, the background bars will look smaller on a Retina display.

What are you seeing, can you provide a screenshot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants