.
This commit is contained in:
13
Engine/Renderer/Texture/StaticTexture.cs
Normal file
13
Engine/Renderer/Texture/StaticTexture.cs
Normal file
@@ -0,0 +1,13 @@
|
||||
using Engine.Renderer.Pixel;
|
||||
using OpenTK.Graphics.OpenGL;
|
||||
|
||||
namespace Engine.Renderer.Texture;
|
||||
|
||||
public class StaticTexture<T> : Texture<T> where T : struct, IPixel
|
||||
{
|
||||
public StaticTexture(int width, int height) : base(width, height)
|
||||
{
|
||||
var format = default(T).SizedInternalFormat;
|
||||
GL.TextureStorage2D(Handle, 1, format, Width, Height);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user