Skip to content

Commit

Permalink
Add a protected constructor to Texture2D for use with SysTextures
Browse files Browse the repository at this point in the history
  • Loading branch information
kg committed Jan 1, 2025
1 parent 5418901 commit f533a29
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions src/Graphics/Texture2D.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,11 +123,22 @@ SurfaceFormat format
);
}

#endregion
protected Texture2D (
GraphicsDevice graphicsDevice, int width, int height, int levelCount, SurfaceFormat format, IntPtr texture
) {
GraphicsDevice = graphicsDevice;
Width = width;
Height = height;
LevelCount = levelCount;
Format = format;
this.texture = texture;
}

#endregion

#region Public SetData Methods
#region Public SetData Methods

public void SetData<T>(T[] data) where T : struct
public void SetData<T>(T[] data) where T : struct
{
SetData(
0,
Expand Down

0 comments on commit f533a29

Please sign in to comment.