PDA

View Full Version : 1d texturemapping



saline
10-25-2001, 04:25 PM
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

Bob
10-26-2001, 02:15 AM
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.

Wei
10-26-2001, 03:52 AM
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.

G
10-26-2001, 05:31 AM
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.

GameMaker
10-26-2001, 05:34 AM
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.

lonzo
10-26-2001, 10:18 AM
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.