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

Add support for GL_POINTS and gl_PointSize #334

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from

Conversation

h-isthebestletter
Copy link

Simple pull request to add support for drawing Points as a primitive as well as support for using gl_PointSize in the vertex shader. Sorry if I missed anything, I don't know much about OpenGL. However I've used it in my own toy project and it works (not sure how much of an assurance that is)

Now you should be able to make a pipeline that has gl_PointSize support by doing

let pipeline = gfx.create_pipeline()
    .from(&VERTEX, &FRAGMENT)
    .with_vertex_info(&vertex_info)
    .with_point_size_available(true) // note
    .build()
    .unwrap();

And you should be able to draw points by doing

renderer.set_primitive(DrawPrimitive::Points);

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

Successfully merging this pull request may close these issues.

1 participant