Starchasers / OCGlasses

mod for minecraft and addon for Open Computers
zlib License
31 stars 17 forks source link

[Suggestion] Add line 3d and floating text 3d widgets #101

Open hohserg1 opened 3 years ago

hohserg1 commented 3 years ago

Such widgets exists In OpengGlasses1. Can you add it to openGlasses2 also? https://minecraft.bymarcin.com/OpenGlasses/doku.php?id=lineworld https://minecraft.bymarcin.com/OpenGlasses/doku.php?id=floatingtextworld

ben-mkiv commented 3 years ago

Floating Text was replaced by https://github.com/Starchasers/OCGlasses/wiki/Widget_Text3D and line got dropped in favor of https://github.com/Starchasers/OCGlasses/wiki/Widget_Custom3D (which can be used to archive a line by writing a lua wrapper which adds the necessary vertices)

hohserg1 commented 3 years ago

Ok, but Custom3D#setGLMODE support TRIANGLES and TRIANGLE_STRIP only, how to draw regular lines?

ben-mkiv commented 3 years ago

by creating a cube from point a to point b for a 3D line segment you would draw 6 faces where each face has 2 triangles, best bet is to wrap it in a lua function, feel free to share it and i'll add it to the wiki

hohserg1 commented 3 years ago

Uh, it so unoptimized. Large amount of triangles may reduce fps and too many of triangles may give extreme lags. I tested it

ben-mkiv commented 2 years ago

@hohserg1 sorry for necro post, but is this feature request obsolete with your addition of the Wavefront OBJ line support?

https://github.com/Starchasers/OCGlasses/issues/102