MCPcopy Create free account
hub / github.com/VirtualGL/virtualgl / getIntegerv

Function getIntegerv

server/backend.cpp:628–709  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626
627
628void getIntegerv(GLenum pname, GLint *params)
629{
630 if(fconfig.egl)
631 {
632 if(!_eglBindAPI(EGL_OPENGL_API))
633 THROW("Could not enable OpenGL API");
634 EGLContext ctx = _eglGetCurrentContext();
635 VGLFBConfig config = CTXHASHEGL.findConfig(ctx);
636
637 if(!params || !config)
638 {
639 _glGetIntegerv(pname, params);
640 return;
641 }
642 else if(pname == GL_DOUBLEBUFFER)
643 {
644 FakePbuffer *pb = getCurrentFakePbuffer(EGL_DRAW);
645 if(pb)
646 {
647 *params = config->attr.doubleBuffer;
648 return;
649 }
650 }
651 else if(pname == GL_DRAW_BUFFER)
652 {
653 FakePbuffer *pb = getCurrentFakePbuffer(EGL_DRAW);
654 GLenum drawBuf = CTXHASHEGL.getDrawBuffer(ctx, 0);
655 if(pb)
656 {
657 *params = drawBuf;
658 return;
659 }
660 }
661 else if(pname >= GL_DRAW_BUFFER0 && pname <= GL_DRAW_BUFFER15)
662 {
663 FakePbuffer *pb = getCurrentFakePbuffer(EGL_DRAW);
664 int index = pname - GL_DRAW_BUFFER0;
665 GLenum drawBuf = CTXHASHEGL.getDrawBuffer(ctx, index);
666 if(pb)
667 {
668 *params = drawBuf;
669 return;
670 }
671 }
672 else if(pname == GL_DRAW_FRAMEBUFFER_BINDING)
673 {
674 *params = CTXHASHEGL.getDrawFBO(ctx);
675 return;
676 }
677 else if(pname == GL_MAX_DRAW_BUFFERS)
678 {
679 _glGetIntegerv(GL_MAX_DRAW_BUFFERS, params);
680 if(*params > 16) *params = 16;
681 return;
682 }
683 else if(pname == GL_READ_BUFFER)
684 {
685 FakePbuffer *pb = getCurrentFakePbuffer(EGL_READ);

Callers 7

glGetBooleanvFunction · 0.85
glGetDoublevFunction · 0.85
glGetFloatvFunction · 0.85
glGetIntegervFunction · 0.85
glGetInteger64vFunction · 0.85
DrawingToFrontFunction · 0.85
DrawingToRightFunction · 0.85

Calls 6

getCurrentFakePbufferFunction · 0.85
getDrawBufferMethod · 0.80
getDrawFBOMethod · 0.80
getReadBufferMethod · 0.80
getReadFBOMethod · 0.80
findConfigMethod · 0.45

Tested by

no test coverage detected