using Shader.CurrentTexture doesn't work, the square is still completely black.Have you fixed your shaders too?
I think you mean that i want to draw Shaders with the entity system, but i just switch the draw statement to the entity when i wanted to test that. If that is the case, sorry for being conusingI'm sorry but this is very unclear, I don't understand you :P
The shaders are also in the gist, at the bottom. or what do you mean fixing the shaders? :pI mean this:
You should also use the default shaders given in the tutorial, yours are lacking some stuff.
And maybe calling it system is kind of a stretch, but it's from this page: http://sfml-dev.org/tutorials/2.1/graphics-vertex-array.phpOk, I finally see what you're asking :P
About halfway down the page
//gl_Position = ftransform();
void main()
{
gl_Position = ftransform();
gl_TexCoord[0] = gl_TextureMatrix[0] * gl_MultiTexCoord0;
gl_FrontColor = gl_Color;
}
fraguniform sampler2D texture;
void main()
{
vec4 pixel = texture2D(texture, gl_TexCoord[0].st);
gl_FragColor = gl_Color * pixel;
}
Shader shader = new Shader( "media/shaders/basic.vert", "media/shaders/basic.frag" );
shader.SetParameter( "texture", Shader.CurrentTexture );
RenderStates rState = new RenderStates( shader );
rState.Texture = texture;