c++ - OpenGL Auxiliary buffers -
i'm working on project using opengl, c++ , windows, i've been debugging amds codexl , noticed there's 4 full resolution "auxiliary buffers" alongside front, back, depth , stencil buffers. far can tell these totally unused , taking memory, wondered if there's way not initialize them, or perhaps more codexl erroneously reporting initialized?
as far can tell, know code side pixelformatdescriptor has flags auxiliary , accumulation buffers, both of set zero.
i wondered if else has experienced , if it's avoidable @ (perhaps these buffers required).
thanks
update:
tried out "proper" context creation link, better since it's explicit in version conformity, did not resolve issue. ended trying loop passing counter index describepixelformat() try match format 0 aux buffers , rest of need, couldn't find supported , worked, here's code search (just basic test).
pixelformatdescriptor targetpixfmt; memset(&targetpixfmt, 0, sizeof(pixelformatdescriptor)); targetpixfmt.nsize = sizeof(pixelformatdescriptor); targetpixfmt.nversion = 1; targetpixfmt.dwflags = pfd_doublebuffer | pfd_support_opengl | pfd_draw_to_window; targetpixfmt.ipixeltype = pfd_type_rgba; targetpixfmt.ccolorbits = colorbitdepth; targetpixfmt.cdepthbits = depthbitdepth; targetpixfmt.cstencilbits = stencilbitdepth; s32 pixfmtcounter = 1; // starting @ 0 fails ? (;;) { pixelformatdescriptor temppixfmt; if (0 == describepixelformat(m_devicecontext, pixfmtcounter, sizeof(pixelformatdescriptor), &temppixfmt)) break; if ((temppixfmt.dwflags & targetpixfmt.dwflags) == targetpixfmt.dwflags && targetpixfmt.ipixeltype == temppixfmt.ipixeltype && targetpixfmt.ccolorbits <= temppixfmt.ccolorbits && targetpixfmt.cdepthbits <= temppixfmt.cdepthbits && temppixfmt.cauxbuffers <= 0) { break; } pixfmtcounter++; }
i'm being loose color , depth bits try , more results, search finds 2 formats, both of have dwflags set 33893 (pfd_doublebuffer | pfd_draw_to_window | pfd_support_opengl | pfd_generic_format | pfd_swap_copy | pfd_support_composition).
if use format first call opengl function fails because null , pixel format change between failing , not.
i guess that's way is?
Comments
Post a Comment