13 lines
368 B
C#
13 lines
368 B
C#
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);
|
|
}
|
|
} |