예제 #1
0
 public DrawBufferValue GetOrCreateDrawBufferTexture(DrawBufferKey key)
 {
     if (!_drawBufferTextures.ContainsKey(key))
     {
         _drawBufferTextures[key] = new DrawBufferValue(OpenglGpuImpl, key);
     }
     return(GetDrawBufferTexture(key));
 }
예제 #2
0
        public void BindCurrentDrawBufferTexture(GpuStateStruct *gpuState)
        {
            if (_cachedBindAddress != gpuState->DrawBufferState.Address)
            {
                GL.glFlush();
                GL.glFinish();

                _cachedBindAddress = gpuState->DrawBufferState.Address;
                var key = new DrawBufferKey()
                {
                    Address = gpuState->DrawBufferState.Address,
                    //Width = (int)GpuState->DrawBufferState.Width,
                    //Height = (int)272,
                };
                CurrentDrawBuffer?.Unbind();
                CurrentDrawBuffer = GetOrCreateDrawBufferTexture(key);
                CurrentDrawBuffer.Bind();
            }
        }
예제 #3
0
        public void BindCurrentDrawBufferTexture(GpuStateStruct* GpuState)
        {
            if (CachedBindAddress != GpuState->DrawBufferState.Address)
            {
                GL.glFlush();
                GL.glFinish();

                CachedBindAddress = GpuState->DrawBufferState.Address;
                var Key = new DrawBufferKey()
                {
                    Address = GpuState->DrawBufferState.Address,
                    //Width = (int)GpuState->DrawBufferState.Width,
                    //Height = (int)272,
                };
                if (CurrentDrawBuffer != null)
                {
                    CurrentDrawBuffer.Unbind();
                }
                CurrentDrawBuffer = GetOrCreateDrawBufferTexture(Key);
                CurrentDrawBuffer.Bind();
            }
        }
예제 #4
0
 public DrawBufferValue GetOrCreateDrawBufferTexture(DrawBufferKey Key)
 {
     if (!DrawBufferTextures.ContainsKey(Key)) DrawBufferTextures[Key] = new DrawBufferValue(OpenglGpuImpl, Key);
     return GetDrawBufferTexture(Key);
 }