Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: OBJ groups & Texture shading

  1. #1
    Junior Member Newbie
    Join Date
    Jun 2013

    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 ?

  2. #2
    Advanced Member Frequent Contributor
    Join Date
    Apr 2010
    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 ). 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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts