I was going to ask how to do this, then I figure out how to do it. You just set the buffers you want as the default buffers when selecting the driver to use.
This lets you open a MaxGUI canvas and give it the buffers you want to use in OpenGL. I presume this works for DirectX driver too.
Example...
This lets you open a MaxGUI canvas and give it the buffers you want to use in OpenGL. I presume this works for DirectX driver too.
Example...
'Select what buffers you want for a MaxGUI canvas '(select them in the default for the driver!) Strict 'Choose what buffers you want as part of the driver default 'before setting up the canvas SetGraphicsDriver(GLGraphicsDriver(),GRAPHICS_BACKBUFFER|GRAPHICS_ALPHABUFFER|GRAPHICS_ACCUMBUFFER|GRAPHICS_DEPTHBUFFER|GRAPHICS_STENCILBUFFER) 'Open window with canvas graphics Local Window:TGadget=CreateWindow("win",0,0,640,480,Null,WINDOW_TITLEBAR|WINDOW_CLIENTCOORDS) Local Canvas:TGadget=CreateCanvas(0,0,640,480,Window) Local GraphicContext:TGraphics=CanvasGraphics(Canvas) SetGraphics GraphicContext 'Print the bits per component/buffer Local a:Int glGetIntegerv(GL_RED_BITS,Varptr(a)) Print "Red bits: "+a glGetIntegerv(GL_GREEN_BITS,Varptr(a)) Print "Green bits: "+a glGetIntegerv(GL_BLUE_BITS,Varptr(a)) Print "Blue bits: "+a glGetIntegerv(GL_ALPHA_BITS,Varptr(a)) Print "Alpha bits: "+a glGetIntegerv(GL_DEPTH_BITS,Varptr(a)) Print "Depth bits: "+a glGetIntegerv(GL_ACCUM_RED_BITS,Varptr(a)) Print "Accum Red bits: "+a glGetIntegerv(GL_ACCUM_GREEN_BITS,Varptr(a)) Print "Accum Green bits: "+a glGetIntegerv(GL_ACCUM_BLUE_BITS,Varptr(a)) Print "Accum Blue bits: "+a glGetIntegerv(GL_ACCUM_ALPHA_BITS,Varptr(a)) Print "Accum Alpha bits: "+a glGetIntegerv(GL_STENCIL_BITS,Varptr(a)) Print "Stencil bits: "+a 'Cleanup EndGraphics 'Maybe not needed? FreeGadget Canvas FreeGadget Window End