Results 1 to 8 of 8

Thread: Multiple directx 8 at 1 time

  1. #1

    Thread Starter
    Frenzied Member Ultimasnake's Avatar
    Join Date
    Feb 2002
    Location
    Amsterdam, holland
    Posts
    1,172

    Multiple directx 8 at 1 time

    I am wondering if it is possible to render 2 diffrent things at the same time with direct x 8 (like what editors like unrealed do) i tried to do it with 2 directx 8 loops but only 1 at a time seemed to work.. how can i make a engine so that i can make a "multiple" view kinda program? (like 2 views in 2 seperate picture boxes)
    For my PC and MS Smartphone 2003 software visit
    http://www.ultimasoftware.nl

  2. #2
    PowerPoster Fox's Avatar
    Join Date
    Jan 2000
    Location
    *afk*
    Posts
    2,088
    I assume you mean multiple viewports?

  3. #3
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Easiest way is probably to render the scene as normal, then use the hWnd parameter of the Present method to display to the pixturebox/form/whatever you want. Repeat for each viewport.

    You could also use swap chains.

    Z.

  4. #4

    Thread Starter
    Frenzied Member Ultimasnake's Avatar
    Join Date
    Feb 2002
    Location
    Amsterdam, holland
    Posts
    1,172
    Well i made this dll that can render 3d stuff in direct x 8 . declare the modules in the dll double and then let them be analyzed both load the models. and then draw them in a While loop. But only 1 of them is shown :S
    For my PC and MS Smartphone 2003 software visit
    http://www.ultimasoftware.nl

  5. #5

    Thread Starter
    Frenzied Member Ultimasnake's Avatar
    Join Date
    Feb 2002
    Location
    Amsterdam, holland
    Posts
    1,172
    here is the test project i was running to just see if i could make it work included is my own dx8 engine.. it is fairly easy but it works perfectly up to now (you might want to run regsvr32.exe over the dll file )
    Attached Files Attached Files
    For my PC and MS Smartphone 2003 software visit
    http://www.ultimasoftware.nl

  6. #6
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    From DX8.1 SDK:
    Note All rendering devices created by a given Microsoft® Direct3D® object share the same physical resources. Although your application can create multiple rendering devices from a single Direct3D object, because they share the same hardware, extreme performance penalties will be incurred.
    Z.

  7. #7

    Thread Starter
    Frenzied Member Ultimasnake's Avatar
    Join Date
    Feb 2002
    Location
    Amsterdam, holland
    Posts
    1,172
    ok so i should use 1 "Public D3DDevice As Direct3DDevice8" and multiple
    "Public D3D As Direct3D8"
    "Public D3DX As D3DX8"
    ???
    For my PC and MS Smartphone 2003 software visit
    http://www.ultimasoftware.nl

  8. #8
    Frenzied Member Zaei's Avatar
    Join Date
    Jul 2002
    Location
    My own little world...
    Posts
    1,710
    Use no multiples:
    Code:
    For i = 0 to numViewports -1
      ...Clear(...)
      'render port i
      ...Present(..., Viewports(i).hWnd,...)
    Next i
    Z.

Posting Permissions

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



Click Here to Expand Forum to Full Width