Results 1 to 8 of 8

Thread: multitexturing with out having to blend meshes?

  1. #1
    Member Contributor
    Join Date
    Apr 2005
    Posts
    85

    multitexturing with out having to blend meshes?

    i want to have my model with 2 textures blended but heck i dont want to render the model twice and blend them thats absolutely stupid ! can it be done by just blending the textures?

  2. #2
    Senior Member Frequent Contributor ehsan2004's Avatar
    Join Date
    Jun 2004
    Location
    Iran
    Posts
    645

    Re: multitexturing with out having to blend meshes?

    Originally posted by bansheeogl:
    i want to have my model with 2 textures blended but heck i dont want to render the model twice and blend them thats absolutely stupid ! can it be done by just blending the textures?
    use from the multitexturing functions.In this case you don't need to render a model twice.
    -Ehsan-

  3. #3
    Member Contributor
    Join Date
    Apr 2005
    Posts
    85

    Re: multitexturing with out having to blend meshes?

    how do i multitexture ??
    i have a sphere i want to apply a texture for that and apply a sphere map over that so it looks shiny but i dont want to render the sphere two times because its stupid to do that i think

    i just want to do that but i dont seem to understand multi textures

  4. #4
    Senior Member Regular Contributor
    Join Date
    Jan 2004
    Posts
    314

    Re: multitexturing with out having to blend meshes?

    Use glActiveTexture to set the texture unit to use - GL_TEXTURE0_ARB, GL_TEXTURE1_ARB etc.

    Use glBindTexture to set the texture for the unit.

    Use glMultiTexCoord to specify texture coordinates for the texture units.
    Or, if you use vertex arrays, use glClientActiveTexture before you assign texture coordinate arrays. (There are multiple texcoord arrays possible, and this is the way to tell OGL which one you're specifiying)

  5. #5
    Member Contributor
    Join Date
    Apr 2005
    Posts
    85

    Re: multitexturing with out having to blend meshes?

    aww seems harder than i though t

    i have the uvs in an array i must send all that ?

  6. #6
    Senior Member Regular Contributor
    Join Date
    Jan 2004
    Posts
    314

    Re: multitexturing with out having to blend meshes?

    Hard? It's just four new calls, and you need only three. (There are extra calls for more advanced stuff, but that's not what you asked about)

    Normal texturing uses glTexCoord, but doesn't allow you to specify coordinates for other texture units. So you need to replace it with glMultiTexCoord.

    If you're using vertex arrays, you're already using glTexCoordPointer. Multitexturing just requires you to issue a glClientActiveTexture before specifying another texture coordinate array.

  7. #7
    Member Contributor
    Join Date
    Apr 2005
    Posts
    85

    Re: multitexturing with out having to blend meshes?

    im from portugal so watching a small sample in c++ can explain me more than 1000 words because it is easier that way to me

    do you know some site where i can get an example on this ? thanks

  8. #8
    Super Moderator OpenGL Lord
    Join Date
    Dec 2003
    Location
    Grenoble - France
    Posts
    5,574

    Re: multitexturing with out having to blend meshes?

    search for "MULTITEXTURE & LIGHTMAP" :
    http://www.morrowland.com/apron/tut_gl.php

    both article and zipped source code.

Similar Threads

  1. VAO/VBO for meshes
    By Avithohol in forum OpenGL: Basic Coding
    Replies: 13
    Last Post: 08-17-2011, 02:44 AM
  2. How do I do meshes?
    By djbuzzkill in forum OpenGL: Basic Coding
    Replies: 4
    Last Post: 01-25-2002, 09:47 PM
  3. how to use depth buffer to blend two meshes
    By Descartes in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 05-04-2001, 07:44 AM
  4. Meshes
    By tdavie in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 11-16-2000, 08:44 PM
  5. 2D meshes in 3D
    By Lucretia in forum OpenGL: Advanced Coding
    Replies: 0
    Last Post: 10-16-2000, 05:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean