GeomPoints used as point sprites restricted to 16-bits indices
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Panda3D |
Fix Released
|
Undecided
|
rdb |
Bug Description
* Here is the console error output
* 32bit natty (ubuntu) + Nothing else really running only firefox, IM and few open folders :P even closed same error...
* panda3d1.
* Note I got this error with the builds before this aswell.
* Also this error started to popup when I started to use an image to add to the points.
* I hope thats all the info you need... Can find me in irc
Known pipe types:
glxGraphicsPipe
(all display modules loaded.)
:display:
depth_bits=24 color_bits=24 alpha_bits=8 back_buffers=1 force_hardware=1
LVector3f(-6.07107, -4.07107, 12.9289)
25919
The number of bytes being used:192Bytes
Assertion failed: *(PN_uint16 *)pointer == a at line 1838 of panda/src/
Assertion failed: *(PN_uint16 *)pointer == a at line 1838 of panda/src/
Assertion failed: *(PN_uint16 *)pointer == a at line 1838 of panda/src/
Assertion failed: *(PN_uint16 *)pointer == a at line 1838 of panda/src/
Assertion failed: *(PN_uint16 *)pointer == a at line 1838 of panda/src/
--- THESE GO ON FOR SOME TIME...
Assertion failed: *(PN_uint16 *)pointer == a at line 1838 of panda/src/
Assertion failed: *(PN_uint16 *)pointer == a at line 1838 of panda/src/
Assertion failed: *(PN_uint16 *)pointer == a at line 1838 of panda/src/
:display:
Traceback (most recent call last):
File "/usr/share/
self.
AssertionError: *(PN_uint16 *)pointer == a at line 1838 of panda/src/
:task(error): Exception occurred in PythonTask igLoop
Traceback (most recent call last):
File "another.py", line 133, in <module>
run()
File "/usr/share/
self.
File "/usr/share/
self.step()
File "/usr/share/
self.mgr.poll()
File "/usr/share/
self.
AssertionError: *(PN_uint16 *)pointer == a at line 1838 of panda/src/
>Exit code: 1
-------
# A PIECE OF CODE : Note that it will miss some needed resources... ofc
from pandac.PandaModules import loadPrcFileData
loadPrcFileData("",
"""
window-title 3D Space
fullscreen 0
win-size 1024 768
cursor-hidden 0
sync-video 1
show-frame-
"""
)
from direct.
from direct.
from direct.
from pandac.PandaModules import *
from random import random
import sys, array
class Space(ShowBase):
def __init__(self):
ShowBase.
base.
#self.filters = CommonFilters(
#self.
self.createDots()
def genLabelText(self, text, i):
return OnscreenText(text = text, pos = (-1.3, .95-.05*i), fg=(1,1,1,1),
align = TextNode.ALeft, scale = .05, mayChange = 1)
def createDots(self):
format = GeomVertexForma
vdata = GeomVertexData(
vertex = GeomVertexWrite
image= PNMImage()
image.
image2=PNMImage()
image2.
counter = 0
pos_list = []
for i in xrange(800000*10):
x = random() * 255
y = random() * 255
z = random() * 63
if random() < image.getBright
if random() < image2.
if random() < image2.
vertex.
#
counter+=1
# X, Y, Z
grid_x = 10
grid_y = 10
grid_z = 10
#for count_x in range(grid_x):
# count_x=
# for count_y in range(grid_y):
# count_y=
# for count_z in range(grid_z):
# count_z=
# vertex.
prim = GeomPoints(
prim.
prim.
prim.
x = ((Point3(
print x
geom = Geom(vdata)
geom.
node = GeomNode('gnode')
node.
nodePath = render.
nodePath.
nodePath.
#nodePath.
#nodePath.
nodePath.
#nodePath.
nodePath.
nodePath.
nodePath.
nodePath.
#flippedNode = GeomNode(
#flippedNode.
#flippedNP = nodePath.
#flippedNP.
### INFO ###
self.info = self.genLabelTe
self.pointinfo = self.genLabelTe
print counter
print "The number of bytes being used:" +str(prim.
###INFO DONE ####
tex = loader.
tex.setWrapU(
tex.setWrapV(
nodePath.
nodePath.
nodePath2 = nodePath.
nodePath2.
nodePath2.
nodePath2.
#dotsNode = GeomNode(
#dotsNode.
#dotsNP = render.
#dotsNP.
#dotsNP.
#dotsNP.
#dotsNP.
#dotsNP.
#dotsNP.
#dotsNP.
#dotsNP.
Main = Space()
run()
Changed in panda3d: | |
assignee: | nobody → David Rose (droklaunchpad) |
status: | New → Won't Fix |
Changed in panda3d: | |
status: | Fix Committed → Fix Released |
Panda3D could do a better job of giving a more meaningful error message here, but this is technically not a bug. You have only exceeded an internal limit: you have called setRenderModePe rspective( ) on a GeomPrimitive that contains too many vertices. (The limit is 16384 vertices, but you will probably have performance issues with that many anyway.)
Note that the limit is imposed only when Panda transforms these particles on the CPU, instead of handing them to the GPU. Therefore, you also may be able to avoid the limit by putting "hardware-points 1" and "hardware- point-sprites 1" in your Config.prc file, but I think these are the defaults anyway in 1.8.0. Even with these variables set, Panda may still be forced to transform them on the CPU anyway, depending on the OpenGL extensions provided by your graphics card, and/or by the render state you apply.
David