public AndroidGLFramebufferHelper(IGLExtensionLookup lookup, IGLErrorHandler errHandler) { mErrHandler = errHandler; // eglGetProcAddress doesn't guarantied returning NULL if the entry point doesn't exist. The returned address *should* be the same for all invalid entry point var invalidFuncPtr = EGLGetProcAddress("InvalidFunctionName"); if (lookup.HasExtension("GL_EXT_discard_framebuffer")) { var glDiscardFramebufferEXTPtr = EGLGetProcAddress("glDiscardFramebufferEXT"); if (glDiscardFramebufferEXTPtr != invalidFuncPtr) { this.GLInvalidateFramebuffer = Marshal.GetDelegateForFunctionPointer <GLInvalidateFramebufferDelegate>(glDiscardFramebufferEXTPtr); this.SupportsInvalidateFramebuffer = true; } } if (lookup.HasExtension("GL_EXT_multisampled_render_to_texture")) { var glRenderbufferStorageMultisampleEXTPtr = EGLGetProcAddress("glRenderbufferStorageMultisampleEXT"); var glFramebufferTexture2DMultisampleEXTPtr = EGLGetProcAddress("glFramebufferTexture2DMultisampleEXT"); if (glRenderbufferStorageMultisampleEXTPtr != invalidFuncPtr && glFramebufferTexture2DMultisampleEXTPtr != invalidFuncPtr) { this.GLRenderbufferStorageMultisample = Marshal.GetDelegateForFunctionPointer <GLRenderbufferStorageMultisampleDelegate>(glRenderbufferStorageMultisampleEXTPtr); this.GLFramebufferTexture2DMultisample = Marshal.GetDelegateForFunctionPointer <GLFramebufferTexture2DMultisampleDelegate>(glFramebufferTexture2DMultisampleEXTPtr); } } else if (lookup.HasExtension("GL_IMG_multisampled_render_to_texture")) { var glRenderbufferStorageMultisampleIMGPtr = EGLGetProcAddress("glRenderbufferStorageMultisampleIMG"); var glFramebufferTexture2DMultisampleIMGPtr = EGLGetProcAddress("glFramebufferTexture2DMultisampleIMG"); if (glRenderbufferStorageMultisampleIMGPtr != invalidFuncPtr && glFramebufferTexture2DMultisampleIMGPtr != invalidFuncPtr) { this.GLRenderbufferStorageMultisample = Marshal.GetDelegateForFunctionPointer <GLRenderbufferStorageMultisampleDelegate>(glRenderbufferStorageMultisampleIMGPtr); this.GLFramebufferTexture2DMultisample = Marshal.GetDelegateForFunctionPointer <GLFramebufferTexture2DMultisampleDelegate>(glFramebufferTexture2DMultisampleIMGPtr); } } else if (lookup.HasExtension("GL_NV_framebuffer_multisample")) { var glRenderbufferStorageMultisampleNVPtr = EGLGetProcAddress("glRenderbufferStorageMultisampleNV"); var glBlitFramebufferNVPtr = EGLGetProcAddress("glBlitFramebufferNV"); if (glRenderbufferStorageMultisampleNVPtr != invalidFuncPtr && glBlitFramebufferNVPtr != invalidFuncPtr) { this.GLRenderbufferStorageMultisample = Marshal.GetDelegateForFunctionPointer <GLRenderbufferStorageMultisampleDelegate>(glRenderbufferStorageMultisampleNVPtr); this.GLBlitFramebuffer = Marshal.GetDelegateForFunctionPointer <GLBlitFramebufferDelegate>(glBlitFramebufferNVPtr); this.AllReadFramebuffer = AllReadFramebufferNV; this.AllDrawFramebuffer = AllDrawFramebufferNV; } } this.SupportsBlitFramebuffer = this.GLBlitFramebuffer != null; }
public OpenTKGraphicsDevice( INativeWindow window, IMgGraphicsConfiguration configuration, IGLFramebufferHelperSelector selector, IGLExtensionLookup extensions, IMgGraphicsDeviceLogger logger, IGLRenderer queueRenderer, IGLBackbufferContext bbContext ) { mGraphicsConfiguration = configuration; mView = new GLNullImageView(); mWindow = window; mExtensions = extensions; mLogger = logger; mSelector = selector; mQueueRenderer = queueRenderer; mBBContext = bbContext; // SHOULD BE HIDDEN mFramebuffers = new MgFramebufferCollection(mGraphicsConfiguration); }
public Es20GLFramebufferHelperSelector(IGLFramebufferSupport capabilities, IGLExtensionLookup lookup, IGLErrorHandler errHandler) { mCapabilities = capabilities; mLookup = lookup; mErrHandler = errHandler; }
public FullGLFramebufferSupport(IGLExtensionLookup extensions) { mExtensions = extensions; }