mirror of
https://github.com/allankoechke/raylib-cpp.git
synced 2026-11-30 10:59:00 +00:00
173 lines
12 KiB
HTML
173 lines
12 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
|
|
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
|
|
<meta name="generator" content="Doxygen 1.9.3"/>
|
|
<meta name="viewport" content="width=device-width, initial-scale=1"/>
|
|
<title>raylib-cpp: raylib-cpp</title>
|
|
<link href="tabs.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="jquery.js"></script>
|
|
<script type="text/javascript" src="dynsections.js"></script>
|
|
<link href="navtree.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="resize.js"></script>
|
|
<script type="text/javascript" src="navtreedata.js"></script>
|
|
<script type="text/javascript" src="navtree.js"></script>
|
|
<link href="search/search.css" rel="stylesheet" type="text/css"/>
|
|
<script type="text/javascript" src="search/searchdata.js"></script>
|
|
<script type="text/javascript" src="search/search.js"></script>
|
|
<link href="doxygen.css" rel="stylesheet" type="text/css" />
|
|
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
|
|
<link href="doxygen-awesome-sidebar-only.css" rel="stylesheet" type="text/css"/>
|
|
</head>
|
|
<body>
|
|
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
|
|
<div id="titlearea">
|
|
<table cellspacing="0" cellpadding="0">
|
|
<tbody>
|
|
<tr id="projectrow">
|
|
<td id="projectalign">
|
|
<div id="projectname">raylib-cpp
|
|
</div>
|
|
<div id="projectbrief">C++ object-oriented wrapper library for raylib.</div>
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
<!-- end header part -->
|
|
<!-- Generated by Doxygen 1.9.3 -->
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
|
|
/* @license-end */
|
|
</script>
|
|
<script type="text/javascript" src="menudata.js"></script>
|
|
<script type="text/javascript" src="menu.js"></script>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(function() {
|
|
initMenu('',true,false,'search.php','Search');
|
|
$(document).ready(function() { init_search(); });
|
|
});
|
|
/* @license-end */
|
|
</script>
|
|
<div id="main-nav"></div>
|
|
</div><!-- top -->
|
|
<div id="side-nav" class="ui-resizable side-nav-resizable">
|
|
<div id="nav-tree">
|
|
<div id="nav-tree-contents">
|
|
<div id="nav-sync" class="sync"></div>
|
|
</div>
|
|
</div>
|
|
<div id="splitbar" style="-moz-user-select:none;"
|
|
class="ui-resizable-handle">
|
|
</div>
|
|
</div>
|
|
<script type="text/javascript">
|
|
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&dn=expat.txt MIT */
|
|
$(document).ready(function(){initNavTree('index.html',''); initResizable(); });
|
|
/* @license-end */
|
|
</script>
|
|
<div id="doc-content">
|
|
<!-- window showing the filter options -->
|
|
<div id="MSearchSelectWindow"
|
|
onmouseover="return searchBox.OnSearchSelectShow()"
|
|
onmouseout="return searchBox.OnSearchSelectHide()"
|
|
onkeydown="return searchBox.OnSearchSelectKey(event)">
|
|
</div>
|
|
|
|
<!-- iframe showing the search results (closed by default) -->
|
|
<div id="MSearchResultsWindow">
|
|
<iframe src="javascript:void(0)" frameborder="0"
|
|
name="MSearchResults" id="MSearchResults">
|
|
</iframe>
|
|
</div>
|
|
|
|
<div><div class="header">
|
|
<div class="headertitle"><div class="title">raylib-cpp </div></div>
|
|
</div><!--header-->
|
|
<div class="contents">
|
|
<div class="textblock"><p >raylib-cpp is a C++ wrapper library for raylib, a simple and easy-to-use library to enjoy videogames programming. This C++ header provides object-oriented wrappers around raylib's struct interfaces.</p>
|
|
<dl class="section see"><dt>See also</dt><dd><a class="el" href="namespaceraylib.html" title="All raylib-cpp classes and functions appear in the raylib namespace.">raylib</a> namespace for a list of all available classes.</dd></dl>
|
|
<div class="fragment"><div class="line"><span class="comment">/*******************************************************************************************</span></div>
|
|
<div class="line"><span class="comment">*</span></div>
|
|
<div class="line"><span class="comment">* raylib [core] example - Basic window</span></div>
|
|
<div class="line"><span class="comment">*</span></div>
|
|
<div class="line"><span class="comment">* Welcome to raylib!</span></div>
|
|
<div class="line"><span class="comment">*</span></div>
|
|
<div class="line"><span class="comment">* To test examples, just press F6 and execute raylib_compile_execute script</span></div>
|
|
<div class="line"><span class="comment">* Note that compiled executable is placed in the same folder as .c file</span></div>
|
|
<div class="line"><span class="comment">*</span></div>
|
|
<div class="line"><span class="comment">* You can find all basic examples on C:\raylib\raylib\examples folder or</span></div>
|
|
<div class="line"><span class="comment">* raylib official webpage: www.raylib.com</span></div>
|
|
<div class="line"><span class="comment">*</span></div>
|
|
<div class="line"><span class="comment">* Enjoy using raylib. :)</span></div>
|
|
<div class="line"><span class="comment">*</span></div>
|
|
<div class="line"><span class="comment">* This example has been created using raylib 1.0 (www.raylib.com)</span></div>
|
|
<div class="line"><span class="comment">* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)</span></div>
|
|
<div class="line"><span class="comment">*</span></div>
|
|
<div class="line"><span class="comment">* Copyright (c) 2014 Ramon Santamaria (@raysan5)</span></div>
|
|
<div class="line"><span class="comment">*</span></div>
|
|
<div class="line"><span class="comment">********************************************************************************************/</span></div>
|
|
<div class="line"> </div>
|
|
<div class="line"><span class="preprocessor">#include "raylib-cpp.hpp"</span></div>
|
|
<div class="line"> </div>
|
|
<div class="line"><span class="keywordtype">int</span> main() {</div>
|
|
<div class="line"> <span class="comment">// Initialization</span></div>
|
|
<div class="line"> <span class="comment">//--------------------------------------------------------------------------------------</span></div>
|
|
<div class="line"> <span class="keywordtype">int</span> screenWidth = 800;</div>
|
|
<div class="line"> <span class="keywordtype">int</span> screenHeight = 450;</div>
|
|
<div class="line"> <a class="code hl_class" href="classraylib_1_1_color.html">raylib::Color</a> textColor = <a class="code hl_function" href="classraylib_1_1_color.html#adbb50ad15745dddeaa73d04f8b40ad35">raylib::Color::LightGray</a>();</div>
|
|
<div class="line"> <a class="code hl_class" href="classraylib_1_1_window.html">raylib::Window</a> window(screenWidth, screenHeight, <span class="stringliteral">"raylib [core] example - basic window"</span>);</div>
|
|
<div class="line"> </div>
|
|
<div class="line"> SetTargetFPS(60);</div>
|
|
<div class="line"> <span class="comment">//--------------------------------------------------------------------------------------</span></div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <span class="comment">// Main game loop</span></div>
|
|
<div class="line"> <span class="keywordflow">while</span> (!window.ShouldClose()) { <span class="comment">// Detect window close button or ESC key</span></div>
|
|
<div class="line"> <span class="comment">// Update</span></div>
|
|
<div class="line"> <span class="comment">//----------------------------------------------------------------------------------</span></div>
|
|
<div class="line"> <span class="comment">// Update your variables here</span></div>
|
|
<div class="line"> <span class="comment">//----------------------------------------------------------------------------------</span></div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <span class="comment">// Draw</span></div>
|
|
<div class="line"> <span class="comment">//----------------------------------------------------------------------------------</span></div>
|
|
<div class="line"> BeginDrawing();</div>
|
|
<div class="line"> {</div>
|
|
<div class="line"> window.ClearBackground(RAYWHITE);</div>
|
|
<div class="line"> textColor.<a class="code hl_function" href="classraylib_1_1_color.html#ab3e313480ab7b00435f12188d04027df">DrawText</a>(<span class="stringliteral">"Congrats! You created your first window!"</span>, 190, 200, 20);</div>
|
|
<div class="line"> }</div>
|
|
<div class="line"> EndDrawing();</div>
|
|
<div class="line"> <span class="comment">//----------------------------------------------------------------------------------</span></div>
|
|
<div class="line"> }</div>
|
|
<div class="line"> </div>
|
|
<div class="line"> <span class="keywordflow">return</span> 0;</div>
|
|
<div class="line">}</div>
|
|
<div class="ttc" id="aclassraylib_1_1_color_html"><div class="ttname"><a href="classraylib_1_1_color.html">raylib::Color</a></div><div class="ttdoc">Color type, RGBA (32bit)</div><div class="ttdef"><b>Definition:</b> <a href="_color_8hpp_source.html#l00014">Color.hpp:14</a></div></div>
|
|
<div class="ttc" id="aclassraylib_1_1_color_html_ab3e313480ab7b00435f12188d04027df"><div class="ttname"><a href="classraylib_1_1_color.html#ab3e313480ab7b00435f12188d04027df">raylib::Color::DrawText</a></div><div class="ttdeci">Color & DrawText(const std::string &text, int posX, int posY, int fontSize)</div><div class="ttdef"><b>Definition:</b> <a href="_color_8hpp_source.html#l00153">Color.hpp:153</a></div></div>
|
|
<div class="ttc" id="aclassraylib_1_1_color_html_adbb50ad15745dddeaa73d04f8b40ad35"><div class="ttname"><a href="classraylib_1_1_color.html#adbb50ad15745dddeaa73d04f8b40ad35">raylib::Color::LightGray</a></div><div class="ttdeci">static Color LightGray()</div><div class="ttdef"><b>Definition:</b> <a href="_color_8hpp_source.html#l00220">Color.hpp:220</a></div></div>
|
|
<div class="ttc" id="aclassraylib_1_1_window_html"><div class="ttname"><a href="classraylib_1_1_window.html">raylib::Window</a></div><div class="ttdoc">Window and Graphics Device Functions.</div><div class="ttdef"><b>Definition:</b> <a href="_window_8hpp_source.html#l00013">Window.hpp:13</a></div></div>
|
|
</div><!-- fragment --> <dl class="section author"><dt>Author</dt><dd>Rob Loach (RobLoach) </dd></dl>
|
|
<dl class="section copyright"><dt>Copyright</dt><dd>zlib/libpng</dd></dl>
|
|
<p>raylib-cpp is licensed under an unmodified zlib/libpng license, which is an OSI-certified, BSD-like license that allows static linking with closed source software:</p>
|
|
<p >Copyright 2020 Rob Loach (RobLoach)</p>
|
|
<p >This software is provided "as-is", without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software.</p>
|
|
<p >Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:</p>
|
|
<ol type="1">
|
|
<li>The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required.</li>
|
|
<li>Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.</li>
|
|
<li>This notice may not be removed or altered from any source distribution. </li>
|
|
</ol>
|
|
</div></div><!-- PageDoc -->
|
|
</div><!-- contents -->
|
|
</div><!-- doc-content -->
|
|
<!-- start footer part -->
|
|
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
|
|
<ul>
|
|
<li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.3 </li>
|
|
</ul>
|
|
</div>
|
|
</body>
|
|
</html>
|