return TRUE;
case WGL_SWAP_METHOD_ARB:
- if (pf->flags & PF_FLAG_DOUBLEBUFFER)
+ if (pf->flags & STW_PF_FLAG_DOUBLEBUFFER)
*pvalue = WGL_SWAP_COPY_ARB;
else
*pvalue = WGL_SWAP_UNDEFINED_ARB;
break;
case WGL_DOUBLE_BUFFER_ARB:
- if (pf->flags & PF_FLAG_DOUBLEBUFFER)
+ if (pf->flags & STW_PF_FLAG_DOUBLEBUFFER)
*pvalue = TRUE;
else
*pvalue = FALSE;
break;
case WGL_SAMPLE_BUFFERS_ARB:
- if (pf->flags & PF_FLAG_MULTISAMPLED)
+ if (pf->flags & STW_PF_FLAG_MULTISAMPLED)
*pvalue = stw_query_sample_buffers();
else
*pvalue = 0;
break;
case WGL_SAMPLES_ARB:
- if (pf->flags & PF_FLAG_MULTISAMPLED)
+ if (pf->flags & STW_PF_FLAG_MULTISAMPLED)
*pvalue = stw_query_samples();
else
*pvalue = 0;
#define STW_MAX_PIXELFORMATS 16
-static struct stw_pixelformat_info pixelformats[STW_MAX_PIXELFORMATS];
+static struct stw_pixelformat_info stw_pixelformats[STW_MAX_PIXELFORMATS];
static uint stw_pixelformat_count = 0;
static uint stw_pixelformat_extended_count = 0;
static void
-add_standard_pixelformats(
+stw_add_standard_pixelformats(
struct stw_pixelformat_info **ppf,
uint flags )
{
struct stw_pixelformat_depth_info depth24s8 = { 24, 8 };
struct stw_pixelformat_depth_info depth16 = { 16, 0 };
- pf->flags = PF_FLAG_DOUBLEBUFFER | flags;
+ pf->flags = STW_PF_FLAG_DOUBLEBUFFER | flags;
pf->color = color24;
pf->alpha = alpha8;
pf->depth = depth16;
pf++;
- pf->flags = PF_FLAG_DOUBLEBUFFER | flags;
+ pf->flags = STW_PF_FLAG_DOUBLEBUFFER | flags;
pf->color = color24;
pf->alpha = alpha8;
pf->depth = depth24s8;
pf++;
- pf->flags = PF_FLAG_DOUBLEBUFFER | flags;
+ pf->flags = STW_PF_FLAG_DOUBLEBUFFER | flags;
pf->color = color24;
pf->alpha = noalpha;
pf->depth = depth16;
pf++;
- pf->flags = PF_FLAG_DOUBLEBUFFER | flags;
+ pf->flags = STW_PF_FLAG_DOUBLEBUFFER | flags;
pf->color = color24;
pf->alpha = noalpha;
pf->depth = depth24s8;
void
stw_pixelformat_init( void )
{
- struct stw_pixelformat_info *pf = pixelformats;
+ struct stw_pixelformat_info *pf = stw_pixelformats;
- add_standard_pixelformats( &pf, 0 );
- stw_pixelformat_count = pf - pixelformats;
+ stw_add_standard_pixelformats( &pf, 0 );
+ stw_pixelformat_count = pf - stw_pixelformats;
- add_standard_pixelformats( &pf, PF_FLAG_MULTISAMPLED );
- stw_pixelformat_extended_count = pf - pixelformats;
+ stw_add_standard_pixelformats( &pf, STW_PF_FLAG_MULTISAMPLED );
+ stw_pixelformat_extended_count = pf - stw_pixelformats;
assert( stw_pixelformat_extended_count <= STW_MAX_PIXELFORMATS );
}
{
assert( index < stw_pixelformat_extended_count );
- return &pixelformats[index];
+ return &stw_pixelformats[index];
}
ppfd->nSize = sizeof( PIXELFORMATDESCRIPTOR );
ppfd->nVersion = 1;
ppfd->dwFlags = PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL;
- if (pf->flags & PF_FLAG_DOUBLEBUFFER)
+ if (pf->flags & STW_PF_FLAG_DOUBLEBUFFER)
ppfd->dwFlags |= PFD_DOUBLEBUFFER | PFD_SWAP_COPY;
ppfd->iPixelType = PFD_TYPE_RGBA;
ppfd->cColorBits = pf->color.redbits + pf->color.greenbits + pf->color.bluebits;
if (!(ppfd->dwFlags & PFD_DOUBLEBUFFER_DONTCARE) &&
!!(ppfd->dwFlags & PFD_DOUBLEBUFFER) !=
- !!(pf->flags & PF_FLAG_DOUBLEBUFFER))
+ !!(pf->flags & STW_PF_FLAG_DOUBLEBUFFER))
continue;
if (ppfd->cColorBits != pf->color.redbits + pf->color.greenbits + pf->color.bluebits)