moichi,
No, vertex textures share the same texture image units as normal textures.
The extension supports all texture types, but the GeForce 6 series hardware only supports 2D textures.
I’ve copied some example code below.
-Simon.
GLuint vertex_texture;
glGenTextures(1, &vertex_texture);
glActiveTextureARB(GL_TEXTURE0_ARB);
glBindTexture(GL_TEXTURE_2D, vertex_texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST_MIPMAP_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE_FLOAT32_ATI, width, height, 0, GL_LUMINANCE, GL_FLOAT, data);
!!ARBvp1.0
OPTION NV_vertex_program3;
PARAM mvp[4] = { state.matrix.mvp };
PARAM texmat[4] = { state.matrix.texture };
PARAM scale = program.local[0];
TEMP pos, displace;
// vertex texture lookup
TEX displace, texcoord, vertex.texcoord, 2D;
// try and do as much work here as possible that isn’t
// dependent on the texture lookup, to cover latency
MOV result.texcoord[0], texcoord;
MOV pos.w, 1.0;
// scale vertex along normal
MUL displace.x, displace.x, scale;
MAD pos.xyz, vertex.normal, displace.x, vertex.position;
// transform position to clip space
DP4 result.position.x, mvp[0], pos;
DP4 result.position.y, mvp[1], pos;
DP4 result.position.z, mvp[2], pos;
DP4 result.position.w, mvp[3], pos;
END;