salbeira
salbeira

Reputation: 2593

Attach StencilBuffer to default Framebuffer

As it turns out, the default framebuffer of OpenGL does not nesseccarily contain space to perform stencil operations on. Can I attach it manually, or am I forced to use a cusomized framebuffer for this kind of operation?

Upvotes: 0

Views: 189

Answers (1)

derhass
derhass

Reputation: 45322

You need to request a Pixelformat/FBConfig/Visual with a stencil buffer for your render window.

It is not clear how you create the window. Most of the libraries like GLFW, SDL, GLUT, Qt have APIs for that, as well as the platform's GL binding APIs like wgl, glX, egl and so on. Note that you typically can't alter the format of existing windows.

Upvotes: 1

Related Questions