How to draw textured and textureless objects simultaneously


  • I am new to D3D programming and learning the book "Introduction to 3D game programming with DirectX 10". Now I want to draw multiple graphics objects in the client area. Most of the objects including geometric shapes (lines, polygons), symbols are textureless, whereas a few objects such as terrain map, satellite images have textures. I don't know how to draw these textured and textureless objects at the same time. The examples in the book are proposed to render either textured objects, or textureless objects, but not both.
    It seems that I have to define separate data structures (vertex, vertex input layout, effects) for both categories. But what about pixel shader and vertex shader defined in effect file (.fx)? There has to be only one vertex shader and only one pixel shader in effect file.         
    Friday, April 27, 2012 4:48 AM