mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Textures can now hold SamplerStates
This commit is contained in:
@@ -69,7 +69,6 @@ namespace Sandbox
|
||||
GraphicsContext _context ~ _?.ReleaseRef();
|
||||
|
||||
Texture2D _texture ~ _?.ReleaseRef();
|
||||
SamplerState _sampler ~ _?.ReleaseRef();
|
||||
|
||||
private Vector3 CircleCoord(float angle)
|
||||
{
|
||||
@@ -195,11 +194,14 @@ namespace Sandbox
|
||||
|
||||
_texture = new Texture2D(_context, "content/Textures/Checkerboard.dds");
|
||||
|
||||
_sampler = new SamplerState(_context,
|
||||
let sampler = new SamplerState(_context,
|
||||
SamplerStateDescription()
|
||||
{
|
||||
MagFilter = .Point
|
||||
});
|
||||
|
||||
_texture.SamplerState = sampler;
|
||||
sampler.ReleaseRef();
|
||||
}
|
||||
|
||||
public override void Update(GameTime gameTime)
|
||||
@@ -269,7 +271,6 @@ namespace Sandbox
|
||||
_cBuffer.Update();
|
||||
|
||||
_texture.Bind();
|
||||
_sampler.Bind();
|
||||
|
||||
Renderer.Submit(_geometryBinding, _effect);
|
||||
Renderer.Submit(_quadGeometryBinding, _textureEffect, .Scaling(1.5f));
|
||||
|
||||
Reference in New Issue
Block a user