Lines 321-326
Link Here
|
321 |
} |
321 |
} |
322 |
return AttribList2GLCapabilities(device, glp, hdc, pfdID, iattributes, niattribs, iresults, winattrbits); |
322 |
return AttribList2GLCapabilities(device, glp, hdc, pfdID, iattributes, niattribs, iresults, winattrbits); |
323 |
} |
323 |
} |
|
|
324 |
|
325 |
static WGLGLCapabilities wglARBPFID2GLCapabilitiesNoCheck(final WindowsWGLDrawableFactory.SharedResource sharedResource, |
326 |
final AbstractGraphicsDevice device, final GLProfile glp, final long hdc, final int pfdID, |
327 |
final int winattrbits) { |
328 |
if (!sharedResource.hasARBPixelFormat()) { |
329 |
return null; |
330 |
} |
331 |
|
332 |
final IntBuffer iattributes = Buffers.newDirectIntBuffer(2 * MAX_ATTRIBS); |
333 |
final IntBuffer iresults = Buffers.newDirectIntBuffer(2 * MAX_ATTRIBS); |
334 |
final int niattribs = fillAttribsForGeneralWGLARBQuery(sharedResource, iattributes); |
335 |
|
336 |
if (!((WindowsWGLContext) sharedResource.getContext()).getWGLExt().wglGetPixelFormatAttribivARB(hdc, pfdID, 0, |
337 |
niattribs, iattributes, iresults)) { |
338 |
throw new GLException("wglARBPFID2GLCapabilities: Error getting pixel format attributes for pixel format " |
339 |
+ pfdID + " of device context " + toHexString(hdc) + ", werr " + GDI.GetLastError()); |
340 |
} |
341 |
return AttribList2GLCapabilitiesNoCheck(device, glp, hdc, pfdID, iattributes, niattribs, iresults, winattrbits); |
342 |
} |
324 |
|
343 |
|
325 |
static int[] wglChoosePixelFormatARB(final WindowsWGLDrawableFactory.SharedResource sharedResource, final AbstractGraphicsDevice device, |
344 |
static int[] wglChoosePixelFormatARB(final WindowsWGLDrawableFactory.SharedResource sharedResource, final AbstractGraphicsDevice device, |
326 |
final GLCapabilitiesImmutable capabilities, |
345 |
final GLCapabilitiesImmutable capabilities, |
Lines 396-402
Link Here
|
396 |
break; |
415 |
break; |
397 |
} |
416 |
} |
398 |
} else if(DEBUG) { |
417 |
} else if(DEBUG) { |
399 |
final GLCapabilitiesImmutable skipped = AttribList2GLCapabilities(device, glp, hdc, pfdIDs[i], iattributes, niattribs, iresults, GLGraphicsConfigurationUtil.ALL_BITS); |
418 |
final GLCapabilitiesImmutable skipped = AttribList2GLCapabilitiesNoCheck(device, glp, hdc, pfdIDs[i], iattributes, niattribs, iresults, GLGraphicsConfigurationUtil.ALL_BITS); |
400 |
System.err.println("wglARBPFIDs2GLCapabilities: bucket["+i+" -> skip]: pfdID "+pfdIDs[i]+", "+skipped+", winattr "+GLGraphicsConfigurationUtil.winAttributeBits2String(null, winattrbits).toString()); |
419 |
System.err.println("wglARBPFIDs2GLCapabilities: bucket["+i+" -> skip]: pfdID "+pfdIDs[i]+", "+skipped+", winattr "+GLGraphicsConfigurationUtil.winAttributeBits2String(null, winattrbits).toString()); |
401 |
} |
420 |
} |
402 |
} else if (DEBUG) { |
421 |
} else if (DEBUG) { |
Lines 560-569
Link Here
|
560 |
} |
579 |
} |
561 |
// non displayable requested (pbuffer) |
580 |
// non displayable requested (pbuffer) |
562 |
} |
581 |
} |
|
|
582 |
if (/* |
583 |
* (GLGraphicsConfigurationUtil.BITMAP_BIT & drawableTypeBits) != 0 |
584 |
* && |
585 |
*//* |
586 |
* GLRendererQuirks.existStickyDeviceQuirk(device, |
587 |
* GLRendererQuirks.NoPBufferWithAccum) && |
588 |
*/(pfd.getCAccumAlphaBits() != 0 || pfd.getCAccumRedBits() != 0 || pfd.getCAccumGreenBits() != 0 || pfd |
589 |
.getCAccumBlueBits() != 0)) { |
590 |
return null; |
591 |
} |
592 |
|
563 |
final WGLGLCapabilities res = new WGLGLCapabilities(pfd, pfdID, glp); |
593 |
final WGLGLCapabilities res = new WGLGLCapabilities(pfd, pfdID, glp); |
564 |
res.setValuesByARB(iattribs, niattribs, iresults); |
594 |
res.setValuesByARB(iattribs, niattribs, iresults); |
565 |
return (WGLGLCapabilities) GLGraphicsConfigurationUtil.fixWinAttribBitsAndHwAccel(device, drawableTypeBits, res); |
595 |
return (WGLGLCapabilities) GLGraphicsConfigurationUtil.fixWinAttribBitsAndHwAccel(device, drawableTypeBits, res); |
566 |
} |
596 |
} |
|
|
597 |
|
598 |
static WGLGLCapabilities AttribList2GLCapabilitiesNoCheck(final AbstractGraphicsDevice device, final GLProfile glp, |
599 |
final long hdc, final int pfdID, final IntBuffer iattribs, final int niattribs, final IntBuffer iresults, |
600 |
final int winattrmask) { |
601 |
final int allDrawableTypeBits = AttribList2DrawableTypeBits(iattribs, niattribs, iresults); |
602 |
int drawableTypeBits = winattrmask & allDrawableTypeBits; |
603 |
|
604 |
if (0 == drawableTypeBits) { |
605 |
return null; |
606 |
} |
607 |
final PIXELFORMATDESCRIPTOR pfd = createPixelFormatDescriptor(); |
608 |
|
609 |
WGLUtil.DescribePixelFormat(hdc, pfdID, PIXELFORMATDESCRIPTOR.size(), pfd); |
610 |
final WGLGLCapabilities res = new WGLGLCapabilities(pfd, pfdID, glp); |
611 |
res.setValuesByARB(iattribs, niattribs, iresults); |
612 |
return (WGLGLCapabilities) GLGraphicsConfigurationUtil |
613 |
.fixWinAttribBitsAndHwAccel(device, drawableTypeBits, res); |
614 |
} |
567 |
|
615 |
|
568 |
// |
616 |
// |
569 |
// GDI PIXELFORMAT |
617 |
// GDI PIXELFORMAT |
Lines 624-629
Link Here
|
624 |
return null; |
672 |
return null; |
625 |
} |
673 |
} |
626 |
} |
674 |
} |
|
|
675 |
if (/* (GLGraphicsConfigurationUtil.BITMAP_BIT & drawableTypeBits) != 0 && *//*(GLRendererQuirks.existStickyDeviceQuirk(device, GLRendererQuirks.NoPBufferWithAccum)) &&*/ (pfd.getCAccumAlphaBits() != 0 || pfd.getCAccumRedBits() != 0 || pfd.getCAccumGreenBits() != 0 || pfd.getCAccumBlueBits() != 0) ) { |
676 |
if(DEBUG) { |
677 |
System.err.println("Quirks: " + GLRendererQuirks.getStickyDeviceQuirks(device) + " on device " + device); |
678 |
System.err.println("Drop [accum bits PBUFFER]: " + WGLGLCapabilities.PFD2String(pfd, pfdID)); |
679 |
} |
680 |
return null; |
681 |
} |
627 |
|
682 |
|
628 |
final WGLGLCapabilities res = new WGLGLCapabilities(pfd, pfdID, glp); |
683 |
final WGLGLCapabilities res = new WGLGLCapabilities(pfd, pfdID, glp); |
629 |
res.setValuesByGDI(); |
684 |
res.setValuesByGDI(); |