cogl: Remove cogl_material_new

This function is deprecated and must be replaced to the alternative.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2058>
This commit is contained in:
Fernando Monteiro 2021-10-18 22:53:50 +01:00 committed by Marge Bot
parent 6cd4489e55
commit 9f9e64f077
4 changed files with 0 additions and 172 deletions

View File

@ -85,7 +85,6 @@
#include <cogl/deprecated/cogl-auto-texture.h> #include <cogl/deprecated/cogl-auto-texture.h>
#include <cogl/deprecated/cogl-shader.h> #include <cogl/deprecated/cogl-shader.h>
#include <cogl/deprecated/cogl-material-compat.h>
#ifdef COGL_ENABLE_MUTTER_API #ifdef COGL_ENABLE_MUTTER_API
#include <cogl/cogl-mutter.h> #include <cogl/cogl-mutter.h>

View File

@ -1,49 +0,0 @@
/*
* Cogl
*
* A Low Level GPU Graphics and Utilities API
*
* Copyright (C) 2010 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Authors:
* Robert Bragg <robert@linux.intel.com>
*/
#include "cogl-config.h"
#include <cogl-pipeline.h>
#include <cogl-pipeline-private.h>
#include <cogl-types.h>
#include <cogl-context-private.h>
#include <deprecated/cogl-material-compat.h>
G_DEFINE_BOXED_TYPE (CoglMaterial, cogl_material,
cogl_object_ref, cogl_object_unref)
CoglMaterial *
cogl_material_new (void)
{
_COGL_GET_CONTEXT(ctx, NULL);
return COGL_MATERIAL (cogl_pipeline_new (ctx));
}

View File

@ -1,120 +0,0 @@
/*
* Cogl
*
* A Low Level GPU Graphics and Utilities API
*
* Copyright (C) 2007,2008,2009 Intel Corporation.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
*
*/
#if !defined(__COGL_H_INSIDE__) && !defined(COGL_COMPILATION)
#error "Only <cogl/cogl.h> can be included directly."
#endif
#ifndef __COGL_MATERIAL_H__
#define __COGL_MATERIAL_H__
#include <cogl/cogl-types.h>
#include <cogl/cogl-depth-state.h>
#include <cogl/cogl-macros.h>
#include <cogl/cogl-object.h>
G_BEGIN_DECLS
/**
* SECTION:cogl-material
* @short_description: Functions for creating and manipulating materials
*
* COGL allows creating and manipulating materials used to fill in
* geometry. Materials may simply be lighting attributes (such as an
* ambient and diffuse colour) or might represent one or more textures
* blended together.
*/
typedef struct _CoglMaterial CoglMaterial;
typedef struct _CoglMaterialLayer CoglMaterialLayer;
#define COGL_TYPE_MATERIAL (cogl_material_get_type ())
COGL_EXPORT
GType cogl_material_get_type (void);
#define COGL_MATERIAL(OBJECT) ((CoglMaterial *)OBJECT)
/**
* CoglMaterialWrapMode:
* @COGL_MATERIAL_WRAP_MODE_REPEAT: The texture will be repeated. This
* is useful for example to draw a tiled background.
* @COGL_MATERIAL_WRAP_MODE_CLAMP_TO_EDGE: The coordinates outside the
* range 01 will sample copies of the edge pixels of the
* texture. This is useful to avoid artifacts if only one copy of
* the texture is being rendered.
* @COGL_MATERIAL_WRAP_MODE_AUTOMATIC: Cogl will try to automatically
* decide which of the above two to use. For cogl_rectangle(), it
* will use repeat mode if any of the texture coordinates are
* outside the range 01, otherwise it will use clamp to edge. For
* cogl_polygon() it will always use repeat mode. For
* cogl_vertex_buffer_draw() it will use repeat mode except for
* layers that have point sprite coordinate generation enabled. This
* is the default value.
*
* The wrap mode specifies what happens when texture coordinates
* outside the range 01 are used. Note that if the filter mode is
* anything but %COGL_MATERIAL_FILTER_NEAREST then texels outside the
* range 01 might be used even when the coordinate is exactly 0 or 1
* because OpenGL will try to sample neighbouring pixels. For example
* if you are trying to render the full texture then you may get
* artifacts around the edges when the pixels from the other side are
* merged in if the wrap mode is set to repeat.
*
* Since: 1.4
*/
/* GL_ALWAYS is just used here as a value that is known not to clash
* with any valid GL wrap modes
*
* XXX: keep the values in sync with the CoglMaterialWrapModeInternal
* enum so no conversion is actually needed.
*/
typedef enum
{
COGL_MATERIAL_WRAP_MODE_REPEAT = 0x2901,
COGL_MATERIAL_WRAP_MODE_CLAMP_TO_EDGE = 0x812F,
COGL_MATERIAL_WRAP_MODE_AUTOMATIC = 0x0207
} CoglMaterialWrapMode;
/* NB: these values come from the equivalents in gl.h */
/**
* cogl_material_new:
*
* Allocates and initializes a blank white material
*
* Return value: a pointer to a new #CoglMaterial
* Deprecated: 1.16: Use cogl_pipeline_new() instead
*/
COGL_DEPRECATED_FOR (cogl_pipeline_new)
COGL_EXPORT CoglMaterial *
cogl_material_new (void);
G_END_DECLS
#endif /* __COGL_MATERIAL_H__ */

View File

@ -65,7 +65,6 @@ cogl_egl_defines_h = configure_file(
built_headers += [cogl_gl_header_h] built_headers += [cogl_gl_header_h]
cogl_deprecated_headers = [ cogl_deprecated_headers = [
'deprecated/cogl-material-compat.h',
'deprecated/cogl-shader.h', 'deprecated/cogl-shader.h',
'deprecated/cogl-clutter.h', 'deprecated/cogl-clutter.h',
'deprecated/cogl-type-casts.h', 'deprecated/cogl-type-casts.h',
@ -351,7 +350,6 @@ cogl_sources = [
'cogl-fence.c', 'cogl-fence.c',
'cogl-fence-private.h', 'cogl-fence-private.h',
'cogl-scanout.c', 'cogl-scanout.c',
'deprecated/cogl-material-compat.c',
'deprecated/cogl-program.c', 'deprecated/cogl-program.c',
'deprecated/cogl-program-private.h', 'deprecated/cogl-program-private.h',
'deprecated/cogl-auto-texture.c', 'deprecated/cogl-auto-texture.c',