[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[platform-swt-dev] SWT-OpenGL rendering in different thread
- From: Junglas Bodo <junglas@xxxxxxxxxxxxx>
- Date: Tue, 20 Oct 2009 09:55:37 +0200
- Delivered-to: email@example.com
at the moment I'm experimenting with the GLCanvas and asked myself why
the access to the OpenGL context is so tightly restricted to the
More precisely: I would like to do all the OpenGL rendering in a
background thread without affecting the rest of the UI at all.
Granted, it's usually a bad idea to mess around with OpenGL in
multiple threads, but I was thinking about some kind of weighted
execution queue that would allow me to render some views with higher
priority than others and of course without blocking any kind of user
As a pure experiment I did this:
Extended the GLCanvas in my own project (boldly called this
ExtGLCanvas) and just overrided the checkWidget() method by a weaker
variant that only checks isDisposed. Then I simply handed all
rendering stuff previously done via Display.asyncExecute() to a
At least with SWT OSX-Cocoa this seems to work like a charm.
So my question is: Am I missing an important point here?