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

How to draw simple shapes #13

Closed
MrAliSalehi opened this issue Dec 16, 2023 · 2 comments
Closed

How to draw simple shapes #13

MrAliSalehi opened this issue Dec 16, 2023 · 2 comments

Comments

@MrAliSalehi
Copy link
Contributor

Im trying to draw some shapes using three_d but I cant figure out a way to draw hollow objects (you know why LoL).

it seems that three_d fills the objects by default and there is no way to change it, Im wondering if you know any solution.

the starting point:

let camera = Camera::new_2d(Viewport::new_at_origo(
    glfw_backend.framebuffer_size_physical[0],
    glfw_backend.framebuffer_size_physical[1]));


let gm = Gm::new(Circle::new(&three_d_backend.context, vec2(100.0, 200.0), 30.0),
                 ColorMaterial::default());

RenderTarget::<'_>::screen(
    &three_d_backend.context,
    glfw_backend.framebuffer_size_physical[0],
    glfw_backend.framebuffer_size_physical[1])
    .clear(ClearState::color_and_depth(0.0, 0.0, 0.0, 0.0, 1.0))
    .render(&camera, std::iter::once(gm), &[]);

I also opened a discussion in three_d repo: asny/three-d#425

@coderedart
Copy link
Owner

response at asny/three-d#425 .

@MrAliSalehi
Copy link
Contributor Author

thank you for your response, im not sure if this question is related to three_d discussion or not.

you mentioned some libraries in the discussion, are those compatible with egui overlay? is there an example?
im going to paint a lot of 3D shapes so...

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

2 participants