Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Question of indexbuffer with matrix

havechavec Member Posts: 1
Hi everyone,
this question make me so depressed. I want to draw a cube with vertexbuffer and indexbuffer. Its ok, but now I want to use Matrix to make cube transformation. The matrix dont work now. I cant use Worldmatrix make transformation, also use View- and ProjMatrix to change Viewport.
( use function DrawIndexedPrimitive([color=Red]D3DPT_TRIANGLELIST[/color], .......) )No matter how set this three matrix, I can only see one face of cube and this cube is forever in the left-up corner.

But if I render other primitives without indexbuffer, its ok.
( use function DrawPrimitive([color=Red]D3DPT_TRIANGLESTRIP[/color], .......) )
Why?

I must work out every vertex position with matrix selbst when I use indexbuffer? Or maybe I forget something to set?


Comments

  • gautamgautam Member Posts: 642
    Whether its Index buffers or vertex buffers it works the same. So if you can show me the code how you are doing it I can tell you what you are doing wrong.

    It could be weird if your index buffer is wrong.

    : Hi everyone,
    : this question make me so depressed. I want to draw a cube with
    : vertexbuffer and indexbuffer. Its ok, but now I want to use Matrix
    : to make cube transformation. The matrix dont work now. I cant use
    : Worldmatrix make transformation, also use View- and ProjMatrix to
    : change Viewport.
    : ( use function
    : DrawIndexedPrimitive([color=Red]D3DPT_TRIANGLELIST[/color], .......)
    : )No matter how set this three matrix, I can only see one face of
    : cube and this cube is forever in the left-up corner.
    :
    : But if I render other primitives without indexbuffer, its ok.
    : ( use function DrawPrimitive([color=Red]D3DPT_TRIANGLESTRIP[/color],
    : .......) )
    : Why?
    :
    : I must work out every vertex position with matrix selbst when I use
    : indexbuffer? Or maybe I forget something to set?
    :
    :
    :
Sign In or Register to comment.