Starchasers / OCGlasses

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

3D widgets not rendering after x amount of widgets #72

Closed ErrorUsernameNotFound closed 4 years ago

ErrorUsernameNotFound commented 5 years ago

Describe the bug After displaying a certain amount of 3D widgets, no more will render. When the glasses are reequiped, the widgets do render for about 1 second, and than most of them disappear again. This is shown in Visual 2. Also when a widget that is visible is removed, one that wasn't rendered wil be rendered. which one is removed effects if a "new" widget will appear. It seams that only when newer widgets are removed (so higher number), a new one will be rendered. (visual 3, hard to explain :/ ) Most strangely is seems to be affected by de size and the distance between each widget. In visual 4 to 8 I change these two properties around, resulting in varying amounts of maximum widgets. The modlist can be found below the Visuals, and the script used in these test is at the bottom.

2019-07-21_16 43 37 Visual 1: the components in the computer, just in case

Widget limit and glasses re equip Visual 2: What the bug looks like, and the effect of reequipping the glasses

Widget-remove Visual 3: The effect of removing certain widgets

size 1 step 1 Visual 4: size 1 stepscale 1; 11 widgets shown

size 0 5 step 1 Visual 5: size 0.5 stepscale 1; 16 widgets shown

size 0 2 step 1 Visual 6: size 0.2 stepscale 1; 25 widgets shown

size 0 2 size 3 Visual 7: size 0.2 stepscale 3; 15 widgets shown

size 0 2 size 0 5 Visual 8: size 0.2 stepscale 0.5; 36 widgets shown

Modlist START OF CODE Forge 14.23.5.2838 (MC 1.12.2) Baubles 1.5.2 CodeChicken Lib 3.2.2.353 CoFH Core 4.6.3.27 CoFH World 1.3.1.7 Computronics 1.6.6 CrashToMainMenu 1.0.0 Just Enough Items 4.15.0.268 Just Enough Resources 0.9.2.60 Mantle 1.3.3.55 OpenComputers 1.7.4.153 OpenGlasses 2.2-25 OpenModsLib 0.12.2 Redstone Flux 1.0.6 Thermal Dynamics 2.5.5.21 Thermal Expansion 5.5.4.43 Thermal Foundation 2.6.3.27 Thermal Innovation 0.3.3.12

Code used to test com = require("component") glass = com.glasses widgets = {}

print("Size Scale:") scale = tonumber(io.read()) --multiplier for size print("\n".."Stepscale:") stepFactor = tonumber(io.read()) --multiplier for distance between widgets

glass.removeAll()

for i=1, 50 do widgets[i] = glass.addText3D() xray = widgets[i].setVisibleThroughObjects(true) text = widgets[i].setText(i) size = widgets[i].addScale(scale,scale,scale) position = widgets[i].addTranslation(i*stepFactor, 0 ,0) os.sleep() print("widget "..i.." created") end

io.read() glass.removeAll() os.execute("clear") END OF CODE

Awesome mod/addon, I love it, keep it up

ben-mkiv commented 5 years ago

Thanks for the detailed bug report, here's a fixed build: http://ci.pc-logix.com/job/OCGlasses/29/artifact/build/libs/OpenGlasses-MC1.12.2-2.2-29.jar

I'll leave this bug open until a official release is on curseForge, which may take a few days as i want to sort out some other issues before

ben-mkiv commented 4 years ago

version 2-2.2-36 is now on curseForge, which includes a fix