WorldViz User Forum

WorldViz User Forum (https://forum.worldviz.com/index.php)
-   Vizard (https://forum.worldviz.com/forumdisplay.php?f=17)
-   -   Weird behavior of on-the-fly objects (https://forum.worldviz.com/showthread.php?t=5400)

tokola 07-10-2015 08:15 AM

Weird behavior of on-the-fly objects
 
2 Attachment(s)
I am using a piece of code from Vizard's onTheFly.py example (see below) to create some dots on a map. The dots are created normally when run from within the module ('__main__'), but become square when the module is called from another module (see images)! Absolutely nothing changes in the way the code is called, so it makes no sense to me why this might happen. Seems like a bug.
Code:

def DisplayClickedCoords(self,coords):
                #Add on-th-fly points on the map for all the coordinates
                viz.startLayer(viz.POINTS)
                viz.pointSize(20)
                viz.vertexColor(viz.RED)
                self.spots = viz.endLayer()
                self.spots.disable(viz.CULLING)
                for c in coords:
                        self.spots.addVertex(c[0], 0, c[1])
                self.spots.alpha(0.5)

I can try and reproduce the problem in a sample script, but before I do this, is there any reason that you think such a behavior can be explained?

farshizzo 07-10-2015 09:09 AM

Is one script enabling multisampling and the other not? Without multsampling enabled, points will usually be rendered as squares.

tokola 07-10-2015 10:05 AM

Easy fix! I knew it would be a piece of cake for you, farshizzo!

I have a hard one coming in another thread, soon:)


All times are GMT -7. The time now is 10:46 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Copyright 2002-2023 WorldViz LLC