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

mesh drawEdges instead of triangles error? #15

Open
gritd opened this issue Jan 30, 2023 · 0 comments
Open

mesh drawEdges instead of triangles error? #15

gritd opened this issue Jan 30, 2023 · 0 comments

Comments

@gritd
Copy link

gritd commented Jan 30, 2023

So I've been trying to get just wire renders from the engine3D in vga3Bit for a while now. DrawTriangles example work well, but when I try to use anything with drawEdges or vertices in the mesh.h it just does not show? Am I overlooking something?

1 - export edges and vertices with the stlconverter
(works, I see a list of these)
2. replace model.drawTriangles(engine, vga... with: model.drawEdges(vga,vga.RGB...

draws no edges.. (also tried with removing the z-sorting because it's not needed but still nothing)
I rewrote the drawtriangles to draw a triangle outline instead of the filled one but I just want the vertices/edges instead and not a surface filled with triangles

here's a stlconverter sample output with a small 3D pyramid model test which I just can't to render as wireframe:

namespace pyramid
{
const int vertexCount = 10;
const int edgeCount = 24;
const float vertices[][3] = {
-0.2500, -0.0000, -0.3153, 0.0000, 0.1443, 0.0000, 0.0000, 0.4330, -0.3153, -0.2500, -0.2887, 0.0000, 0.0000, -0.1443, 0.3153, -0.5000, -0.4330, -0.3153, 0.0000, -0.4330, -0.3153, 0.2500, -0.2887, 0.0000, 0.5000, -0.4330, -0.3153, 0.2500, -0.0000, -0.3153, };
const unsigned short edges[][2] = {
0, 1, 1, 2, 0, 2, 3, 4, 1, 4, 1, 3, 0, 3, 0, 5, 3, 5, 5, 6, 3, 6, 3, 7, 6, 7, 4, 7, 6, 8, 7, 8,
8, 9, 7, 9, 1, 7, 1, 9, 2, 9, 6, 9, 0, 6, 0, 9, };
};

@gritd gritd changed the title mes drawEdges instead of triangles error? mesh drawEdges instead of triangles error? Jan 30, 2023
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

1 participant