View Full Version : Static geometry dynamic texture coords
I have a grid which I would like to draw a texture on, the grids coords are static but the texture coords are dynamic. Is it possible to use CVAs and only lock the vertices? or should I use VAR and only move the vertices to AGP-mem once and then just update the texcoords?
It isnt possible to use diplaylists and apply texcoords like GL does with sheremap and the others right?
Or are there any other fast methods?
Thanks in advance/sb
Depending on what you want to do, the texture matrix may do everything you need (and its fast).
Its descripted in the red book chapter 9 if I am not mistaken.
02-03-2003, 10:10 AM
Texture coordinates can live somewhere other than the position, if you want (although in VAR, they both have to live in the VAR).
This means you don't need to interlace your vertex formats. Set your vertex pointer to point at one array, and your texture pointer to point at another array. When you want to change the texture coordinate data, write new data to a third array (or maybe it already lives there :-) and re-specify only the TexCoordPointer.
LockArraysEXT() will known to re-compile the vertex arrays necessary when you call xxxPointer() while the arrays are still locked. (I'm sure this is one reason for Matt's pet peeve being this extension :-)
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.