public DrawBufferValue GetOrCreateDrawBufferTexture(DrawBufferKey key) { if (!_drawBufferTextures.ContainsKey(key)) { _drawBufferTextures[key] = new DrawBufferValue(OpenglGpuImpl, key); } return(GetDrawBufferTexture(key)); }
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(); } }
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(); } }
public DrawBufferValue GetOrCreateDrawBufferTexture(DrawBufferKey Key) { if (!DrawBufferTextures.ContainsKey(Key)) DrawBufferTextures[Key] = new DrawBufferValue(OpenglGpuImpl, Key); return GetDrawBufferTexture(Key); }