Ogre & texture coordinates

Problems building or running the engine, queries about how to use features etc.
Post Reply
User avatar
killah
Gnoblar
Posts: 7
Joined: Sat Oct 09, 2004 1:00 pm

Ogre & texture coordinates

Post by killah »

Hello folks, I've got a little newbie question about specifying/modifying texture coordinates. When you load a mesh file, which has its own texture coordinates specified with your favourite 3D modelling program, which is the easiest way to modify those texture coords within your C++ code? examples will be very appreciated... :wink:

Thanks in advance and congratulations for this great engine and its addons :D
Try it and if you can't solve it... try again!
User avatar
haffax
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 4823
Joined: Fri Jun 18, 2004 1:40 pm
Location: Berlin, Germany
x 8
Contact:

Post by haffax »

hiho killah,
what do you want to achieve actually? Maybe this would help knowledgable users to answer.
team-pantheon programmer
creators of Rastullahs Lockenpracht
User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

The easiest way is not to do it at all. Unless all you want is scrolling/rotation/scaling (which you can specify in the material) you'll have to go the painful way of modifying the vertex buffers. But as I just see tanis wrote, you'll have to be more specific about what exactly you want to achieve.
User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

If all you want is a linear transformation like rotation, scaling, shearing etc, use the texture matrix. Otherwise, you could do the transformation inside a vertex program (fast) or write the vertex buffers from your C++ program (relatively slow)
User avatar
killah
Gnoblar
Posts: 7
Joined: Sat Oct 09, 2004 1:00 pm

Post by killah »

Whoa! you're really fast!! thanks again! :D

Well,possibly I won't need it, but I'm actually investigating how the engine works (material part specially) and I was curious about that.
Try it and if you can't solve it... try again!
Post Reply