public GameContext(IWindow window, GameContextConfig pConfig) : base("Context") { m_pNativeContext = PlatformFactory.GetContext(window, pConfig); Register(); }
public Context(Device pDevice, Platform pPlatform, IGLNativeContext pContext) : base("Context_of_" + pDevice.Name, IntPtr.Zero) { m_pDevices = new Devices(); m_pDevices.Add(pDevice); IntPtr[] rawDevices = new IntPtr[m_pDevices.Count]; for (int i = 0; i < rawDevices.Length; i++) { rawDevices[i] = m_pDevices[i].RawHandle; } m_pHandle = cl.clCreateContext(new IntPtr[] { (IntPtr)CL.CONTEXT_PLATFORM, pPlatform.RawHandle, IntPtr.Zero }, (uint)m_pDevices.Count, rawDevices, IntPtr.Zero, IntPtr.Zero, out m_iErrorCode); cl.LoadExtensions(); Register(true); }
public Context CreateContext(IGLNativeContext pContext) { return(new Context(this, m_pPlatform, pContext)); }