-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathIGPUResourceFactory.cs
29 lines (20 loc) · 1.15 KB
/
IGPUResourceFactory.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// <copyright file="IGPUResourceFactory.cs" company="Software Antics">
// Copyright (c) Software Antics. All rights reserved.
// </copyright>
namespace FinalEngine.Rendering;
using System.Collections.Generic;
using FinalEngine.Rendering.Buffers;
using FinalEngine.Rendering.Pipeline;
using FinalEngine.Rendering.Textures;
public interface IGPUResourceFactory
{
IFrameBuffer CreateFrameBuffer(IReadOnlyCollection<ITexture2D>? colorTargets, ITexture2D? depthTarget = null);
IIndexBuffer CreateIndexBuffer<T>(BufferUsageType type, IReadOnlyCollection<T> data, int sizeInBytes)
where T : struct;
IInputLayout CreateInputLayout(IReadOnlyCollection<InputElement> elements);
IShader CreateShader(PipelineTarget target, string sourceCode);
IShaderProgram CreateShaderProgram(IReadOnlyCollection<IShader> shaders);
ITexture2D CreateTexture2D<T>(Texture2DDescription description, IReadOnlyCollection<T>? data, PixelFormat format = PixelFormat.Rgba, SizedFormat internalFormat = SizedFormat.Rgba8);
IVertexBuffer CreateVertexBuffer<T>(BufferUsageType type, IReadOnlyCollection<T> data, int sizeInBytes, int stride)
where T : struct;
}