Browse Source

showbase: Fix BufferViewer frame in non-standard coordinate systems

rdb 3 years ago
parent
commit
98314da00f
1 changed files with 4 additions and 4 deletions
  1. 4 4
      direct/src/showbase/BufferViewer.py

+ 4 - 4
direct/src/showbase/BufferViewer.py

@@ -240,10 +240,10 @@ class BufferViewer(DirectObject):
             offsetx = (ringoffset[ring]*2.0) / float(sizex)
             offsety = (ringoffset[ring]*2.0) / float(sizey)
             bright = ringbright[ring]
-            vwriter.addData3f(-1-offsetx, 0, -1-offsety)
-            vwriter.addData3f(1+offsetx, 0, -1-offsety)
-            vwriter.addData3f(1+offsetx, 0,  1+offsety)
-            vwriter.addData3f(-1-offsetx, 0,  1+offsety)
+            vwriter.addData3f(Vec3.rfu(-1 - offsetx, 0, -1 - offsety))
+            vwriter.addData3f(Vec3.rfu( 1 + offsetx, 0, -1 - offsety))
+            vwriter.addData3f(Vec3.rfu( 1 + offsetx, 0,  1 + offsety))
+            vwriter.addData3f(Vec3.rfu(-1 - offsetx, 0,  1 + offsety))
             cwriter.addData3f(bright, bright, bright)
             cwriter.addData3f(bright, bright, bright)
             cwriter.addData3f(bright, bright, bright)