Hi I just wrote my first pyglet program

its a very simple program: I have a couple of Text objects which I
update on mouse scrolling and then redraw.

It is absurdly slow!

I have tried the tricks in the faq such as reducing frame rate,
running the program with -O and nothing seems to do the trick

here is my mainloop:
def mainLoop(root):
    """
    Interface mainloop
    """
    clock.set_fps_limit(15)
    B = Browser(0,root)
    #win.on_resize = B.rView
    win.on_mouse_scroll = B.objPicker
    win.on_key_press = B.diveIn

    while not win.has_exit:
        win.dispatch_events()
        glClear(GL_COLOR_BUFFER_BIT)
        #win.clear()
        B.renderView()
        win.flip()

here is my renderView function:

def renderView(self):
        self.currobj = self.olist[self.pos]
        self.curkey.text = '/'.join([self.olabeldic[i] for i in
xrange(self.level+1)])
        print self.olabeldic
        self.curkey.x = self.xoff*self.level
        self.curkey.y = (win.height-self.yoff)-
(self.linespace*self.level)
        self.curval.text =pformat(self.currobj[1])
        self.curval.y = y=(win.height-self.yoff*2)-
(self.linespace*self.level)
        self.curkey.draw()
        self.curval.draw()

there is nothing time consuming in these functions...
so, what could be causing the slowness...

thanks,

Flávio


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to