Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Does Direct3D10/11 have immediate mode?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 leonard2012   Members   -  Reputation: 167

Like
0Likes
Like

Posted 02 May 2012 - 07:56 AM

I wonder if Direct3D10 or 11 has something similar to OpenGL immediate mode. I want to draw some simple geometric shapes (lines, simple convex polygons) without going into the trouble of creating vertex/index buffer, specifying input layout, topology etc.

Sponsor:

#2 Chris_F   Members   -  Reputation: 2719

Like
0Likes
Like

Posted 02 May 2012 - 08:07 AM

No, it doesn't. Neither does the OpenGL Core Profile.

It sounds like you might want to use the Direct2d API. It's immediate mode and can be used to draw lines and convex polygons.

Edited by Chris_F, 02 May 2012 - 08:07 AM.


#3 leonard2012   Members   -  Reputation: 167

Like
0Likes
Like

Posted 02 May 2012 - 09:09 AM

Thank you for your quick response Chris_F. My task is to implement rubberbanding with D3D in my application, that is, to draw some simple geometric shapes corresponding to the mouse movement. The geometric shape is changed so often that using the canonical way (creating vertex/index buffer, specifying input layout, topology for the shape) may not be a good idea. So what's the recommended method to do this?

#4 MJP   Moderators   -  Reputation: 14038

Like
0Likes
Like

Posted 02 May 2012 - 12:19 PM

You can create a single dynamic vertex + index buffer, and fill up their contents each frame. In fact it's pretty easy to wrap this up in an immediate mode-like API if you're so inclined.

Edited by MJP, 02 May 2012 - 12:19 PM.


#5 leonard2012   Members   -  Reputation: 167

Like
0Likes
Like

Posted 02 May 2012 - 06:18 PM

You can create a single dynamic vertex + index buffer, and fill up their contents each frame. In fact it's pretty easy to wrap this up in an immediate mode-like API if you're so inclined.

Thanks, I'll try this method.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS