python
from panda3d.core import *
from direct.showbase.ShowBase import ShowBase
class MyGame(ShowBase):
def __init__(self):
ShowBase.__init__(self)
self.addModelsPath("models")
self.addTexturesPath("textures")
self.model = self.loader.loadModel("my_model.egg")
self.model.reparentTo(self.render)
self.texture = self.loader.loadTexture("my_texture.png")
self.model.setTexture(self.texture)
self.accept("escape", self.quit)
def quit(self):
self.destroy()
game = MyGame()
game.run()
models-dir models/
textures-dir textures/