SFML community forums

General => Feature requests => Topic started by: Mr_Blame on August 19, 2015, 10:50:58 am

Title: Texture matrix
Post by: Mr_Blame on August 19, 2015, 10:50:58 am
Hello.

In OpenGL there are lots of matrixes for position transforming(e.g. projection, model and texture matrix).

So. We can use this texture matrix for some tricks  ;) e.g. this code will rotate texture not model that contains it:
//OpenGL 1.x style (aka fixed pipeline)

//select texture matrix
glMatrixMode(GL_TEXTUREMATRIX);

//rotate texture
glRotatef(45, 0, 0, 1);

//select model view matrix just in case
glMatrixMode(GL_MODEL_VIEW);
 
P.S. Later I will upload result screenshots. Also I heard about vertex arrays that contain tex cords but it will be maybe hard for some people to set them to make texture rotated. :D
Title: Re: Texture matrix
Post by: Laurent on August 19, 2015, 11:31:50 am
I don't think we'll add new features that use deprecated OpenGL stuff. You'd better switch to the modern way of doing this, i.e. using a shader.
Title: Re: Texture matrix
Post by: Mr_Blame on August 19, 2015, 11:43:13 am
Okay I understand it, sir.

Also little question in which far futureTM will SFML switch to modern OpenGL aka full graphics programming with shaders?
Title: Re: Texture matrix
Post by: Laurent on August 19, 2015, 11:46:29 am
Quote
Also little question in which far futureTM will SFML switch to modern OpenGL aka full graphics programming with shaders.
You might still be alive when it happens.
Title: Re: Texture matrix
Post by: Mr_Blame on August 19, 2015, 11:51:07 am
okay  ;D