|
From: Andreas R. <And...@gm...> - 2002-09-05 21:32:05
|
Hi Guys, I've done some changes which affect the B3DAcceleratorPlugin code. I've unified the HW/SW renderer attributes in a generic 'flags' variable which is passed down to the renderer creation primitives. In addition an extra flag has been introduced to explicitly request stencil buffer support (which is required for some of the stuff that I'm doing). This means, the renderer creation primitive (glCreateRenderer) is now obsolete - a new creation primitive has been introduced (glCreateRendererFlags) which takes a bunch of flags along as an argument. What you need to do are three things: a) Extract the former HW/SW renderer attribute from the flags. This can be done as simply as int allowSoftware = (flags & B3D_SOFTWARE_RENDERER) != 0; int allowHardware = (flags & B3D_HARDWARE_RENDERER) != 0; b) The platform code must check if any "unsupported" flags are requested. This is needed in order to allow "experimental" extensions of the flags without getting strange results if that code is run on a platform not supporting the request. E.g., if you only support the above two flags then there should be some code saying something like: #define SUPPORTED_FLAGS (B3D_SOFTWARE_RENDERER | B3D_HARDWARE_RENDERER) if( (flags & ~SUPPORTED_FLAGS) != 0) /* check for unsupported flags */ return -1; c) In order to support stencil buffering (which is the only capability newly introduced) you will have to modify the renderer creation code. For Unix this means adding a non-zero value to GLX_STENCIL_SIZE. For MacOS it means adding an entry to the attributes list requesting a non-zero AGL_STENCIL_SIZE. If any of you need help with making these changes, let me know. They are pretty trivial to make if you know what you're doing ;-) Cheers, - Andreas |