goruka
07-24-2007, 04:46 PM
I want to use separate buffers for the vertex arrays, like in OpenGL. One for vertices, another for normals, another for UV, and finally one for colors.
From what i've been reading, it is possible,but really confusing to me (since every single tutorial and even microsoft docs don't seem to believe people will do that)
Basically, from what I see is that I have to create a VertexBuffer for vertices, another for normals, another for UVs, etc, and when using "setStreamSource" I have to use stream 0, stream 1, stream 2, etc. for each,
yet, i can't seem to figure out how to do this fully. If i render multiple objects, many may lack some arrays (color, UV, etc), that the previous object rendered... then carry the one from the previous object, since i suppose it will be still active... (as in, can it be disabled after rendering? or specify how many am i using?)
So my question is:
-Is it really possible to have streams not containing vertices? (only uv/etc)
-How do I switch streamsources on/off ?
-Where do I specify how many streams am I using?
-What happens if i want to have many UV layers? how do i specify which vertexbuffer with uvs goes to which layer?
-What happens if i have more than one vertex array, normal array (as in, purposedly setting some info twice) just to know what happens...
well, that's basically it, Thanks in advance!
From what i've been reading, it is possible,but really confusing to me (since every single tutorial and even microsoft docs don't seem to believe people will do that)
Basically, from what I see is that I have to create a VertexBuffer for vertices, another for normals, another for UVs, etc, and when using "setStreamSource" I have to use stream 0, stream 1, stream 2, etc. for each,
yet, i can't seem to figure out how to do this fully. If i render multiple objects, many may lack some arrays (color, UV, etc), that the previous object rendered... then carry the one from the previous object, since i suppose it will be still active... (as in, can it be disabled after rendering? or specify how many am i using?)
So my question is:
-Is it really possible to have streams not containing vertices? (only uv/etc)
-How do I switch streamsources on/off ?
-Where do I specify how many streams am I using?
-What happens if i want to have many UV layers? how do i specify which vertexbuffer with uvs goes to which layer?
-What happens if i have more than one vertex array, normal array (as in, purposedly setting some info twice) just to know what happens...
well, that's basically it, Thanks in advance!