Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 6 of 6

Thread: 1d texturemapping

  1. #1
    Junior Member Newbie
    Join Date
    Oct 2001
    Posts
    2

    1d texturemapping

    I love using 1d texture mapping in
    my projects. It is great for
    contouring data.
    However I need to know the answer
    to this question.
    Is it possible to texture one quad with
    multiple 1dtexture values accross it.

    currently I am building a large quad with
    2500 seperate quads and for every vertex
    assigning a texture value. Can I draw one large quad and assign a texture value at the verticies if the verticies are not there??
    hope this makes sense to someone.
    TIA

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Feb 2000
    Location
    Sweden
    Posts
    2,982

    Re: 1d texturemapping

    You can apply more than one texture to primitives using multitexturing. Don't expect to be able to use as many textures as you like, cause most comsumer level implementations don't allow more than two textures at once. Some more advanced hardware might support a few more textures.

    And that second question doesn't make much sense to me. Do you want to assign texture coordinates to vertices without having any vertices?

    Texture coordinates are specified per vertex only, and if you don't have any vertices, you cannot specify any texture coorodinates. On the other hand, if you don't have any vertices you cannot draw any primitives at all.

  3. #3
    Junior Member Newbie
    Join Date
    Oct 2001
    Location
    Brighton, MA, USA
    Posts
    21

    Re: 1d texturemapping

    Hi Saline. I am currently doing the contour ploting and I am planing to use 1d texture mapping. But I don't know where to start with 1d texture. Can you give me some tips like what the basic precedure that I have to follow so on...if you have some simples that i can share. that will be great. Thanks alot.

  4. #4
    Junior Member Newbie
    Join Date
    Jun 2003
    Location
    ny
    Posts
    7

    Re: 1d texturemapping

    Originally posted by Wei:
    Hi Saline. I am currently doing the contour ploting and I am planing to use 1d texture mapping. But I don't know where to start with 1d texture. Can you give me some tips like what the basic precedure that I have to follow so on...if you have some simples that i can share. that will be great. Thanks alot.

  5. #5
    Intern Contributor
    Join Date
    Apr 2002
    Posts
    94

    Re: 1d texturemapping

    If I understand what your are trying to do...It seems as though you want to take samples from your data and store them in a buffer and then display that on 1 quad. This sounds the same as building your own texture on the fly and then using that texture on the quad. That is the way I would do it.
    P4 2Ghz, GEFORCE4, 512 Meg RAM, WIN2000, VStudio 6.0

  6. #6
    Junior Member Newbie
    Join Date
    Oct 2001
    Posts
    10

    Re: 1d texturemapping

    to do contouring:

    1) read all tutorials on 2d textures and use GL_TEXTURE1D instead.
    2) create a 1x256 color bitmap with the colors you want ie rainbow.
    3) give every vertex its scalar value it represents. This value should be scaled between 0 and 1 because this is how openGL references the bitmap.
    thats about it.

Posting Permissions

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