34 lines
2.4 KiB
HTML
34 lines
2.4 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="content-type"><title>PyGUI - GLPixmap class</title></head>
|
|
<body>
|
|
<h1>class <span style="font-family: monospace;">GL.GLPixmap(<a href="ImageBase.html">ImageBase</a>)</span></h1>
|
|
The GLPixmap class in the GL submodule provides an off-screen area for
|
|
OpenGL drawing that may subsequently be used as a 2D image and drawn
|
|
into a Canvas.<br>
|
|
<h2>Constructors</h2>
|
|
<dl style="margin-left: 40px;">
|
|
<dt><tt>GLPixmap(width,</tt> <tt>height,</tt> <tt>config,</tt> <tt>share_group</tt> <tt>=</tt> <tt>None)</tt><span style="font-family: monospace;"><br>
|
|
</span><tt>GLPixmap</tt><span style="font-family: monospace;">(</span><tt>width,</tt> <tt>height</tt><span style="font-family: monospace;">,</span><span style="font-style: italic;"> config_attr</span> = <span style="font-style: italic;">value...</span><tt>,</tt><span style="font-family: monospace;"> share_group</span> <span style="font-family: monospace;">=</span> <span style="font-family: monospace;">None</span><span style="font-family: monospace;">)</span></dt>
|
|
<dd>Creates a GLPixmap having the given size and characteristics.
|
|
In the first form of the constructor, the characteristics are specified
|
|
by a <a href="GLConfig.html">GLConfig</a> instance. In the second form, attributes of the GLConfig
|
|
class are specified as individual keyword arguments to the constructor.<br>
|
|
<br>
|
|
If <span style="font-style: italic;">share_group</span> is specified, it should be a <a href="ShareGroup.html">ShareGroup</a> instance, and the GLPixmap is added to that group.</dd>
|
|
</dl>
|
|
<h2>Abstract methods</h2>
|
|
|
|
|
|
<blockquote> <dl><dt><tt>init_context()</tt></dt><dd>Immediately after the view's OpenGL context is created, it is made
|
|
the current context and this method is called. You may use this method to
|
|
establish any desired initial OpenGL state.</dd></dl>
|
|
</blockquote>
|
|
<h2>Methods</h2>
|
|
|
|
|
|
<dl style="margin-left: 40px;">
|
|
<dt><tt>with_context(</tt><i>function</i><tt>,</tt> <tt>flush</tt> <tt>=</tt> <tt>True)</tt></dt><dd>The <i>function</i> should be a callable object of no arguments.
|
|
Calls <i>function</i> with the pixmap's OpenGL context as the current context. If <span style="font-style: italic;">flush</span> is true, then after calling the function, a buffer flush or swap is performed as appropriate.</dd>
|
|
</dl>
|
|
---<br>
|
|
</body></html> |