18.09.2020
+ Textures ~ Changed 2D coordnate system to lower right as XY+
This commit is contained in:
parent
589d131246
commit
a603ecc417
26 changed files with 267 additions and 16 deletions
|
|
@ -1,6 +1,7 @@
|
|||
using OpenTK;
|
||||
using OpenTK.Graphics;
|
||||
using OpenTK.Graphics.OpenGL4;
|
||||
using SM.OGL.Texture;
|
||||
|
||||
namespace SM.OGL.Shaders
|
||||
{
|
||||
|
|
@ -160,5 +161,14 @@ namespace SM.OGL.Shaders
|
|||
public void SetMatrix4(int count, float[] value, bool transpose = false) { GL.UniformMatrix4(Location, count, transpose, value); }
|
||||
|
||||
#endregion
|
||||
|
||||
public void SetTexture(TextureBase texture) => SetTexture(texture, Parent.NextTexture++);
|
||||
|
||||
public void SetTexture(TextureBase texture, int texturePos)
|
||||
{
|
||||
GL.ActiveTexture(TextureUnit.Texture0 + texturePos);
|
||||
GL.BindTexture(TextureTarget.Texture2D, texture);
|
||||
SetUniform1(texturePos);
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue