What would have been different (If I knew when first writing OpenGLContext what I know now...)


Did a bit more work on OpenGLContext cleanup, fixing bugs with degenerate geometry handling, then beginning work on making the "mainloop" easier to work with. Currently the mainloop is defined in each "testing" context module, and needs to be separately imported from the base context class. Thing is, it really has nothing to do with the testing aspect at all, it's just a generic mainloop that was needed for testing and so first showed up there...

It should have been defined (and is now being redefined) as a class-method on the base context, but that's going to require a shim to allow old user code to work. I'd just never heard of classmethods in Python when I wrote the original code. It also should have defined a minimal set of attributes to be passed in (or a "structure (node)") in order to configure the context (size, GL properties/bitmasks, resizability, that kind of thing). Oh well, live and learn, not too late to fix that.

There's a similar wart that would be nice to fix in the core design of the VRML97 fields. They should be using the pure descriptor API, but at the time I wrote them (basically just as 2.2 was released) I'd never heard of the descriptor API, just that one concrete implementation.

I don't think that will be a major change code-wise, but I figure that will be a post 2.0.0 fix, since it might significantly affect system performance.

Anyway, think I'll head off to bed so I can get a fairly early start on Cinemon work tomorrow. PyGTA tomorrow evening, so no more OpenGLContext work until Wednesday at the earliest.

Comments

Comments are closed.

Pingbacks

Pingbacks are closed.