drawIndexedTriangleList with no texture

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
barebones
Posts: 5
Joined: Sun Mar 23, 2008 4:07 pm

drawIndexedTriangleList with no texture

Post by barebones »

Hello,
I'm interested in drawing gouraud-shaded triangles (lots of them) in a custom SceneNode, using only the vertex colors + normals and lighting, with no texture. Where do I turn texturing off?

I am using drawIndexedTriangleList, with a SMaterial structure with type EMT_SOLID, and setTexture (0, 0). Up to now, I keep getting a grayshaded image, without the vertex colors. This can be reproduced in the distributed example 03.Custom SceneNode, if you set Material.Lighting = true and add some LightSceneNode.

. . .

As a second issue, I see in COpenGLDriver.cpp that drawVertexPrimitiveList will always emit texture coords (with glTextCoordPointer); I wonder if this is not a performance problem when you don't really want a texture.

Thank you
hybrid
Admin
Posts: 14143
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

I guess we need an "untextured material type" or some kind of flag which disbales texturing. Right now I kept passing the texture coords in order to allow shaders get them without the need to pass a texture as well.
Post Reply