Jump to content
  • Advertisement
Sign in to follow this  
Amgatroid

repositioning individual vertexes in a vertexBuffer

This topic is 4090 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

Advertisement
ohh a free book on graphics. Its just been semester start so im on a thight budget so atm i cant afford any more books :(

So a free one is much appriciate. Thx Legalize.
I see its for C++, but the theroy should be the same for C# i guess.

Share this post


Link to post
Share on other sites
no, i need an example of opening up a vertex buffer and repositioning the individual vertex positions. I use the directX 9 sdk.(because it works on windows down to version 2000)

Share this post


Link to post
Share on other sites
Quote:
Original post by Amgatroid
no, i need an example of opening up a vertex buffer and repositioning the individual vertex positions. I use the directX 9 sdk.(because it works on windows down to version 2000)


Go to your DX sample browser, and check out the "Textures" sample. They create a vertex buffer, and fill the buffer with values for each vertex via the Lock/Unlock functions.

Share this post


Link to post
Share on other sites
Quote:
Original post by Amgatroid
ok i got it, thanks, now i need to use direct input for keyboard input


Why are you using DirectInput for keyboard input? Its something Microsoft actually recommends against, since it creates a separate thread to parse raw input messages. You should look into handling raw input yourself, its actually simpler than working with DirectInput (IMO).

Share this post


Link to post
Share on other sites
Ah, it's been at least a week since someone suggested using DirectInput for keyboard or mouse input [smile]

So....

Reasons against using DirectInput for keyboard input:
  • It creates a seperate thread to just read data from the keyboard using raw input (Which you can do yourself with Win32), meaning there's more overhead than just doing it yourself.
  • No support for keyboard repeat at the rate the user has set in the control pannel - you have to re-invent this yourself. Not too bad for game input, but a pain for GUI-style text input.
  • No support for capital letters and shifted characters - you have to detect caps lock / shift being held as well as your normal character.
  • No support for caps lock on/off; it's handled by a higher layer than DirectInput, so if someone starts your game with caps lock on, it gets confused.
  • More code to get the same effect as Window Messages.
  • It's actually recommended that you DON'T use it by Microsoft; Link:
    Quote:
    Overall, using DirectInput offers no advantages when reading data from mouse or keyboard devices, and the use of DirectInput in these scenarios is discouraged.

    Share this post


    Link to post
    Share on other sites
    Quote:
    Original post by Amgatroid
    no, i need an example of opening up a vertex buffer and repositioning the individual vertex positions. I use the directX 9 sdk.(because it works on windows down to version 2000)


    What are you trying to achieve by editing the vertex buffer?

    Tell me the goal, not the task by which you expect to accomplish the goal.

    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!