Jump to content
  • Advertisement
Sign in to follow this  
blueshogun96

OpenGL Simulating OpenGL's Display List via Direct3D

This topic is 2444 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm trying to come up with a way to closely simulate OpenGL Display List functionality for Direct3D. IMO, Microsoft should have kept the IDirect3DExecuteBuffer interface available along side of the IDirect3DDeviceX::Draw[Indexed]Primitive[UP] methods of rendering to reduce this problem. So, something like a push buffer sounds desirable. Btw, anyone have any links as to how state blocks work? Thanks.

Share this post


Link to post
Share on other sites
Advertisement
Directx is a Object Oriented Api, not like Client-Server Opengl State Machine. What you want to do can be done using Index and Vertex Buffers, then pass the pointer to the device with SetStreamSource.

Share this post


Link to post
Share on other sites
Quote:
Original post by blueshogun96
IMO, Microsoft should have kept the IDirect3DExecuteBuffer interface available along side of the IDirect3DDeviceX::Draw[Indexed]Primitive[UP] methods of rendering to reduce this problem.

What problem are you trying to solve, exactly?

Share this post


Link to post
Share on other sites
What I'd like to be able to do is to render an entire scene with only one draw call similar to what you'd do in a Display List without having to use multiple draw calls. My problem is that I'm trying to simulate a push buffer using Direct3D. Anyone who's programmed for Xbox will understand what I mean. Sorry if I wasn't very clear before.

Share this post


Link to post
Share on other sites
Use Direct3D 11 if you want this functionality. It has this functionality in its device contexts, and can be used with D3D9, 10 and 11 level of hardware (though D3D9 functionality is limited to shader model 2b).

Share this post


Link to post
Share on other sites
Quote:
Original post by blueshogun96
What I'd like to be able to do is to render an entire scene with only one draw call similar to what you'd do in a Display List without having to use multiple draw calls. My problem is that I'm trying to simulate a push buffer using Direct3D. Anyone who's programmed for Xbox will understand what I mean. Sorry if I wasn't very clear before.


I was more interested in why you need to do things this way. Unless you're working with D3D11, DirectX doesn't really have an equivalent for this (and even then you still have to pay the draw call cost for the commands in that buffer, all you're really doing is deferring them until later) and there are generally a number of viable ways in which you can cut down on draw call count depending on what effect you're trying to achieve.

Hence, more info please?

Share this post


Link to post
Share on other sites
Alright, here goes...

I'm working on an Xbox emulator. One of the key features of Xbox is the PushBuffer. It works very similar to the OpenGL Display List and the DirectX 3 ExecuteBuffer. One of the biggest things effecting speed is the PushBuffer emulation, and in some ways, Direct3D is not sufficient to emulate it properly, or at all. I'm going to port this project to OpenGL later on as the NV2x hardware is very OpenGL oriented and contains many features that are exclusive to OpenGL.

Share this post


Link to post
Share on other sites
I agree that OpenGL is a good way to go, not only for functionality but because it's multiplatform. Still, DX11 would probably work well if you don't mind being limited to Windows Vista and 7.

Share this post


Link to post
Share on other sites

Use Direct3D 11 if you want this functionality. It has this functionality in its device contexts, and can be used with D3D9, 10 and 11 level of hardware (though D3D9 functionality is limited to shader model 2b).

Could you be specific? Which mechanism/function/interface does D3D 11 provide to simulate OpenGL display list?

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!