As default any SDL-Window is now created in the "center position". Also it uses default flags (so not borderless, not minimized, ...).
While other window creation methods might not provide these functionality I thought about adding some helpers to define "default flags" for the window creation.
Another question:
~There are constants like GRAPHICS_BACKBUFFER (value of "$2"). During creation of a SDL window you can pass flags too - but GRAPHICS_BACKBUFFER (and other BlitzMax) constants are not extracted into glFlags. It only extracts SDL_GRAPHICS_BACKBUFFER (value of "$00800000") and others
$40000000. Maybe there should be an autoconversion for GRAPHICS_*** to SDL_GRAPHICS_*** ?~
For now it only does this with "SDL_GRAPHICS_NATIVE" ... got it.
Seems "SDL_GRAPHICS_ACCUMBUFFER" does not get evaluated in the glFlags:
If glFlags Then
If gFlags & SDL_GRAPHICS_BACKBUFFER Then SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1)
If gFlags & SDL_GRAPHICS_ALPHABUFFER Then SDL_GL_SetAttribute(SDL_GL_ALPHA_SIZE, 1)
If gFlags & SDL_GRAPHICS_DEPTHBUFFER Then SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24)
If gFlags & SDL_GRAPHICS_STENCILBUFFER Then SDL_GL_SetAttribute(SDL_GL_STENCIL_SIZE, 1)
End If
SDL_GL_ACCUM_RED_SIZE
the minimum number of bits for the red channel of the accumulation buffer; defaults to 0
SDL_GL_ACCUM_GREEN_SIZE
the minimum number of bits for the green channel of the accumulation buffer; defaults to 0
SDL_GL_ACCUM_BLUE_SIZE
the minimum number of bits for the blue channel of the accumulation buffer; defaults to 0
SDL_GL_ACCUM_ALPHA_SIZE
the minimum number of bits for the alpha channel of the accumulation buffer; defaults to 0
https://wiki.libsdl.org/SDL_GL_SetAttribute
As default any SDL-Window is now created in the "center position". Also it uses default flags (so not borderless, not minimized, ...).
While other window creation methods might not provide these functionality I thought about adding some helpers to define "default flags" for the window creation.
TSDLWindow.SetDefaultWindowPosition() TSDLWindow.SetDefaultWindowFlags()
They set some global variables which are used then in
Another question: ~There are constants like
GRAPHICS_BACKBUFFER
(value of "$2"). During creation of a SDL window you can pass flags too - butGRAPHICS_BACKBUFFER
(and other BlitzMax) constants are not extracted intoglFlags
. It only extractsSDL_GRAPHICS_BACKBUFFER
(value of "$00800000") and others $40000000. Maybe there should be an autoconversion forGRAPHICS_***
toSDL_GRAPHICS_***
?~ For now it only does this with "SDL_GRAPHICS_NATIVE" ... got it.Seems "SDL_GRAPHICS_ACCUMBUFFER" does not get evaluated in the glFlags:
SDL_GL_ACCUM_RED_SIZE the minimum number of bits for the red channel of the accumulation buffer; defaults to 0 SDL_GL_ACCUM_GREEN_SIZE the minimum number of bits for the green channel of the accumulation buffer; defaults to 0 SDL_GL_ACCUM_BLUE_SIZE the minimum number of bits for the blue channel of the accumulation buffer; defaults to 0 SDL_GL_ACCUM_ALPHA_SIZE the minimum number of bits for the alpha channel of the accumulation buffer; defaults to 0 https://wiki.libsdl.org/SDL_GL_SetAttribute