Game Development for Xbox 360, PC + Windows Phone 7

VertexBuffer - ALittle More Info

rated by 0 users
Answered (Verified) This post has 1 verified answer | 5 Replies | 2 Followers

Top 10 Contributor
Male
21 Posts
garfbradaz posted on 17 Aug 2010 3:24 PM

Hi Chad,


Firstly let me congratulate you on your book excellent (3.0 version). It is so satisfying to read a book that starts from 3D first. I have started C# about 15 weeks ago, and me a couple of colleagues started a little competition to learn to make a game in 8Weeks to learn and develop our skills:

 

http://8weekgame.shawson.co.uk/

 

We finished the games and was a success. I learnt loads from online tutorials and another book "Learning XNA..." which was good. Using the knowledge i have already built up i took the plunge and purchased yours. I thought 3D would be daunting, and it is! Im only on Chapter 4 and lot of concepts i have to re-read to grasp, but im taking it slow so i can take it in. Anyway, i have a question pertaining to the Vertext Buffers (Page 75). NOw i know Vertext Buffers are lists in memory to hold arrays of vertices, which is good. Just one question, is that memory used the Graphic Cards or normal onboard motherboards (Same question for Xbox and PC).

 

Im just wanting to cement my knowledge before moving on.


Cheers Chad :)

Answered (Verified) Verified Answer

Top 10 Contributor
Male
135 Posts

I'm glad you are enjoying the book!  Sorry it took me a little while to respond - this week has been busy.

You may find this powerpoint interesting:

http://gpgpu.org/static/s2005/slides/lefohn.MemoryModelOverview.ppt

 

All Replies

Top 10 Contributor
Male
135 Posts

I'm glad you are enjoying the book!  Sorry it took me a little while to respond - this week has been busy.

You may find this powerpoint interesting:

http://gpgpu.org/static/s2005/slides/lefohn.MemoryModelOverview.ppt

 

Top 10 Contributor
Male
21 Posts

This is very interesting Chad, much appreciated. Another question (sorry!) Does the Garbage Collection run against GPU as well then? Or is this handled by the Graphics Card it self? I only ask because i thought a GPU memory is write only? Or does that mean each scenes vertex data is overriitten.

Top 10 Contributor
Male
135 Posts

Garbage Collection is done by the .NET Framework.  So garbage collection is only done on the main machine's memory and not the GPU's memory.  The SetData call is overwriting the vertex buffer every time. 

Top 10 Contributor
Male
21 Posts

Thanks Chad, makes perfetc sense, thank you :)

Top 10 Contributor
Male
135 Posts

Here is some more information regarding vertex buffers and how they work now in 4.0. 

http://blogs.msdn.com/b/shawnhar/archive/2010/07/07/setdataoptions-nooverwrite-versus-discard.aspx

 Just figured I would pass it along.  Definitely make sure you are keeping an eye on Shawn Hargreaves blog if you aren't already.  He was the technical editor of my original book and he has tons of great information.

Page 1 of 1 (6 items) | RSS
© 2011 Chad Carter. All rights reserved.