![]() |
|
multitexturing with interleaved-arrays? - Printable Version +- iDevGames Forums (http://www.idevgames.com/forums) +-- Forum: Development Zone (/forum-3.html) +--- Forum: Graphics & Audio Programming (/forum-9.html) +--- Thread: multitexturing with interleaved-arrays? (/thread-7317.html) |
multitexturing with interleaved-arrays? - <seb> - Feb 10, 2003 09:36 AM hi! i was drawing an interleaved array with a single texture, everything was fine and working, until i got the idea of using multitexturing. so i was defining two textures: - - - - - - - - - - - - - - - - glActiveTextureARB(GL_TEXTURE0_ARB); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, id1); glActiveTextureARB(GL_TEXTURE1_ARB); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, id2); glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE_ARB); glTexEnvi(GL_TEXTURE_ENV, GL_RGB_SCALE_ARB, 2); - - - - - - - - - - - - - - - - and rendered my terrain as before: - - - - - - - - - - - - - - - - glInterleavedArrays( GL_T2F_N3F_V3F, 0, VertexArray ); glDrawArrays( GL_TRIANGLE_STRIP, 0, NumVertices ); - - - - - - - - - - - - - - - - of course, the desired effect didnt appear. i need to call something like: - - - - - - - - - - - - - - - - glMultiTexCoord2fARB(GL_TEXTURE0_ARB, 0.5, 1.0); glMultiTexCoord2fARB(GL_TEXTURE1_ARB, 0.5, 1.0); - - - - - - - - - - - - - - - - but calling this function would mean to go away from my nice and fast vertex array, go back to working on every vertex on its own ... or is there a way to use an interleaved-array together with glMultiTexCoord2fARB ?? :)) sebastian multitexturing with interleaved-arrays? - Mark Levin - Feb 10, 2003 09:57 AM You can specify a seperate vertex array for each texture unit with gClientActiveTextureARB() (see the end of chapter 9 in the red book). multitexturing with interleaved-arrays? - <seb> - Feb 10, 2003 10:08 AM sorry, i cant find any docu on this .. dont have the red book either! can you be a little more specific please? :) multitexturing with interleaved-arrays? - <seb> - Feb 10, 2003 10:18 AM ah, i finally found sth and tried a little, and finally its working. thanks again!! seb |