[BACK]Return to eglCreateContext.xml CVS log [TXT][DIR] Up to [Development] / projects / ogl-sample / main / doc / gles / xml

File: [Development] / projects / ogl-sample / main / doc / gles / xml / eglCreateContext.xml (download)

Revision 1.1, Wed Oct 8 06:06:17 2003 UTC (14 years ago) by ljp
Branch: MAIN
CVS Tags: HEAD


OpenGL ES 1.0 and EGL 1.0 reference manual and man pages (written by
Claude Knaus, based on OpenGL SI man pages).

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook V4.2//EN" "DTD/docbook/docbookx.dtd">

<!--
  License Applicability. Except to the extent portions of this file are
  made subject to an alternative license as permitted in the SGI Free
  Software License B, Version 1.1 (the "License"), the contents of this
  file are subject only to the provisions of the License. You may not use
  this file except in compliance with the License. You may obtain a copy
  of the License at Silicon Graphics, Inc., attn: Legal Services, 1600
  Amphitheatre Parkway, Mountain View, CA 94043-1351, or at:

  http://oss.sgi.com/projects/FreeB

  Note that, as provided in the License, the Software is distributed on an
  "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS
  DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND
  CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A
  PARTICULAR PURPOSE, AND NON-INFRINGEMENT.

  Original Code. The Original Code is: OpenGL ES Reference Manual,
  Version 1.0, released September 2003, developed by Silicon Graphics,
  Inc.  The Original Code is Copyright (c) 2003 Silicon Graphics, Inc.
  Copyright in any portions created by third parties is as indicated
  elsewhere herein.  All Rights Reserved.
-->

<refentry id="eglWaitNative">

  <refmeta>
    <refentrytitle>eglCreateContext</refentrytitle>
    <manvolnum>3G</manvolnum>
  </refmeta>

  <refnamediv>
    <refname>eglCreateContext</refname>
    <refpurpose>
      create a new <acronym>EGL</acronym> rendering context
    </refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>C Specification</title>

    <funcsynopsis>
      <funcprototype>
        <funcdef>EGLContext <function>eglCreateContext</function></funcdef>
        <paramdef>EGLDisplay <parameter>display</parameter></paramdef>
        <paramdef>EGLConfig <parameter>config</parameter></paramdef>
        <paramdef>EGLContext <parameter>share_context</parameter></paramdef>
        <paramdef>EGLint const * <parameter>attrib_list</parameter></paramdef>
      </funcprototype>
    </funcsynopsis>
  </refsynopsisdiv>

  <refsect1>
    <title>Parameters</title>

    <variablelist>
      <varlistentry>
        <term><parameter>display</parameter></term>
        <listitem><para>
          Specifies the
          <acronym>EGL</acronym>
          display connection.
        </para></listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>config</parameter></term>
        <listitem><para>Specifies the EGL frame buffer configuration that
          defines the frame buffer resource available to the rendering context.
        </para></listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>share_context</parameter></term>
        <listitem><para>
          Specifies the
          <acronym>EGL</acronym>
          rendering context with which to share texture objects.
          <constant>EGL_NO_CONTEXT</constant>
          indicates that no sharing is to take place.
        </para>
        </listitem>
      </varlistentry>

      <varlistentry>
        <term><parameter>attrib_list</parameter></term>
        <listitem><para>Specifies attributes.</para></listitem>
      </varlistentry>
    </variablelist>
  </refsect1>

  <refsect1>
    <title>Description</title>

    <para>
      <function>eglCreateContext</function> creates an EGL rendering
      context and returns its handle. This context can be used to render into
      an EGL drawing surface.
      If <function>eglCreateContext</function> fails to create a
      rendering context, <constant>EGL_NO_CONTEXT</constant> is
      returned.
    </para>

    <para>
      If <parameter>share_context</parameter> is not <constant>EGL_NO_CONTEXT</constant>,
      then all texture objects except object 0, are shared by context
      <parameter>share_context</parameter> and by the newly created context.
      An arbitrary number of rendering contexts can share a single texture
      object space.
      However, all rendering contexts that share a single texture object space
      must themselves exist in the same address space. Two rendering contexts
      share an address space if both are owned by a single process.
    </para>
  </refsect1>

  <refsect1>
    <title>Notes</title>

    <para>
      A <firstterm>process</firstterm> is a single execution environment,
      implemented in a single address space, consisting of one or more threads.
    </para>

    <para>
      A <firstterm>thread</firstterm> is one of a set of subprocesses that
      share a single address space, but maintain separate program counters,
      stack spaces, and other related global data.
      A thread is the only member of its subprocess group is equivalent to a
      process.
    </para>
  </refsect1>

  <refsect1>
    <title>Errors</title>

    <para>
      <constant>EGL_NO_CONTEXT</constant> is returned if creation of
      the context fails.
    </para>

    <para>
      <constant>EGL_BAD_DISPLAY</constant> is generated if
      <parameter>display</parameter> is not an EGL display connection.
    </para>
    
    <para>
      <constant>EGL_NOT_INITIALIZED</constant> is generated if
      <parameter>display</parameter> has not been initialized.
    </para>

    <para>
      <constant>EGL_BAD_CONFIG</constant> is generated if
      <parameter>config</parameter> is not an EGL frame buffer configuration.
    </para>

    <para>
      <constant>EGL_BAD_CONTEXT</constant> is generated if
      <parameter>share_context</parameter> is not an EGL rendering context and is not
      <constant>EGL_NO_CONTEXT</constant>.
    </para>

    <para>
      <constant>EGL_BAD_ATTRIBUTE</constant> is generated if
      <parameter>attrib_list</parameter> contains an invalid context attribute or if
      an attribute is not recognized or out of range.
    </para>
    
    <para>
      <constant>EGL_BAD_ALLOC</constant> is generated if there are not
      enough resources to allocate the new context.
    </para>
  </refsect1>
    
  <refsect1>
    <title>See Also</title>

    <para>
      <citerefentry><refentrytitle>eglDestroyContext</refentrytitle></citerefentry>,
      <citerefentry><refentrytitle>eglChooseConfig</refentrytitle></citerefentry>,
      <citerefentry><refentrytitle>eglGetConfigs</refentrytitle></citerefentry>,
      <citerefentry><refentrytitle>eglMakeCurrent</refentrytitle></citerefentry>
    </para>
  </refsect1>

</refentry>