Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  gdkglversionprivate.h

  Sprache: C
 

/* GDK - The GIMP Drawing Kit
 *
 * gdkglcontextprivate.h: GL context abstraction
 *
 * Copyright © 2014  Emmanuele Bassi
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library. If not, see <http://www.gnu.org/licenses/>.
 */


#pragma once

#include <gdkenums.h>

G_BEGIN_DECLS

/* Version requirements for EGL contexts.
 *
 * If you add support for EGL to your backend, please require this.
 */

#define GDK_EGL_MIN_VERSION_MAJOR (1)
#define GDK_EGL_MIN_VERSION_MINOR (4)

/* Minimum OpenGL versions supported by GTK.
 * Backends should make sure to never create a context of a previous version.
 */

#define GDK_GL_MIN_GL_VERSION GDK_GL_VERSION_INIT (33)
#define GDK_GL_MIN_GLES_VERSION GDK_GL_VERSION_INIT (30)

typedef struct _GdkGLVersion GdkGLVersion;

struct _GdkGLVersion
{
  int major;
  int minor;
};

#define GDK_GL_VERSION_INIT(maj,min) { maj, min }

static const GdkGLVersion supported_gl_versions[] = {
  GDK_GL_VERSION_INIT (46),
  GDK_GL_VERSION_INIT (45),
  GDK_GL_VERSION_INIT (44),
  GDK_GL_VERSION_INIT (43),
  GDK_GL_VERSION_INIT (42),
  GDK_GL_VERSION_INIT (41),
  GDK_GL_VERSION_INIT (40),
  GDK_GL_VERSION_INIT (33),

  GDK_GL_VERSION_INIT (00)
};

static const GdkGLVersion supported_gles_versions[] = {
  GDK_GL_VERSION_INIT (32),
  GDK_GL_VERSION_INIT (31),
  GDK_GL_VERSION_INIT (30),

  GDK_GL_VERSION_INIT (00)
};

#undef GDK_GL_VERSION_INIT
#define GDK_GL_VERSION_INIT(maj,min) (GdkGLVersion) { maj, min }
#define GDK_GL_VERSION_STRING(str) GDK_GL_VERSION_INIT(str[0] - '0', str[2] - '0')

static inline const GdkGLVersion *
gdk_gl_versions_get_for_api (GdkGLAPI api)
{
  switch (api)
    {
      case GDK_GL_API_GL:
        return supported_gl_versions;
      case GDK_GL_API_GLES:
        return supported_gles_versions;
      default:
        g_assert_not_reached ();
        return NULL;
    }
}

static inline int
gdk_gl_version_get_major (const GdkGLVersion *self)
{
  return self->major;
}

static inline int
gdk_gl_version_get_minor (const GdkGLVersion *self)
{
  return self->minor;
}

static inline int
gdk_gl_version_compare (const GdkGLVersion *a,
                        const GdkGLVersion *b)
{
  if (a->major > b->major)
    return 1;
  if (a->major < b->major)
    return -1;

  if (a->minor > b->minor)
    return 1;
  if (a->minor < b->minor)
    return -1;

  return 0;
}

static inline gboolean
gdk_gl_version_greater_equal (const GdkGLVersion *a,
                              const GdkGLVersion *b)
{
  return gdk_gl_version_compare (a, b) >= 0;
}

/* in gdkglcontext.c */
void            gdk_gl_version_init_epoxy                       (GdkGLVersion           *version);

G_END_DECLS


Messung V0.5 in Prozent
C=98 H=96 G=96

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-07-02) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik