Ogre::ManualObject - texture coord for Vector4
- bishopnator
- Gnome
- Posts: 395
- Joined: Thu Apr 26, 2007 11:43 am
- Location: Slovakia / Switzerland
- x 18
Ogre::ManualObject - texture coord for Vector4
Hi, I think, that Ogre::ManualObject should have method for adding texture coordinates as Ogre::Vector4. Ofcourse this method is useless for fixed pipeline, but for materials using vertex/fragment programs it is useful for adding special informations to vertices.
- bishopnator
- Gnome
- Posts: 395
- Joined: Thu Apr 26, 2007 11:43 am
- Location: Slovakia / Switzerland
- x 18
- madmarx
- OGRE Expert User

- Posts: 1671
- Joined: Mon Jan 21, 2008 10:26 pm
- x 51
Hi,
Here is your answer :
http://www.ogre3d.org/phpBB2/viewtopic. ... 6f4e2718c6
Just to make sure, do you speak from the homogeneous coordinate system ?
what I mean by homogeneous coordinate system :
4-component vector as vertex position
-> infinite/finite positions. because a 4 component vector as vertex position as a very clear meaning : (a,b,c,d) is at the same position in space than (a/d,b/d,c/d, 1) if d!=0. If d==0 the point is at an infinite position along the vector a,b,c.
4-component texture coordinates
-> are also used in the fixe pipeline. You can't do everything you want with this because it has also an extremely clear meaning.
http://developer.nvidia.com/object/Proj ... pping.html
Here is your answer :
http://www.ogre3d.org/phpBB2/viewtopic. ... 6f4e2718c6
Just to make sure, do you speak from the homogeneous coordinate system ?
what I mean by homogeneous coordinate system :
4-component vector as vertex position
-> infinite/finite positions. because a 4 component vector as vertex position as a very clear meaning : (a,b,c,d) is at the same position in space than (a/d,b/d,c/d, 1) if d!=0. If d==0 the point is at an infinite position along the vector a,b,c.
4-component texture coordinates
-> are also used in the fixe pipeline. You can't do everything you want with this because it has also an extremely clear meaning.
http://developer.nvidia.com/object/Proj ... pping.html
- nullsquared
- Old One
- Posts: 3245
- Joined: Tue Apr 24, 2007 8:23 pm
- Location: NY, NY, USA
- x 11
- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact:
- bishopnator
- Gnome
- Posts: 395
- Joined: Thu Apr 26, 2007 11:43 am
- Location: Slovakia / Switzerland
- x 18
Hi every one 
madmarx:
I wrote 'useless for fixed pipeline' only for method for adding 4-component texture coord because it is impossible to create 4D texture. In programmable pipeline you can use xy components for looking into one texture and zw component into another textures (or you can use zw for different purpose).
Adding 4-component position is also good for using additional informations in 'w' component in vertex shaders. In fixed pipeline I am not sure if it has some usage - I never need it.
(nullsquared said the same as me - I had vacation so sorry for late answer).
Thanks sinbad for queueing these tasks.
Creating own vertex buffer (and vertex declaration) is possible but using ManualObject is easier - it handles also creating VertexData and IndexData

madmarx:
I wrote 'useless for fixed pipeline' only for method for adding 4-component texture coord because it is impossible to create 4D texture. In programmable pipeline you can use xy components for looking into one texture and zw component into another textures (or you can use zw for different purpose).
Adding 4-component position is also good for using additional informations in 'w' component in vertex shaders. In fixed pipeline I am not sure if it has some usage - I never need it.
(nullsquared said the same as me - I had vacation so sorry for late answer).
Thanks sinbad for queueing these tasks.
Creating own vertex buffer (and vertex declaration) is possible but using ManualObject is easier - it handles also creating VertexData and IndexData
