Exemple #1
0
        public GameContext(IWindow window, GameContextConfig pConfig)
            : base("Context")
        {
            m_pNativeContext = PlatformFactory.GetContext(window, pConfig);

            Register();
        }
Exemple #2
0
        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);
        }
Exemple #3
0
 public Context CreateContext(IGLNativeContext pContext)
 {
     return(new Context(this, m_pPlatform, pContext));
 }