Looking at the MSDN documentation, I cannot find a way to block VertexBuffers so that I can change my data on the device. Is this possible in XNA?
You have several options for modifying the contents of vertex buffers in XNA:
VertexBufferhas a member SetData. You can safely use this outside Drawanyway where you can activate Predicated Tiling (so it's a good practice to just always do this outside of Draw).
VertexBuffer
SetData
Draw
DynamicVertexBufferlike VertexBuffer, but faster when setting its contents. However, it is susceptible to the loss of a graphic device, and this condition must be handled. Also take a look SetDataOptions.
DynamicVertexBuffer
SetDataOptions
DrawUserPrimitives(and indexed version). This has advantages that do not affect Predicated Tiling, and without causing a flush of the command buffer for a small number of primitives.
DrawUserPrimitives
MSDN has more information about Dynamic vertex updates . And this thread on XNA forums might also be worth a read.
Source: https://habr.com/ru/post/1757334/More articles:You need the source code for the top and find the connection between top and / proc / directory in linux - linuxA way to query a database using SQLAlchemy, where is the date a specific day of the week? - pythonHow to get a snapshot of my canvas - javascriptSupport for Android 1.5, features from Android 2.1 and lack of reflection? - androidIs it possible to handle double clicks with one click in Javascript? - javascriptUITableView: programmatically sets the data source - iphonehttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1757336/php-convert-floating-point-to-long-convert-to-string-to-pass-to-a-xml-function&usg=ALkJrhh36ZDBocOU4m2lzFuat2TXUln2gQIs there a way to present a UIPopover from a UITableView index? - ipadWPF: equal length ToggleButtons string? - c #Проблемы с выпуском DropDownList.Items.Addrange и выбор значения - c#All Articles