Skip to main content
GameDev.net gamedev.net
🔒 Locked

OGL Vertex Array question

Started by tcs Dec 9, 2000 at 11:48 AM 0 replies 150+ views
Original Post
tcs
tcs
Hello ! I''m writing a terrain render with a static landscape. But the part of it that is visible is - of course - dynamic. So I thought it would be a good idea to put the whole landscape into a single big vertex buffer and specify my triangles with indexes. So I would just specify the big vertex buffer at the beginning and then just render the triangles that remain after my Octree frustrum culling. I know how to do this in D3D8. In OpenGL I''m a bit unsure. My biggest question is how to pass a second texture coordinate for multitexturing... Can anyone give me a brief overview on how to accomplish this goal ? Is it possible to use multitexturing in cominations with VBs ? Do I have to pass the indices in an array or can I specify them one-by-one ? I need to be sure that what I''m trying is possible and that I''m doing it the right way because it will some time to rewrite the engine to use vertes buffers... Thanks for your time. Tim -------------------------- glvelocity.gamedev.net www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
zedzeek
zedzeek
sorry no time to answer but heres some code

glVertexPointer (3, GL_FLOAT, 0, frames[frame].verts);
glLockArraysEXT (0, num_vertices);

glClientActiveTextureARB(GL_TEXTURE0_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer (2, GL_FLOAT, 0, tex_coordsA);
glActiveTextureARB(GL_TEXTURE0_ARB);

glClientActiveTextureARB(GL_TEXTURE1_ARB);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
glTexCoordPointer (2, GL_FLOAT, 0, tex_coordsB);
glActiveTextureARB(GL_TEXTURE1_ARB);

http://members.xoom.com/myBollux

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.