LexManos
08-12-2010 03:21:48
This is probably a general Ogre question/really stupid.
But I can't seem to get textures to work right with Manual Objects.
Try to have it display the Ogre Eye texture that comes with the default download. And I get a solid pink square.
I'm new, but I've tried poking around but obviously still stumped. If someone could point me in the direction that would be great, I don't want to make external meshes and texture them in other programs, I know that works. I want to be able to make textured primitives pragmatically.
But I can't seem to get textures to work right with Manual Objects.
ManualObject manual = mSceneManager.CreateManualObject();
manual.Begin("Ogre/Eyes", RenderOperation.OperationTypes.OT_TRIANGLE_STRIP);
manual.Position(-100.0f, -100.0f, 0.0f);
manual.Position( 100.0f, -100.0f, 0.0f);
manual.Position( 100.0f, 100.0f, 0.0f);
manual.Position(-100.0f, 100.0f, 0.0f);
manual.Index(0);//Front Side
manual.Index(1);
manual.Index(2);
manual.Index(3);
manual.Index(0);//Back Side
manual.Index(1);
manual.End();
SceneNode n1 = mSceneManager.RootSceneNode.CreateChildSceneNode();
n1.AttachObject(manual);
Fairly straight forward, I create a 2d 2 sided square out of 4 triages. Try to have it display the Ogre Eye texture that comes with the default download. And I get a solid pink square.
I'm new, but I've tried poking around but obviously still stumped. If someone could point me in the direction that would be great, I don't want to make external meshes and texture them in other programs, I know that works. I want to be able to make textured primitives pragmatically.