The level of slowness I am getting is that it takes a couple of seconds for every screen update, that is, I scroll the mouse and a couple of seconds later I see the updated string on screen....
I should mention that I am running this on a quadcore Xeon, with 4GB of RAM, and a NVidia Geforce 8600. Plus all the examples that come with pyglet run at normal speed. Regarding the frame rate limited to 15fps, Doing this actually made the program faster.... pformat comes from the pprint module in the Python standard library. it is just a fancy print (returns the output of print with a little formatting) one last question: is the size of text an important factor here? thanks, On Sep 19, 6:34 pm, Richard Jones <[EMAIL PROTECTED]> wrote: > On Thu, 20 Sep 2007, fccoelho wrote: > > 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! > > Please define slow. What are you measuring, what do you get and what would you > expect to get? > > > here is my mainloop: > > def mainLoop(root): > > """ > > Interface mainloop > > """ > > clock.set_fps_limit(15) > > This will limit your application to 15 frames per second. > > > > > 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... > > I don't know what pformat() does, so I'll just have to believe you :) > > Richard --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
