OBJ groups & Texture shading

The OBJ file format can break the object down into a series of groups. I tried creating multiple element buffers based on the number of groups found in the OBJ file. I then sequentially issued a draw() on each element buffer. The object did not draw correctly.

I guess the overriding question is, if there are multiple textures and texture specifications for a given OBJ file, whats the best way to implement this in OpenGL ?

Splitting the rendering of an object into multiple draw calls in order to switch textures (or other state) in between is on option (probably most general and easiest to implement, so best in that sense :wink: ). You could bind multiple textures (or use array textures) and draw groups of sub-objects at once, but then you’d need to add a vertex attribute to distinguish which texture to use for each face.
For help to figure out why your multiple draw calls approach is not working you’ll have to supply more details of course :slight_smile: