Results 1 to 5 of 5

Thread: [D3D] Mixing 2d and 3d

  1. #1

    [D3D] Mixing 2d and 3d

    Hi all

    I already know 2 ways of drawing 2d using D3D:
    Those are:

    ** Using Transformed Vertices.
    ** Using The Orthographic Perspecitve

    These are mentioned in this thread.
    Now i want my engine to be able to mix up 2d and 3d in the same scene.

    For 2d i can used Transformed vertices and for the 3d Untransformed and Unlit vertices.
    So i need a way to use different vertex types in one render- sequence.

    I tried calling SetPixelShader but it seems to raise an AV in D3D8.DLL when its called between beginscene and endscene.

    Can someone explain me how to Mix 2d with 3d in the same scene, how do you guys do this

    Thanx in advance.
    Chronozphere[/url]
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  2. #2

    [D3D] Mixing 2d and 3d

    Calling SetPixelShader between BeginScene / EndScene is OK. So you should look at bugs in your code.
    There are only 10 types of people in this world; those who understand binary and those who don't.

  3. #3

    [D3D] Mixing 2d and 3d

    Check if you have correctly built your vertex data. This is one of the things Direct3D doesn't check and may cause AV.
    blog: http://alexionne.blogspot.com/

  4. #4

    [D3D] Mixing 2d and 3d

    Actually checking for bogus data inside index buffer - is a WHQL requirenment, so at this side everything should be OK (depending on that video driver you are using)
    There are only 10 types of people in this world; those who understand binary and those who don't.

  5. #5

    [D3D] Mixing 2d and 3d

    aaaarrrghh... It seems that i mixed up SetVertexData and SetPixelData... silly me ops: ops:

    However... Thanx for pointing me to the right direction.

    P.S Srry that i couldn't post this earlier.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •