I guess I kind of fixed this. I'm deleting the labels and adding them anew to the batch every frame. This makes the framerate lower, but at least I don't have the flicker anymore.
I'd prefer a way that didn't hurt the framerate. On Saturday, September 14, 2013 10:28:22 PM UTC-4, Zachary Spector wrote: > > I'm working on this code right here: > https://github.com/LogicalDash/LiSE/tree/rendering > > There's a lot of it. The stuff i'm working on is mostly in gui.py and > calendar.py and anyway the idea is pretty simple. > > I've got a subclass of pyglet.window, called GameWindow, which has one > batch containing seven OrderedGroups. Four for a game board and some stuff > to put on it, then three for some user interface decor. Menus, basically. > One group for a menu background, one for foreground images, and another for > text. > > One of the "menus" is actually a calendar. it's got more than one column > and it lays itself out in response to changes in a...pretty weird data > model, but think of it as a dictionary full of "start at tick 0, end at > tick 10, display text 'bacon'" and so forth. The calendar translates > 'ticks' into y-coordinates when it lays itself out. > > Everything seems to *work* alright, but the labels are flickering. It > seems to get worse as there are more labels on screen but it's not really > consistent. I really need those calendars to display varying numbers of > distinct labels, since it's going to be zoomable eventually and I don't > know what crazy huge display this app will be used on, anyhow. > > Am I perhaps running into a limitation of Label? Must I use sprites for my > text? If so, perhaps there's some way to blit a label to a texture and make > a sprite of it? How? > > Or is there something else about the rendering process that might cause > this? I have essentially no experience with OpenGL, just what I've picked > up while fooling around with pyglet's Group. > -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/groups/opt_out.
