903 lines
49 KiB
HTML
903 lines
49 KiB
HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||
<html>
|
||
<head>
|
||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||
<title>GdkGLContext: GDK 3 Reference Manual</title>
|
||
<meta name="generator" content="DocBook XSL Stylesheets Vsnapshot">
|
||
<link rel="home" href="index.html" title="GDK 3 Reference Manual">
|
||
<link rel="up" href="reference.html" title="API Reference">
|
||
<link rel="prev" href="GdkDrawingContext.html" title="GdkDrawingContext">
|
||
<link rel="next" href="gdk3-Events.html" title="Events">
|
||
<meta name="generator" content="GTK-Doc V1.33.1 (XML mode)">
|
||
<link rel="stylesheet" href="style.css" type="text/css">
|
||
</head>
|
||
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
|
||
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
|
||
<td width="100%" align="left" class="shortcuts">
|
||
<a href="#" class="shortcut">Top</a><span id="nav_description"> <span class="dim">|</span>
|
||
<a href="#GdkGLContext.description" class="shortcut">Description</a></span><span id="nav_hierarchy"> <span class="dim">|</span>
|
||
<a href="#GdkGLContext.object-hierarchy" class="shortcut">Object Hierarchy</a></span><span id="nav_properties"> <span class="dim">|</span>
|
||
<a href="#GdkGLContext.properties" class="shortcut">Properties</a></span>
|
||
</td>
|
||
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
|
||
<td><a accesskey="u" href="reference.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
|
||
<td><a accesskey="p" href="GdkDrawingContext.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
|
||
<td><a accesskey="n" href="gdk3-Events.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
|
||
</tr></table>
|
||
<div class="refentry">
|
||
<a name="GdkGLContext"></a><div class="titlepage"></div>
|
||
<div class="refnamediv"><table width="100%"><tr>
|
||
<td valign="top">
|
||
<h2><span class="refentrytitle"><a name="GdkGLContext.top_of_page"></a>GdkGLContext</span></h2>
|
||
<p>GdkGLContext — OpenGL context</p>
|
||
</td>
|
||
<td class="gallery_image" valign="top" align="right"></td>
|
||
</tr></table></div>
|
||
<div class="refsect1">
|
||
<a name="GdkGLContext.functions"></a><h2>Functions</h2>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="functions_proto_type">
|
||
<col class="functions_proto_name">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="returnvalue">GdkDisplay</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-get-display" title="gdk_gl_context_get_display ()">gdk_gl_context_get_display</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="gdk3-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-get-window" title="gdk_gl_context_get_window ()">gdk_gl_context_get_window</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="returnvalue">GdkGLContext</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-get-shared-context" title="gdk_gl_context_get_shared_context ()">gdk_gl_context_get_shared_context</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-get-version" title="gdk_gl_context_get_version ()">gdk_gl_context_get_version</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-set-required-version" title="gdk_gl_context_set_required_version ()">gdk_gl_context_set_required_version</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-get-required-version" title="gdk_gl_context_get_required_version ()">gdk_gl_context_get_required_version</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-set-debug-enabled" title="gdk_gl_context_set_debug_enabled ()">gdk_gl_context_set_debug_enabled</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-get-debug-enabled" title="gdk_gl_context_get_debug_enabled ()">gdk_gl_context_get_debug_enabled</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-set-forward-compatible" title="gdk_gl_context_set_forward_compatible ()">gdk_gl_context_set_forward_compatible</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-get-forward-compatible" title="gdk_gl_context_get_forward_compatible ()">gdk_gl_context_get_forward_compatible</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-set-use-es" title="gdk_gl_context_set_use_es ()">gdk_gl_context_set_use_es</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-get-use-es" title="gdk_gl_context_get_use_es ()">gdk_gl_context_get_use_es</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-is-legacy" title="gdk_gl_context_is_legacy ()">gdk_gl_context_is_legacy</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">gboolean</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-realize" title="gdk_gl_context_realize ()">gdk_gl_context_realize</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-make-current" title="gdk_gl_context_make_current ()">gdk_gl_context_make_current</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="returnvalue">GdkGLContext</span></a> *
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-get-current" title="gdk_gl_context_get_current ()">gdk_gl_context_get_current</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="function_type">
|
||
<span class="returnvalue">void</span>
|
||
</td>
|
||
<td class="function_name">
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-clear-current" title="gdk_gl_context_clear_current ()">gdk_gl_context_clear_current</a> <span class="c_punctuation">()</span>
|
||
</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GdkGLContext.properties"></a><h2>Properties</h2>
|
||
<div class="informaltable"><table class="informaltable" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="properties_type">
|
||
<col width="300px" class="properties_name">
|
||
<col width="200px" class="properties_flags">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="property_type">
|
||
<a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *</td>
|
||
<td class="property_name"><a class="link" href="GdkGLContext.html#GdkGLContext--display" title="The “display” property">display</a></td>
|
||
<td class="property_flags">Read / Write / Construct Only</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *</td>
|
||
<td class="property_name"><a class="link" href="GdkGLContext.html#GdkGLContext--shared-context" title="The “shared-context” property">shared-context</a></td>
|
||
<td class="property_flags">Read / Write / Construct Only</td>
|
||
</tr>
|
||
<tr>
|
||
<td class="property_type">
|
||
<a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *</td>
|
||
<td class="property_name"><a class="link" href="GdkGLContext.html#GdkGLContext--window" title="The “window” property">window</a></td>
|
||
<td class="property_flags">Read / Write / Construct Only</td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GdkGLContext.other"></a><h2>Types and Values</h2>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="other_proto_type">
|
||
<col class="other_proto_name">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="datatype_keyword"> </td>
|
||
<td class="function_name"><a class="link" href="GdkGLContext.html#GdkGLContext-struct" title="GdkGLContext">GdkGLContext</a></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="datatype_keyword">enum</td>
|
||
<td class="function_name"><a class="link" href="GdkGLContext.html#GdkGLError" title="enum GdkGLError">GdkGLError</a></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GdkGLContext.object-hierarchy"></a><h2>Object Hierarchy</h2>
|
||
<pre class="screen"> GObject
|
||
<span class="lineart">╰──</span> GdkGLContext
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GdkGLContext.includes"></a><h2>Includes</h2>
|
||
<pre class="synopsis">#include <gdk/gdkwayland.h>
|
||
</pre>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GdkGLContext.description"></a><h2>Description</h2>
|
||
<p><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> is an object representing the platform-specific
|
||
OpenGL drawing context.</p>
|
||
<p><a href="GdkGLContext.html#GdkGLContext-struct"><span class="type">GdkGLContexts</span></a> are created for a <a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> using
|
||
<a class="link" href="gdk3-Windows.html#gdk-window-create-gl-context" title="gdk_window_create_gl_context ()"><code class="function">gdk_window_create_gl_context()</code></a>, and the context will match
|
||
the <a class="link" href="gdk3-Visuals.html#GdkVisual"><span class="type">GdkVisual</span></a> of the window.</p>
|
||
<p>A <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> is not tied to any particular normal framebuffer.
|
||
For instance, it cannot draw to the <a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> back buffer. The GDK
|
||
repaint system is in full control of the painting to that. Instead,
|
||
you can create render buffers or textures and use <a class="link" href="gdk3-Cairo-Interaction.html#gdk-cairo-draw-from-gl" title="gdk_cairo_draw_from_gl ()"><code class="function">gdk_cairo_draw_from_gl()</code></a>
|
||
in the draw function of your widget to draw them. Then GDK will handle
|
||
the integration of your rendering with that of other widgets.</p>
|
||
<p>Support for <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> is platform-specific, context creation
|
||
can fail, returning <code class="literal">NULL</code> context.</p>
|
||
<p>A <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> has to be made "current" in order to start using
|
||
it, otherwise any OpenGL call will be ignored.</p>
|
||
<div class="refsect3">
|
||
<a name="id-1.2.19.8.7"></a><h4>Creating a new OpenGL context</h4>
|
||
<p>In order to create a new <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> instance you need a
|
||
<a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a>, which you typically get during the realize call
|
||
of a widget.</p>
|
||
<p>A <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> is not realized until either <a class="link" href="GdkGLContext.html#gdk-gl-context-make-current" title="gdk_gl_context_make_current ()"><code class="function">gdk_gl_context_make_current()</code></a>,
|
||
or until it is realized using <a class="link" href="GdkGLContext.html#gdk-gl-context-realize" title="gdk_gl_context_realize ()"><code class="function">gdk_gl_context_realize()</code></a>. It is possible to
|
||
specify details of the GL context like the OpenGL version to be used, or
|
||
whether the GL context should have extra state validation enabled after
|
||
calling <a class="link" href="gdk3-Windows.html#gdk-window-create-gl-context" title="gdk_window_create_gl_context ()"><code class="function">gdk_window_create_gl_context()</code></a> by calling <a class="link" href="GdkGLContext.html#gdk-gl-context-realize" title="gdk_gl_context_realize ()"><code class="function">gdk_gl_context_realize()</code></a>.
|
||
If the realization fails you have the option to change the settings of the
|
||
<a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> and try again.</p>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="id-1.2.19.8.8"></a><h4>Using a GdkGLContext</h4>
|
||
<p>You will need to make the <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> the current context
|
||
before issuing OpenGL calls; the system sends OpenGL commands to
|
||
whichever context is current. It is possible to have multiple
|
||
contexts, so you always need to ensure that the one which you
|
||
want to draw with is the current one before issuing commands:</p>
|
||
<div class="informalexample">
|
||
<table class="listing_frame" border="0" cellpadding="0" cellspacing="0">
|
||
<tbody>
|
||
<tr>
|
||
<td class="listing_lines" align="right"><pre>1</pre></td>
|
||
<td class="listing_code"><pre class="programlisting"><span class="n">gdk_gl_context_make_current</span><span class="w"> </span><span class="p">(</span><span class="n">context</span><span class="p">);</span><span class="w"></span></pre></td>
|
||
</tr>
|
||
</tbody>
|
||
</table>
|
||
</div>
|
||
|
||
<p></p>
|
||
<p>You can now perform your drawing using OpenGL commands.</p>
|
||
<p>You can check which <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> is the current one by using
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-get-current" title="gdk_gl_context_get_current ()"><code class="function">gdk_gl_context_get_current()</code></a>; you can also unset any <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a>
|
||
that is currently set by calling <a class="link" href="GdkGLContext.html#gdk-gl-context-clear-current" title="gdk_gl_context_clear_current ()"><code class="function">gdk_gl_context_clear_current()</code></a>.</p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GdkGLContext.functions_details"></a><h2>Functions</h2>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-get-display"></a><h3>gdk_gl_context_get_display ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="returnvalue">GdkDisplay</span></a> *
|
||
gdk_gl_context_get_display (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>);</pre>
|
||
<p>Retrieves the <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> the <em class="parameter"><code>context</code></em>
|
||
is created for</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-display.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-display.returns"></a><h4>Returns</h4>
|
||
<p>a <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> or <code class="literal">NULL</code>. </p>
|
||
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-get-window"></a><h3>gdk_gl_context_get_window ()</h3>
|
||
<pre class="programlisting"><a class="link" href="gdk3-Windows.html#GdkWindow"><span class="returnvalue">GdkWindow</span></a> *
|
||
gdk_gl_context_get_window (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>);</pre>
|
||
<p>Retrieves the <a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> used by the <em class="parameter"><code>context</code></em>
|
||
.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-window.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-window.returns"></a><h4>Returns</h4>
|
||
<p>a <a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> or <code class="literal">NULL</code>. </p>
|
||
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-get-shared-context"></a><h3>gdk_gl_context_get_shared_context ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="returnvalue">GdkGLContext</span></a> *
|
||
gdk_gl_context_get_shared_context (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>);</pre>
|
||
<p>Retrieves the <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> that this <em class="parameter"><code>context</code></em>
|
||
share data with.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-shared-context.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-shared-context.returns"></a><h4>Returns</h4>
|
||
<p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> or <code class="literal">NULL</code>. </p>
|
||
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-get-version"></a><h3>gdk_gl_context_get_version ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gdk_gl_context_get_version (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>,
|
||
<em class="parameter"><code><span class="type">int</span> *major</code></em>,
|
||
<em class="parameter"><code><span class="type">int</span> *minor</code></em>);</pre>
|
||
<p>Retrieves the OpenGL version of the <em class="parameter"><code>context</code></em>
|
||
.</p>
|
||
<p>The <em class="parameter"><code>context</code></em>
|
||
must be realized prior to calling this function.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-version.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>major</p></td>
|
||
<td class="parameter_description"><p>return location for the major version. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>minor</p></td>
|
||
<td class="parameter_description"><p>return location for the minor version. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>]</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-set-required-version"></a><h3>gdk_gl_context_set_required_version ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gdk_gl_context_set_required_version (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>,
|
||
<em class="parameter"><code><span class="type">int</span> major</code></em>,
|
||
<em class="parameter"><code><span class="type">int</span> minor</code></em>);</pre>
|
||
<p>Sets the major and minor version of OpenGL to request.</p>
|
||
<p>Setting <em class="parameter"><code>major</code></em>
|
||
and <em class="parameter"><code>minor</code></em>
|
||
to zero will use the default values.</p>
|
||
<p>The <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> must not be realized or made current prior to calling
|
||
this function.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-set-required-version.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>major</p></td>
|
||
<td class="parameter_description"><p>the major version to request</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>minor</p></td>
|
||
<td class="parameter_description"><p>the minor version to request</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-get-required-version"></a><h3>gdk_gl_context_get_required_version ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gdk_gl_context_get_required_version (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>,
|
||
<em class="parameter"><code><span class="type">int</span> *major</code></em>,
|
||
<em class="parameter"><code><span class="type">int</span> *minor</code></em>);</pre>
|
||
<p>Retrieves the major and minor version requested by calling
|
||
<a class="link" href="GdkGLContext.html#gdk-gl-context-set-required-version" title="gdk_gl_context_set_required_version ()"><code class="function">gdk_gl_context_set_required_version()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-required-version.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>major</p></td>
|
||
<td class="parameter_description"><p>return location for the major version to request. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>minor</p></td>
|
||
<td class="parameter_description"><p>return location for the minor version to request. </p></td>
|
||
<td class="parameter_annotations"><span class="annotation">[<acronym title="Parameter for returning results. Default is transfer full."><span class="acronym">out</span></acronym>][<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>]</span></td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-set-debug-enabled"></a><h3>gdk_gl_context_set_debug_enabled ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gdk_gl_context_set_debug_enabled (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> enabled</code></em>);</pre>
|
||
<p>Sets whether the <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> should perform extra validations and
|
||
run time checking. This is useful during development, but has
|
||
additional overhead.</p>
|
||
<p>The <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> must not be realized or made current prior to
|
||
calling this function.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-set-debug-enabled.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>enabled</p></td>
|
||
<td class="parameter_description"><p>whether to enable debugging in the context</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-get-debug-enabled"></a><h3>gdk_gl_context_get_debug_enabled ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gdk_gl_context_get_debug_enabled (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>);</pre>
|
||
<p>Retrieves the value set using <a class="link" href="GdkGLContext.html#gdk-gl-context-set-debug-enabled" title="gdk_gl_context_set_debug_enabled ()"><code class="function">gdk_gl_context_set_debug_enabled()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-debug-enabled.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-debug-enabled.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if debugging is enabled</p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-set-forward-compatible"></a><h3>gdk_gl_context_set_forward_compatible ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gdk_gl_context_set_forward_compatible (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>,
|
||
<em class="parameter"><code><span class="type">gboolean</span> compatible</code></em>);</pre>
|
||
<p>Sets whether the <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> should be forward compatible.</p>
|
||
<p>Forward compatibile contexts must not support OpenGL functionality that
|
||
has been marked as deprecated in the requested version; non-forward
|
||
compatible contexts, on the other hand, must support both deprecated and
|
||
non deprecated functionality.</p>
|
||
<p>The <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> must not be realized or made current prior to calling
|
||
this function.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-set-forward-compatible.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>compatible</p></td>
|
||
<td class="parameter_description"><p>whether the context should be forward compatible</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-get-forward-compatible"></a><h3>gdk_gl_context_get_forward_compatible ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gdk_gl_context_get_forward_compatible (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>);</pre>
|
||
<p>Retrieves the value set using <a class="link" href="GdkGLContext.html#gdk-gl-context-set-forward-compatible" title="gdk_gl_context_set_forward_compatible ()"><code class="function">gdk_gl_context_set_forward_compatible()</code></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-forward-compatible.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-forward-compatible.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if the context should be forward compatible</p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-set-use-es"></a><h3>gdk_gl_context_set_use_es ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gdk_gl_context_set_use_es (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>,
|
||
<em class="parameter"><code><span class="type">int</span> use_es</code></em>);</pre>
|
||
<p>Requests that GDK create a OpenGL ES context instead of an OpenGL one,
|
||
if the platform and windowing system allows it.</p>
|
||
<p>The <em class="parameter"><code>context</code></em>
|
||
must not have been realized.</p>
|
||
<p>By default, GDK will attempt to automatically detect whether the
|
||
underlying GL implementation is OpenGL or OpenGL ES once the <em class="parameter"><code>context</code></em>
|
||
|
||
is realized.</p>
|
||
<p>You should check the return value of <a class="link" href="GdkGLContext.html#gdk-gl-context-get-use-es" title="gdk_gl_context_get_use_es ()"><code class="function">gdk_gl_context_get_use_es()</code></a> after
|
||
calling <a class="link" href="GdkGLContext.html#gdk-gl-context-realize" title="gdk_gl_context_realize ()"><code class="function">gdk_gl_context_realize()</code></a> to decide whether to use the OpenGL or
|
||
OpenGL ES API, extensions, or shaders.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-set-use-es.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a>:</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>use_es</p></td>
|
||
<td class="parameter_description"><p>whether the context should use OpenGL ES instead of OpenGL,
|
||
or -1 to allow auto-detection</p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-get-use-es"></a><h3>gdk_gl_context_get_use_es ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gdk_gl_context_get_use_es (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>);</pre>
|
||
<p>Checks whether the <em class="parameter"><code>context</code></em>
|
||
is using an OpenGL or OpenGL ES profile.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-use-es.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-use-es.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if the <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> is using an OpenGL ES profile</p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-22.html#api-index-3.22">3.22</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-is-legacy"></a><h3>gdk_gl_context_is_legacy ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gdk_gl_context_is_legacy (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>);</pre>
|
||
<p>Whether the <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> is in legacy mode or not.</p>
|
||
<p>The <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> must be realized before calling this function.</p>
|
||
<p>When realizing a GL context, GDK will try to use the OpenGL 3.2 core
|
||
profile; this profile removes all the OpenGL API that was deprecated
|
||
prior to the 3.2 version of the specification. If the realization is
|
||
successful, this function will return <code class="literal">FALSE</code>.</p>
|
||
<p>If the underlying OpenGL implementation does not support core profiles,
|
||
GDK will fall back to a pre-3.2 compatibility profile, and this function
|
||
will return <code class="literal">TRUE</code>.</p>
|
||
<p>You can use the value returned by this function to decide which kind
|
||
of OpenGL API to use, or whether to do extension discovery, or what
|
||
kind of shader programs to load.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-is-legacy.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-is-legacy.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if the GL context is in legacy mode</p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-20.html#api-index-3.20">3.20</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-realize"></a><h3>gdk_gl_context_realize ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">gboolean</span>
|
||
gdk_gl_context_realize (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>,
|
||
<em class="parameter"><code><span class="type">GError</span> **error</code></em>);</pre>
|
||
<p>Realizes the given <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a>.</p>
|
||
<p>It is safe to call this function on a realized <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-realize.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="parameter_name"><p>error</p></td>
|
||
<td class="parameter_description"><p>return location for a <span class="type">GError</span></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-realize.returns"></a><h4>Returns</h4>
|
||
<p> <code class="literal">TRUE</code> if the context is realized</p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-make-current"></a><h3>gdk_gl_context_make_current ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gdk_gl_context_make_current (<em class="parameter"><code><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *context</code></em>);</pre>
|
||
<p>Makes the <em class="parameter"><code>context</code></em>
|
||
the current one.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-make-current.parameters"></a><h4>Parameters</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="150px" class="parameters_name">
|
||
<col class="parameters_description">
|
||
<col width="200px" class="parameters_annotations">
|
||
</colgroup>
|
||
<tbody><tr>
|
||
<td class="parameter_name"><p>context</p></td>
|
||
<td class="parameter_description"><p>a <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a></p></td>
|
||
<td class="parameter_annotations"> </td>
|
||
</tr></tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-get-current"></a><h3>gdk_gl_context_get_current ()</h3>
|
||
<pre class="programlisting"><a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="returnvalue">GdkGLContext</span></a> *
|
||
gdk_gl_context_get_current (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
|
||
<p>Retrieves the current <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="gdk-gl-context-get-current.returns"></a><h4>Returns</h4>
|
||
<p>the current <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a>, or <code class="literal">NULL</code>. </p>
|
||
<p><span class="annotation">[<acronym title="NULL may be passed as the value in, out, in-out; or as a return value."><span class="acronym">nullable</span></acronym>][<acronym title="The data is owned by the callee, which is responsible of freeing it."><span class="acronym">transfer none</span></acronym>]</span></p>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="gdk-gl-context-clear-current"></a><h3>gdk_gl_context_clear_current ()</h3>
|
||
<pre class="programlisting"><span class="returnvalue">void</span>
|
||
gdk_gl_context_clear_current (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
|
||
<p>Clears the current <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a>.</p>
|
||
<p>Any OpenGL call after this function returns will be ignored
|
||
until <a class="link" href="GdkGLContext.html#gdk-gl-context-make-current" title="gdk_gl_context_make_current ()"><code class="function">gdk_gl_context_make_current()</code></a> is called.</p>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GdkGLContext.other_details"></a><h2>Types and Values</h2>
|
||
<div class="refsect2">
|
||
<a name="GdkGLContext-struct"></a><h3>GdkGLContext</h3>
|
||
<pre class="programlisting">typedef struct _GdkGLContext GdkGLContext;</pre>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GdkGLError"></a><h3>enum GdkGLError</h3>
|
||
<p>Error enumeration for <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a>.</p>
|
||
<div class="refsect3">
|
||
<a name="GdkGLError.members"></a><h4>Members</h4>
|
||
<div class="informaltable"><table class="informaltable" width="100%" border="0">
|
||
<colgroup>
|
||
<col width="300px" class="enum_members_name">
|
||
<col class="enum_members_description">
|
||
<col width="200px" class="enum_members_annotations">
|
||
</colgroup>
|
||
<tbody>
|
||
<tr>
|
||
<td class="enum_member_name"><p><a name="GDK-GL-ERROR-NOT-AVAILABLE:CAPS"></a>GDK_GL_ERROR_NOT_AVAILABLE</p></td>
|
||
<td class="enum_member_description">
|
||
<p>OpenGL support is not available</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="enum_member_name"><p><a name="GDK-GL-ERROR-UNSUPPORTED-FORMAT:CAPS"></a>GDK_GL_ERROR_UNSUPPORTED_FORMAT</p></td>
|
||
<td class="enum_member_description">
|
||
<p>The requested visual format is not supported</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
<tr>
|
||
<td class="enum_member_name"><p><a name="GDK-GL-ERROR-UNSUPPORTED-PROFILE:CAPS"></a>GDK_GL_ERROR_UNSUPPORTED_PROFILE</p></td>
|
||
<td class="enum_member_description">
|
||
<p>The requested profile is not supported</p>
|
||
</td>
|
||
<td class="enum_member_annotations"> </td>
|
||
</tr>
|
||
</tbody>
|
||
</table></div>
|
||
</div>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
</div>
|
||
<div class="refsect1">
|
||
<a name="GdkGLContext.property-details"></a><h2>Property Details</h2>
|
||
<div class="refsect2">
|
||
<a name="GdkGLContext--display"></a><h3>The <code class="literal">“display”</code> property</h3>
|
||
<pre class="programlisting"> “display” <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> *</pre>
|
||
<p>The <a class="link" href="GdkDisplay.html" title="GdkDisplay"><span class="type">GdkDisplay</span></a> used to create the <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a>.</p>
|
||
<p>Owner: GdkGLContext</p>
|
||
<p>Flags: Read / Write / Construct Only</p>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GdkGLContext--shared-context"></a><h3>The <code class="literal">“shared-context”</code> property</h3>
|
||
<pre class="programlisting"> “shared-context” <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> *</pre>
|
||
<p>The <a class="link" href="GdkGLContext.html" title="GdkGLContext"><span class="type">GdkGLContext</span></a> that this context is sharing data with, or <code class="literal">NULL</code></p>
|
||
<p>Owner: GdkGLContext</p>
|
||
<p>Flags: Read / Write / Construct Only</p>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
<hr>
|
||
<div class="refsect2">
|
||
<a name="GdkGLContext--window"></a><h3>The <code class="literal">“window”</code> property</h3>
|
||
<pre class="programlisting"> “window” <a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> *</pre>
|
||
<p>The <a class="link" href="gdk3-Windows.html#GdkWindow"><span class="type">GdkWindow</span></a> the gl context is bound to.</p>
|
||
<p>Owner: GdkGLContext</p>
|
||
<p>Flags: Read / Write / Construct Only</p>
|
||
<p class="since">Since: <a class="link" href="api-index-3-16.html#api-index-3.16">3.16</a></p>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div class="footer">
|
||
<hr>Generated by GTK-Doc V1.33.1</div>
|
||
</body>
|
||
</html> |