⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hgefunc_texturecreate.html

📁 2D游戏引擎hge的代码
💻 HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- http://hge.relishgames.com -->

<html>

<head>
<meta name="Keywords" content="game engine, 2d, hardware accelerated, hge, engine, relish games, game development">
<meta name="Description" content="Haaf's Game Engine - Hardware accelerated 2D games engine">
<title>Haaf's Game Engine - Hardware accelerated 2D games engine</title>
<link rel=stylesheet type=text/css href=hge.css>
<script language="JavaScript" src="hge.js"></script>
</head>

<body onload="setContents('cnt_hgefunc.html');" bgcolor=#ffffff text=#000000 link=#7F0000 vlink=#7F0000 alink=#7F0000 marginwidth=0 marginheight=0 leftmargin=0 topmargin=0>
<table height=100% cellspacing=0 cellpadding=0 border=0><tr>

<td valign=top>
<table width=566 cellspacing=0 cellpadding=20 border=0><tr><td>
<h1 style="margin-top:0px">HGE::Texture_Create</h1>
<p>
Creates an empty texture.
</p>
<pre>
HTEXTURE Texture_Create(
  int <i><b>width</b></i>,
  int <i><b>height</b></i>
);
</pre>
<h2>Parameters</h2>
<dl>
<dt><i>width</i>
<dd>Width of the texture to be created.
<dt><i>height</i>
<dd>Height of the texture to be created.
</dl>
<h2>Return value</h2>
<p>
If successful, returns the texture handle.
Otherwise returns 0.
</p>
<h2>Remarks</h2>
<p>
The texture dimensions must be a power of 2. If this condition isn't met, the texture is
automatically padded to the closest power of 2 dimensions, bigger than the requested size.
<br><br>
You could use <a href="hgefunc_texturelock.html">Texture_Lock</a> and <a href="hgefunc_textureunlock.html">Texture_Unlock</a>
functions to fill the empty texture with some data.
<br><br>
When the texture isn't needed longer, you must delete it with
<a href="hgefunc_texturefree.html">Texture_Free</a> function.
</p>
<h2>Requirements</h2>
<p>
<b>Header:</b> hge.h<br>
<b>Import library:</b> hge.lib
</p>
<h2>See also</h2>
<p>
<a href="hgefunc_textureload.html">Texture_Load</a>,
<a href="hgefunc_texturefree.html">Texture_Free</a>,
<a href="hgefunc_texturelock.html">Texture_Lock</a>,
<a href="hgefunc_textureunlock.html">Texture_Unlock</a>
</p>
<br>
</td></tr></table>
</td>

</tr></table>
</body>

</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -