I want to get Stencil to work with OpenGLControl.
With SDL2 this works as follows.
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_CORE);
SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 1);
Now I wanted to try it with OpenGLControl and did the following.
OpenGLControl1.OpenGLMinorVersion := 3;
OpenGLControl1.OpenGLMajorVersion := 3;
OpenGLControl1.StencilBits := 1;
Only then will unfortunately nothing be drawn at all.
If I don't do any of this at all, then Stencil is simply ignored, so it must be related to context creation.
Anyone have an idea how to do it with OpenGLControl?