hi to evreyone
i finnaly maded to create my frist window in python with panda3d
as a newbie, i follow the solar sys tutorial
the first step work great: i create my first windows!
the second step run bad:
here’s my code:
import direct.directbase.DirectStart
from panda3d.core import *
from direct.gui.DirectGui import *
import sys
class World:
def __init__(self):
self.title=OnscreenText(
text="python rock!! - but really",
style=1, fg = (1,1,1,1), pos = (0.8, -0.95), scale = .07)
base.setBackgroundColor(0, 0, 0,)
base.disableMouse()
camera.setPos (0, 0, 45)
camera.Hpr (0, -90, 0)
w = World()
run()
(delete my commentary, because normaly, i put alot of comment)
i run my program, the black window appear, but not the text
and it my core monitor tell me that my first core is running like a full speed lamborgini (100%) and my three other core are just chilling (i think you get what im trying to say)
and the python shell tell me this:
Known pipe types:
wglGraphicsPipe
(all display modules loaded.)
DirectStart: Starting the game.
NameError: name 'World' is not defined
i do exactly like the tut-step2 script (in fact, the correct scipt was just beside!
what’s wrong with the lambo?