On Jan 18, 2008, at 7:04 AM, Jean-Marc Pelletier wrote:
> I managed to get it to work. Indeed, creating my own context was
> the way to go. Here's the working code. (You need to include the
> OpenGL and and AGL frameworks.)
Hi Jean-Marc,
Glad to hear you're figuring this OpenGL stuff out for your project.
One thing to consider with this code, is the probability that with a
NULL device and just the offscreen flag, this aglChoosePixelFormat
will most likely return a pixel format for a software based context.
The OpenGL versions for each possible driver are different, so while
your software renderer could support FBOs, your HW driver might not
(again, different video cards in the same machine are also a
possibility and each could have different versioned drivers and
different levels of support). For fast FBO based rendering, it would
require a HW context/driver.
Finally, there are cards which support FBO, but might not have OpenGL
2.0 drivers, in which case it would be better to check the extension
strings somehow. I forget exactly what these mechanisms are off the
top of my head, but a quick google on OpenGL extension strings FBO,
yielded the following thread, which may have some of the information
you are looking for, or at least get you started:
While OpenGL is a cross platform "standard", there is a huge amount
of room for platform/device/driver differences even within the
standard. It can be a *lot* of work trying to keep up. There are a
variety of open source projects designed to make it easier to
interrogate system capabilities which you may find useful. GLEW is
one which is liberally licensed (BSD/MIT style), which you might be
able to draw from:
Hope this helps.
-Joshua