vectozavr-shooter/SFML-mingw32/doc/html/classsf_1_1VertexBuffer.html

773 lines
48 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SFML - Simple and Fast Multimedia Library</title>
<meta http-equiv="Content-Type" content="text/html;"/>
<meta charset="utf-8"/>
<!--<link rel='stylesheet' type='text/css' href="https://fonts.googleapis.com/css?family=Ubuntu:400,700,400italic"/>-->
<link rel="stylesheet" type="text/css" href="doxygen.css" title="default" media="screen,print" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
</head>
<body>
<div id="banner-container">
<div id="banner">
<span id="sfml">SFML 2.5.1</span>
</div>
</div>
<div id="content">
<!-- Generated by Doxygen 1.8.14 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="namespaces.html"><span>Namespaces</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><b>sf</b></li><li class="navelem"><a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pri-static-methods">Static Private Member Functions</a> &#124;
<a href="classsf_1_1VertexBuffer-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">sf::VertexBuffer Class Reference<div class="ingroups"><a class="el" href="group__graphics.html">Graphics module</a></div></div> </div>
</div><!--header-->
<div class="contents">
<p><a class="el" href="classsf_1_1Vertex.html" title="Define a point with color and texture coordinates. ">Vertex</a> buffer storage for one or more 2D primitives.
<a href="classsf_1_1VertexBuffer.html#details">More...</a></p>
<p><code>#include &lt;<a class="el" href="VertexBuffer_8hpp_source.html">VertexBuffer.hpp</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for sf::VertexBuffer:</div>
<div class="dyncontent">
<div class="center">
<img src="classsf_1_1VertexBuffer.png" usemap="#sf::VertexBuffer_map" alt=""/>
<map id="sf::VertexBuffer_map" name="sf::VertexBuffer_map">
<area href="classsf_1_1Drawable.html" title="Abstract base class for objects that can be drawn to a render target. " alt="sf::Drawable" shape="rect" coords="0,0,100,24"/>
<area href="classsf_1_1GlResource.html" title="Base class for classes that require an OpenGL context. " alt="sf::GlResource" shape="rect" coords="110,0,210,24"/>
</map>
</div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr class="memitem:a3a531528684e63ecb45edd51282f5cb7"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7">Usage</a> { <a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7aeed06a391698772af58a9cfdff77deaf">Stream</a>,
<a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7a13365282a5933ecd9cc6a3ef39ba58f7">Dynamic</a>,
<a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7a041ab564f6cd1b6775bd0ebff06b6d7e">Static</a>
}</td></tr>
<tr class="memdesc:a3a531528684e63ecb45edd51282f5cb7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Usage specifiers. <a href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7">More...</a><br /></td></tr>
<tr class="separator:a3a531528684e63ecb45edd51282f5cb7"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:aba8836c571cef25a0f80e478add1560a"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#aba8836c571cef25a0f80e478add1560a">VertexBuffer</a> ()</td></tr>
<tr class="memdesc:aba8836c571cef25a0f80e478add1560a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default constructor. <a href="#aba8836c571cef25a0f80e478add1560a">More...</a><br /></td></tr>
<tr class="separator:aba8836c571cef25a0f80e478add1560a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3f51dcd61dac52be54ba7b22ebdea7c8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a3f51dcd61dac52be54ba7b22ebdea7c8">VertexBuffer</a> (<a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a> type)</td></tr>
<tr class="memdesc:a3f51dcd61dac52be54ba7b22ebdea7c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <a class="el" href="classsf_1_1VertexBuffer.html" title="Vertex buffer storage for one or more 2D primitives. ">VertexBuffer</a> with a specific PrimitiveType. <a href="#a3f51dcd61dac52be54ba7b22ebdea7c8">More...</a><br /></td></tr>
<tr class="separator:a3f51dcd61dac52be54ba7b22ebdea7c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af2dce0a43e061e5f91b97cf7267427e3"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#af2dce0a43e061e5f91b97cf7267427e3">VertexBuffer</a> (<a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7">Usage</a> usage)</td></tr>
<tr class="memdesc:af2dce0a43e061e5f91b97cf7267427e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <a class="el" href="classsf_1_1VertexBuffer.html" title="Vertex buffer storage for one or more 2D primitives. ">VertexBuffer</a> with a specific usage specifier. <a href="#af2dce0a43e061e5f91b97cf7267427e3">More...</a><br /></td></tr>
<tr class="separator:af2dce0a43e061e5f91b97cf7267427e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a326a5c89f1ba01b51b323535494434e8"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a326a5c89f1ba01b51b323535494434e8">VertexBuffer</a> (<a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a> type, <a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7">Usage</a> usage)</td></tr>
<tr class="memdesc:a326a5c89f1ba01b51b323535494434e8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Construct a <a class="el" href="classsf_1_1VertexBuffer.html" title="Vertex buffer storage for one or more 2D primitives. ">VertexBuffer</a> with a specific PrimitiveType and usage specifier. <a href="#a326a5c89f1ba01b51b323535494434e8">More...</a><br /></td></tr>
<tr class="separator:a326a5c89f1ba01b51b323535494434e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f2ff1e218cfc749b87f8873e23c016b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a2f2ff1e218cfc749b87f8873e23c016b">VertexBuffer</a> (const <a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> &amp;copy)</td></tr>
<tr class="memdesc:a2f2ff1e218cfc749b87f8873e23c016b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy constructor. <a href="#a2f2ff1e218cfc749b87f8873e23c016b">More...</a><br /></td></tr>
<tr class="separator:a2f2ff1e218cfc749b87f8873e23c016b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfbb3b16221bfb9406fcaa18cfcac3e7"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#acfbb3b16221bfb9406fcaa18cfcac3e7">~VertexBuffer</a> ()</td></tr>
<tr class="memdesc:acfbb3b16221bfb9406fcaa18cfcac3e7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destructor. <a href="#acfbb3b16221bfb9406fcaa18cfcac3e7">More...</a><br /></td></tr>
<tr class="separator:acfbb3b16221bfb9406fcaa18cfcac3e7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa68e128d59c7f7d5eb0d4d94125439a5"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#aa68e128d59c7f7d5eb0d4d94125439a5">create</a> (std::size_t vertexCount)</td></tr>
<tr class="memdesc:aa68e128d59c7f7d5eb0d4d94125439a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create the vertex buffer. <a href="#aa68e128d59c7f7d5eb0d4d94125439a5">More...</a><br /></td></tr>
<tr class="separator:aa68e128d59c7f7d5eb0d4d94125439a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6c534536ed186a2ad65e75484c8abafe"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a6c534536ed186a2ad65e75484c8abafe">getVertexCount</a> () const</td></tr>
<tr class="memdesc:a6c534536ed186a2ad65e75484c8abafe"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the vertex count. <a href="#a6c534536ed186a2ad65e75484c8abafe">More...</a><br /></td></tr>
<tr class="separator:a6c534536ed186a2ad65e75484c8abafe"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad100a5f578a91c49a9009e3c6956c82d"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#ad100a5f578a91c49a9009e3c6956c82d">update</a> (const <a class="el" href="classsf_1_1Vertex.html">Vertex</a> *vertices)</td></tr>
<tr class="memdesc:ad100a5f578a91c49a9009e3c6956c82d"><td class="mdescLeft">&#160;</td><td class="mdescRight">ServerUpdate the whole buffer from an array of vertices. <a href="#ad100a5f578a91c49a9009e3c6956c82d">More...</a><br /></td></tr>
<tr class="separator:ad100a5f578a91c49a9009e3c6956c82d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6c8649a64861507010d21e77fbd53fa"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#ae6c8649a64861507010d21e77fbd53fa">update</a> (const <a class="el" href="classsf_1_1Vertex.html">Vertex</a> *vertices, std::size_t vertexCount, unsigned int offset)</td></tr>
<tr class="memdesc:ae6c8649a64861507010d21e77fbd53fa"><td class="mdescLeft">&#160;</td><td class="mdescRight">ServerUpdate a part of the buffer from an array of vertices. <a href="#ae6c8649a64861507010d21e77fbd53fa">More...</a><br /></td></tr>
<tr class="separator:ae6c8649a64861507010d21e77fbd53fa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41f8bbcf07f403e7fe29b1b905dc7544"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a41f8bbcf07f403e7fe29b1b905dc7544">update</a> (const <a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> &amp;vertexBuffer)</td></tr>
<tr class="memdesc:a41f8bbcf07f403e7fe29b1b905dc7544"><td class="mdescLeft">&#160;</td><td class="mdescRight">Copy the contents of another buffer into this buffer. <a href="#a41f8bbcf07f403e7fe29b1b905dc7544">More...</a><br /></td></tr>
<tr class="separator:a41f8bbcf07f403e7fe29b1b905dc7544"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a812f98083da8f10361d457008bf9fa79"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a812f98083da8f10361d457008bf9fa79">operator=</a> (const <a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> &amp;right)</td></tr>
<tr class="memdesc:a812f98083da8f10361d457008bf9fa79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Overload of assignment operator. <a href="#a812f98083da8f10361d457008bf9fa79">More...</a><br /></td></tr>
<tr class="separator:a812f98083da8f10361d457008bf9fa79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3954d696848dc4c921c15a6b4459c8e6"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a3954d696848dc4c921c15a6b4459c8e6">swap</a> (<a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> &amp;right)</td></tr>
<tr class="memdesc:a3954d696848dc4c921c15a6b4459c8e6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Swap the contents of this vertex buffer with those of another. <a href="#a3954d696848dc4c921c15a6b4459c8e6">More...</a><br /></td></tr>
<tr class="separator:a3954d696848dc4c921c15a6b4459c8e6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a343fa0a240c91bc4203a6727fcd9b920"><td class="memItemLeft" align="right" valign="top">unsigned int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a343fa0a240c91bc4203a6727fcd9b920">getNativeHandle</a> () const</td></tr>
<tr class="memdesc:a343fa0a240c91bc4203a6727fcd9b920"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the underlying OpenGL handle of the vertex buffer. <a href="#a343fa0a240c91bc4203a6727fcd9b920">More...</a><br /></td></tr>
<tr class="separator:a343fa0a240c91bc4203a6727fcd9b920"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c429dbef94224a86d605cf4c68aa02d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a7c429dbef94224a86d605cf4c68aa02d">setPrimitiveType</a> (<a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a> type)</td></tr>
<tr class="memdesc:a7c429dbef94224a86d605cf4c68aa02d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the type of primitives to draw. <a href="#a7c429dbef94224a86d605cf4c68aa02d">More...</a><br /></td></tr>
<tr class="separator:a7c429dbef94224a86d605cf4c68aa02d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02061d85472ff69e7ad14dc72f8fcaa4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a02061d85472ff69e7ad14dc72f8fcaa4">getPrimitiveType</a> () const</td></tr>
<tr class="memdesc:a02061d85472ff69e7ad14dc72f8fcaa4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the type of primitives drawn by the vertex buffer. <a href="#a02061d85472ff69e7ad14dc72f8fcaa4">More...</a><br /></td></tr>
<tr class="separator:a02061d85472ff69e7ad14dc72f8fcaa4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ace40070db1fccf12a025383b23e81cad"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#ace40070db1fccf12a025383b23e81cad">setUsage</a> (<a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7">Usage</a> usage)</td></tr>
<tr class="memdesc:ace40070db1fccf12a025383b23e81cad"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the usage specifier of this vertex buffer. <a href="#ace40070db1fccf12a025383b23e81cad">More...</a><br /></td></tr>
<tr class="separator:ace40070db1fccf12a025383b23e81cad"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5e36f2b3955bb35648c17550a9c096e1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7">Usage</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a5e36f2b3955bb35648c17550a9c096e1">getUsage</a> () const</td></tr>
<tr class="memdesc:a5e36f2b3955bb35648c17550a9c096e1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the usage specifier of this vertex buffer. <a href="#a5e36f2b3955bb35648c17550a9c096e1">More...</a><br /></td></tr>
<tr class="separator:a5e36f2b3955bb35648c17550a9c096e1"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a1c623e9701b43125e4b3661bc0d0b65b"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a1c623e9701b43125e4b3661bc0d0b65b">bind</a> (const <a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> *vertexBuffer)</td></tr>
<tr class="memdesc:a1c623e9701b43125e4b3661bc0d0b65b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bind a vertex buffer for rendering. <a href="#a1c623e9701b43125e4b3661bc0d0b65b">More...</a><br /></td></tr>
<tr class="separator:a1c623e9701b43125e4b3661bc0d0b65b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6304bc4134dc0164dc94eff887b08847"><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1VertexBuffer.html#a6304bc4134dc0164dc94eff887b08847">isAvailable</a> ()</td></tr>
<tr class="memdesc:a6304bc4134dc0164dc94eff887b08847"><td class="mdescLeft">&#160;</td><td class="mdescRight">Tell whether or not the system supports vertex buffers. <a href="#a6304bc4134dc0164dc94eff887b08847">More...</a><br /></td></tr>
<tr class="separator:a6304bc4134dc0164dc94eff887b08847"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-static-methods"></a>
Static Private Member Functions</h2></td></tr>
<tr class="memitem:ab171bdaf5eb36789da14b30a846db471"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classsf_1_1GlResource.html#ab171bdaf5eb36789da14b30a846db471">registerContextDestroyCallback</a> (ContextDestroyCallback callback, void *arg)</td></tr>
<tr class="memdesc:ab171bdaf5eb36789da14b30a846db471"><td class="mdescLeft">&#160;</td><td class="mdescRight">Register a function to be called when a context is destroyed. <a href="#ab171bdaf5eb36789da14b30a846db471">More...</a><br /></td></tr>
<tr class="separator:ab171bdaf5eb36789da14b30a846db471"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="classsf_1_1Vertex.html" title="Define a point with color and texture coordinates. ">Vertex</a> buffer storage for one or more 2D primitives. </p>
<p><a class="el" href="classsf_1_1VertexBuffer.html" title="Vertex buffer storage for one or more 2D primitives. ">sf::VertexBuffer</a> is a simple wrapper around a dynamic buffer of vertices and a primitives type.</p>
<p>Unlike <a class="el" href="classsf_1_1VertexArray.html" title="Define a set of one or more 2D primitives. ">sf::VertexArray</a>, the vertex data is stored in graphics memory.</p>
<p>In situations where a large amount of vertex data would have to be transferred from system memory to graphics memory every frame, using <a class="el" href="classsf_1_1VertexBuffer.html" title="Vertex buffer storage for one or more 2D primitives. ">sf::VertexBuffer</a> can help. By using a <a class="el" href="classsf_1_1VertexBuffer.html" title="Vertex buffer storage for one or more 2D primitives. ">sf::VertexBuffer</a>, data that has not been changed between frames does not have to be re-transferred from system to graphics memory as would be the case with <a class="el" href="classsf_1_1VertexArray.html" title="Define a set of one or more 2D primitives. ">sf::VertexArray</a>. If data transfer is a bottleneck, this can lead to performance gains.</p>
<p>Using <a class="el" href="classsf_1_1VertexBuffer.html" title="Vertex buffer storage for one or more 2D primitives. ">sf::VertexBuffer</a>, the user also has the ability to only modify a portion of the buffer in graphics memory. This way, a large buffer can be allocated at the start of the application and only the applicable portions of it need to be updated during the course of the application. This allows the user to take full control of data transfers between system and graphics memory if they need to.</p>
<p>In special cases, the user can make use of multiple threads to update vertex data in multiple distinct regions of the buffer simultaneously. This might make sense when e.g. the position of multiple objects has to be recalculated very frequently. The computation load can be spread across multiple threads as long as there are no other data dependencies.</p>
<p>Simultaneous updates to the vertex buffer are not guaranteed to be carried out by the driver in any specific order. Updating the same region of the buffer from multiple threads will not cause undefined behaviour, however the final state of the buffer will be unpredictable.</p>
<p>Simultaneous updates of distinct non-overlapping regions of the buffer are also not guaranteed to complete in a specific order. However, in this case the user can make sure to synchronize the writer threads at well-defined points in their code. The driver will make sure that all pending data transfers complete before the vertex buffer is sourced by the rendering pipeline.</p>
<p>It inherits <a class="el" href="classsf_1_1Drawable.html" title="Abstract base class for objects that can be drawn to a render target. ">sf::Drawable</a>, but unlike other drawables it is not transformable.</p>
<p>Example: </p><div class="fragment"><div class="line"><a class="code" href="classsf_1_1Vertex.html">sf::Vertex</a> vertices[15];</div><div class="line">...</div><div class="line">sf::VertexBuffer triangles(<a class="code" href="group__graphics.html#gga5ee56ac1339984909610713096283b1ba880a7aa72c20b9f9beb7eb64d2434670">sf::Triangles</a>);</div><div class="line">triangles.create(15);</div><div class="line">triangles.update(vertices);</div><div class="line">...</div><div class="line">window.draw(triangles);</div></div><!-- fragment --><dl class="section see"><dt>See also</dt><dd><a class="el" href="classsf_1_1Vertex.html" title="Define a point with color and texture coordinates. ">sf::Vertex</a>, <a class="el" href="classsf_1_1VertexArray.html" title="Define a set of one or more 2D primitives. ">sf::VertexArray</a> </dd></dl>
<p class="definition">Definition at line <a class="el" href="VertexBuffer_8hpp_source.html#l00046">46</a> of file <a class="el" href="VertexBuffer_8hpp_source.html">VertexBuffer.hpp</a>.</p>
</div><h2 class="groupheader">Member Enumeration Documentation</h2>
<a id="a3a531528684e63ecb45edd51282f5cb7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a531528684e63ecb45edd51282f5cb7">&#9670;&nbsp;</a></span>Usage</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7">sf::VertexBuffer::Usage</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Usage specifiers. </p>
<p>If data is going to be updated once or more every frame, set the usage to Stream. If data is going to be set once and used for a long time without being modified, set the usage to Static. For everything else Dynamic should be a good compromise. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a3a531528684e63ecb45edd51282f5cb7aeed06a391698772af58a9cfdff77deaf"></a>Stream&#160;</td><td class="fielddoc"><p>Constantly changing data. </p>
</td></tr>
<tr><td class="fieldname"><a id="a3a531528684e63ecb45edd51282f5cb7a13365282a5933ecd9cc6a3ef39ba58f7"></a>Dynamic&#160;</td><td class="fielddoc"><p>Occasionally changing data. </p>
</td></tr>
<tr><td class="fieldname"><a id="a3a531528684e63ecb45edd51282f5cb7a041ab564f6cd1b6775bd0ebff06b6d7e"></a>Static&#160;</td><td class="fielddoc"><p>Rarely changing data. </p>
</td></tr>
</table>
<p class="definition">Definition at line <a class="el" href="VertexBuffer_8hpp_source.html#l00060">60</a> of file <a class="el" href="VertexBuffer_8hpp_source.html">VertexBuffer.hpp</a>.</p>
</div>
</div>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="aba8836c571cef25a0f80e478add1560a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba8836c571cef25a0f80e478add1560a">&#9670;&nbsp;</a></span>VertexBuffer() <span class="overload">[1/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">sf::VertexBuffer::VertexBuffer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Default constructor. </p>
<p>Creates an empty vertex buffer. </p>
</div>
</div>
<a id="a3f51dcd61dac52be54ba7b22ebdea7c8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3f51dcd61dac52be54ba7b22ebdea7c8">&#9670;&nbsp;</a></span>VertexBuffer() <span class="overload">[2/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">sf::VertexBuffer::VertexBuffer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a>&#160;</td>
<td class="paramname"><em>type</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct a <a class="el" href="classsf_1_1VertexBuffer.html" title="Vertex buffer storage for one or more 2D primitives. ">VertexBuffer</a> with a specific PrimitiveType. </p>
<p>Creates an empty vertex buffer and sets its primitive type to <code>type</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>Type of primitive </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="af2dce0a43e061e5f91b97cf7267427e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af2dce0a43e061e5f91b97cf7267427e3">&#9670;&nbsp;</a></span>VertexBuffer() <span class="overload">[3/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">sf::VertexBuffer::VertexBuffer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7">Usage</a>&#160;</td>
<td class="paramname"><em>usage</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">explicit</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct a <a class="el" href="classsf_1_1VertexBuffer.html" title="Vertex buffer storage for one or more 2D primitives. ">VertexBuffer</a> with a specific usage specifier. </p>
<p>Creates an empty vertex buffer and sets its usage to <code>usage</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">usage</td><td>Usage specifier </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a326a5c89f1ba01b51b323535494434e8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a326a5c89f1ba01b51b323535494434e8">&#9670;&nbsp;</a></span>VertexBuffer() <span class="overload">[4/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">sf::VertexBuffer::VertexBuffer </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a>&#160;</td>
<td class="paramname"><em>type</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7">Usage</a>&#160;</td>
<td class="paramname"><em>usage</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Construct a <a class="el" href="classsf_1_1VertexBuffer.html" title="Vertex buffer storage for one or more 2D primitives. ">VertexBuffer</a> with a specific PrimitiveType and usage specifier. </p>
<p>Creates an empty vertex buffer and sets its primitive type to <code>type</code> and usage to <code>usage</code>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>Type of primitive </td></tr>
<tr><td class="paramname">usage</td><td>Usage specifier </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a2f2ff1e218cfc749b87f8873e23c016b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2f2ff1e218cfc749b87f8873e23c016b">&#9670;&nbsp;</a></span>VertexBuffer() <span class="overload">[5/5]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">sf::VertexBuffer::VertexBuffer </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> &amp;&#160;</td>
<td class="paramname"><em>copy</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Copy constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">copy</td><td>instance to copy </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="acfbb3b16221bfb9406fcaa18cfcac3e7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfbb3b16221bfb9406fcaa18cfcac3e7">&#9670;&nbsp;</a></span>~VertexBuffer()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">sf::VertexBuffer::~VertexBuffer </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destructor. </p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="a1c623e9701b43125e4b3661bc0d0b65b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1c623e9701b43125e4b3661bc0d0b65b">&#9670;&nbsp;</a></span>bind()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static void sf::VertexBuffer::bind </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> *&#160;</td>
<td class="paramname"><em>vertexBuffer</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Bind a vertex buffer for rendering. </p>
<p>This function is not part of the graphics API, it mustn't be used when drawing SFML entities. It must be used only if you mix <a class="el" href="classsf_1_1VertexBuffer.html" title="Vertex buffer storage for one or more 2D primitives. ">sf::VertexBuffer</a> with OpenGL code.</p>
<div class="fragment"><div class="line"><a class="code" href="classsf_1_1VertexBuffer.html">sf::VertexBuffer</a> vb1, vb2;</div><div class="line">...</div><div class="line">sf::VertexBuffer::bind(&amp;vb1);</div><div class="line"><span class="comment">// draw OpenGL stuff that use vb1...</span></div><div class="line"><a class="code" href="classsf_1_1VertexBuffer.html#a1c623e9701b43125e4b3661bc0d0b65b">sf::VertexBuffer::bind</a>(&amp;vb2);</div><div class="line"><span class="comment">// draw OpenGL stuff that use vb2...</span></div><div class="line"><a class="code" href="classsf_1_1VertexBuffer.html#a1c623e9701b43125e4b3661bc0d0b65b">sf::VertexBuffer::bind</a>(NULL);</div><div class="line"><span class="comment">// draw OpenGL stuff that use no vertex buffer...</span></div></div><!-- fragment --><dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertexBuffer</td><td>Pointer to the vertex buffer to bind, can be null to use no vertex buffer </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="aa68e128d59c7f7d5eb0d4d94125439a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa68e128d59c7f7d5eb0d4d94125439a5">&#9670;&nbsp;</a></span>create()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::VertexBuffer::create </td>
<td>(</td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>vertexCount</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create the vertex buffer. </p>
<p>Creates the vertex buffer and allocates enough graphics memory to hold <code>vertexCount</code> vertices. Any previously allocated memory is freed in the process.</p>
<p>In order to deallocate previously allocated memory pass 0 as <code>vertexCount</code>. Don't forget to recreate with a non-zero value when graphics memory should be allocated again.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertexCount</td><td>Number of vertices worth of memory to allocate</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if creation was successful </dd></dl>
</div>
</div>
<a id="a343fa0a240c91bc4203a6727fcd9b920"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a343fa0a240c91bc4203a6727fcd9b920">&#9670;&nbsp;</a></span>getNativeHandle()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">unsigned int sf::VertexBuffer::getNativeHandle </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the underlying OpenGL handle of the vertex buffer. </p>
<p>You shouldn't need to use this function, unless you have very specific stuff to implement that SFML doesn't support, or implement a temporary workaround until a bug is fixed.</p>
<dl class="section return"><dt>Returns</dt><dd>OpenGL handle of the vertex buffer or 0 if not yet created </dd></dl>
</div>
</div>
<a id="a02061d85472ff69e7ad14dc72f8fcaa4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a02061d85472ff69e7ad14dc72f8fcaa4">&#9670;&nbsp;</a></span>getPrimitiveType()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a> sf::VertexBuffer::getPrimitiveType </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the type of primitives drawn by the vertex buffer. </p>
<dl class="section return"><dt>Returns</dt><dd>Primitive type </dd></dl>
</div>
</div>
<a id="a5e36f2b3955bb35648c17550a9c096e1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5e36f2b3955bb35648c17550a9c096e1">&#9670;&nbsp;</a></span>getUsage()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7">Usage</a> sf::VertexBuffer::getUsage </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Get the usage specifier of this vertex buffer. </p>
<dl class="section return"><dt>Returns</dt><dd>Usage specifier </dd></dl>
</div>
</div>
<a id="a6c534536ed186a2ad65e75484c8abafe"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6c534536ed186a2ad65e75484c8abafe">&#9670;&nbsp;</a></span>getVertexCount()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">std::size_t sf::VertexBuffer::getVertexCount </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td> const</td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the vertex count. </p>
<dl class="section return"><dt>Returns</dt><dd>Number of vertices in the vertex buffer </dd></dl>
</div>
</div>
<a id="a6304bc4134dc0164dc94eff887b08847"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6304bc4134dc0164dc94eff887b08847">&#9670;&nbsp;</a></span>isAvailable()</h2>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">static bool sf::VertexBuffer::isAvailable </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Tell whether or not the system supports vertex buffers. </p>
<p>This function should always be called before using the vertex buffer features. If it returns false, then any attempt to use <a class="el" href="classsf_1_1VertexBuffer.html" title="Vertex buffer storage for one or more 2D primitives. ">sf::VertexBuffer</a> will fail.</p>
<dl class="section return"><dt>Returns</dt><dd>True if vertex buffers are supported, false otherwise </dd></dl>
</div>
</div>
<a id="a812f98083da8f10361d457008bf9fa79"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a812f98083da8f10361d457008bf9fa79">&#9670;&nbsp;</a></span>operator=()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a>&amp; sf::VertexBuffer::operator= </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> &amp;&#160;</td>
<td class="paramname"><em>right</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Overload of assignment operator. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">right</td><td>Instance to assign</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Reference to self </dd></dl>
</div>
</div>
<a id="a7c429dbef94224a86d605cf4c68aa02d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c429dbef94224a86d605cf4c68aa02d">&#9670;&nbsp;</a></span>setPrimitiveType()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::VertexBuffer::setPrimitiveType </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__graphics.html#ga5ee56ac1339984909610713096283b1b">PrimitiveType</a>&#160;</td>
<td class="paramname"><em>type</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the type of primitives to draw. </p>
<p>This function defines how the vertices must be interpreted when it's time to draw them.</p>
<p>The default primitive type is sf::Points.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">type</td><td>Type of primitive </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ace40070db1fccf12a025383b23e81cad"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ace40070db1fccf12a025383b23e81cad">&#9670;&nbsp;</a></span>setUsage()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::VertexBuffer::setUsage </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7">Usage</a>&#160;</td>
<td class="paramname"><em>usage</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the usage specifier of this vertex buffer. </p>
<p>This function provides a hint about how this vertex buffer is going to be used in terms of data update frequency.</p>
<p>After changing the usage specifier, the vertex buffer has to be updated with new data for the usage specifier to take effect.</p>
<p>The default primitive type is <a class="el" href="classsf_1_1VertexBuffer.html#a3a531528684e63ecb45edd51282f5cb7aeed06a391698772af58a9cfdff77deaf" title="Constantly changing data. ">sf::VertexBuffer::Stream</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">usage</td><td>Usage specifier </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="a3954d696848dc4c921c15a6b4459c8e6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3954d696848dc4c921c15a6b4459c8e6">&#9670;&nbsp;</a></span>swap()</h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void sf::VertexBuffer::swap </td>
<td>(</td>
<td class="paramtype"><a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> &amp;&#160;</td>
<td class="paramname"><em>right</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Swap the contents of this vertex buffer with those of another. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">right</td><td>Instance to swap with </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a id="ad100a5f578a91c49a9009e3c6956c82d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad100a5f578a91c49a9009e3c6956c82d">&#9670;&nbsp;</a></span>update() <span class="overload">[1/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::VertexBuffer::update </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1Vertex.html">Vertex</a> *&#160;</td>
<td class="paramname"><em>vertices</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>ServerUpdate the whole buffer from an array of vertices. </p>
<p>The <em>vertex</em> array is assumed to have the same size as the <em>created</em> buffer.</p>
<p>No additional check is performed on the size of the vertex array, passing invalid arguments will lead to undefined behavior.</p>
<p>This function does nothing if <em>vertices</em> is null or if the buffer was not previously created.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertices</td><td>Array of vertices to copy to the buffer</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the update was successful </dd></dl>
</div>
</div>
<a id="ae6c8649a64861507010d21e77fbd53fa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae6c8649a64861507010d21e77fbd53fa">&#9670;&nbsp;</a></span>update() <span class="overload">[2/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::VertexBuffer::update </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1Vertex.html">Vertex</a> *&#160;</td>
<td class="paramname"><em>vertices</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">std::size_t&#160;</td>
<td class="paramname"><em>vertexCount</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned int&#160;</td>
<td class="paramname"><em>offset</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>ServerUpdate a part of the buffer from an array of vertices. </p>
<p><code>offset</code> is specified as the number of vertices to skip from the beginning of the buffer.</p>
<p>If <code>offset</code> is 0 and <code>vertexCount</code> is equal to the size of the currently created buffer, its whole contents are replaced.</p>
<p>If <code>offset</code> is 0 and <code>vertexCount</code> is greater than the size of the currently created buffer, a new buffer is created containing the vertex data.</p>
<p>If <code>offset</code> is 0 and <code>vertexCount</code> is less than the size of the currently created buffer, only the corresponding region is updated.</p>
<p>If <code>offset</code> is not 0 and <code>offset</code> + <code>vertexCount</code> is greater than the size of the currently created buffer, the update fails.</p>
<p>No additional check is performed on the size of the vertex array, passing invalid arguments will lead to undefined behavior.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertices</td><td>Array of vertices to copy to the buffer </td></tr>
<tr><td class="paramname">vertexCount</td><td>Number of vertices to copy </td></tr>
<tr><td class="paramname">offset</td><td>Offset in the buffer to copy to</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the update was successful </dd></dl>
</div>
</div>
<a id="a41f8bbcf07f403e7fe29b1b905dc7544"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41f8bbcf07f403e7fe29b1b905dc7544">&#9670;&nbsp;</a></span>update() <span class="overload">[3/3]</span></h2>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool sf::VertexBuffer::update </td>
<td>(</td>
<td class="paramtype">const <a class="el" href="classsf_1_1VertexBuffer.html">VertexBuffer</a> &amp;&#160;</td>
<td class="paramname"><em>vertexBuffer</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Copy the contents of another buffer into this buffer. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">vertexBuffer</td><td><a class="el" href="classsf_1_1Vertex.html" title="Define a point with color and texture coordinates. ">Vertex</a> buffer whose contents to copy into this vertex buffer</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the copy was successful </dd></dl>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="VertexBuffer_8hpp_source.html">VertexBuffer.hpp</a></li>
</ul>
</div><!-- contents -->
</div>
<div id="footer-container">
<div id="footer">
SFML is licensed under the terms and conditions of the <a href="https://www.sfml-dev.org/license.php">zlib/png license</a>.<br>
Copyright &copy; Laurent Gomila &nbsp;::&nbsp;
Documentation generated by <a href="http://www.doxygen.org/" title="doxygen website">doxygen</a> &nbsp;::&nbsp;
</div>
</div>
</body>
</html>