public PlatformShaderProgram( PlatformRenderContext context, IPlatformShader[] shaders, ShaderProgram.AttribLocation[] attribLocations, ShaderProgram.Sampler[] samplers) { this.context = context; LinkProgram(shaders, attribLocations, samplers); }
public PlatformBuffer(PlatformRenderContext context, BufferType bufferType, int size, bool dynamic) { this.context = context; this.bufferType = bufferType; this.size = size; this.dynamic = dynamic; Create(); }
public PlatformRenderTexture2D(PlatformRenderContext context, Format format, int width, int height, TextureParams textureParams) : base(context, format, width, height, false, true, textureParams) { colorFormat = VulkanHelper.GetVKFormat(format); CreateDepthStencilBuffer(); CreateRenderPass(); CreateFramebuffer(); }
public Swapchain(PlatformRenderContext context, IntPtr windowHandle, int width, int height) { this.context = context; this.windowHandle = windowHandle; this.width = width; this.height = height; CreateSurface(); CreateSwapchain(); }
protected PlatformTexture2D(PlatformRenderContext context, Format format, int width, int height, bool mipmaps, bool renderTarget, TextureParams textureParams) { this.context = context; this.format = format; this.width = width; this.height = height; this.levelCount = mipmaps ? GraphicsUtility.CalculateMipLevelCount(width, height) : 1; Create(renderTarget); SetTextureParams(textureParams); }
private static ulong GetAlignmentForBufferUsage(PlatformRenderContext ctx, SharpVulkan.BufferUsageFlags usage) { ulong alignment = 1; if ((usage & SharpVulkan.BufferUsageFlags.UniformBuffer) != 0) { alignment = GraphicsUtility.CombineAlignment(alignment, ctx.PhysicalDeviceLimits.MinUniformBufferOffsetAlignment); } return(alignment); }
public BackingBuffer(PlatformRenderContext context, SharpVulkan.BufferUsageFlags usage, SharpVulkan.MemoryPropertyFlags memoryPropertyFlags, ulong size) { this.context = context; this.usage = usage; this.memoryPropertyFlags = memoryPropertyFlags; sliceSize = size; sliceAlignment = GetAlignmentForBufferUsage(context, usage); sliceCount = 1; CreateBuffer(); sliceOffset = sliceQueue.Dequeue().Offset; }
private void SetupContextAndFramebuffer() { if (mgleaglContext == null) { ConfigureLayer(); try { mgleaglContext = new EAGLContext(EAGLRenderingAPI.OpenGLES3); } catch { mgleaglContext = new EAGLContext(EAGLRenderingAPI.OpenGLES2); } MakeCurrent(); renderContext = new PlatformRenderContext(); PlatformRenderer.Initialize(renderContext); } DestroyFramebuffer(); CreateFramebuffer(); }
public PipelineCache(PlatformRenderContext context) { Context = context; NativePipelineCache = CreateNativePipelineCache(Array.Empty <byte>()); }
public PlatformTexture2D(PlatformRenderContext context, Format format, int width, int height, bool mipmaps, TextureParams textureParams) : this(context, format, width, height, mipmaps, false, textureParams) { }
public PlatformVertexInputLayout( PlatformRenderContext context, VertexInputLayoutBinding[] bindings, VertexInputLayoutAttribute[] attributes) { Bindings = (VertexInputLayoutBinding[])bindings.Clone(); Attributes = (VertexInputLayoutAttribute[])attributes.Clone(); }
public DescriptorAllocator(PlatformRenderContext context, DescriptorPoolLimits poolLimits) { this.context = context; this.poolLimits = poolLimits; pool = AcquireDescriptorPool(); }
public PlatformShader(PlatformRenderContext context, ShaderStageMask stage, string source) { this.context = context; Stage = stage; Create(source); }
public Scheduler(PlatformRenderContext context) { this.context = context; }
public UploadBufferAllocator(PlatformRenderContext context, ulong initialBufferSize) { this.context = context; CreateBuffer(initialBufferSize); }
public SamplerCache(PlatformRenderContext context) { this.context = context; }
public MemoryAllocator(PlatformRenderContext context, bool preferPersistentMapping) { Context = context; PreferPersistentMapping = preferPersistentMapping; Initialize(); }