A lot of files were missing copyright field in the header and
the Blender Foundation contributed to them in a sense of bug
fixing and general maintenance.
This change makes it explicit that those files are at least
partially copyrighted by the Blender Foundation.
Note that this does not make it so the Blender Foundation is
the only holder of the copyright in those files, and developers
who do not have a signed contract with the foundation still
hold the copyright as well.
Another aspect of this change is using SPDX format for the
header. We already used it for the license specification,
and now we state it for the copyright as well, following the
FAQ:
https://reuse.software/faq/
49 lines
1.0 KiB
C++
49 lines
1.0 KiB
C++
/* SPDX-FileCopyrightText: 2020 Blender Foundation
|
|
*
|
|
* SPDX-License-Identifier: GPL-2.0-or-later */
|
|
|
|
/** \file
|
|
* \ingroup gpu
|
|
*
|
|
* Encapsulation of Frame-buffer states (attached textures, viewport, scissors).
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include "BLI_assert.h"
|
|
|
|
#include "GPU_primitive.h"
|
|
|
|
namespace blender::gpu {
|
|
|
|
static inline GLenum to_gl(GPUPrimType prim_type)
|
|
{
|
|
BLI_assert(prim_type != GPU_PRIM_NONE);
|
|
switch (prim_type) {
|
|
default:
|
|
case GPU_PRIM_POINTS:
|
|
return GL_POINTS;
|
|
case GPU_PRIM_LINES:
|
|
return GL_LINES;
|
|
case GPU_PRIM_LINE_STRIP:
|
|
return GL_LINE_STRIP;
|
|
case GPU_PRIM_LINE_LOOP:
|
|
return GL_LINE_LOOP;
|
|
case GPU_PRIM_TRIS:
|
|
return GL_TRIANGLES;
|
|
case GPU_PRIM_TRI_STRIP:
|
|
return GL_TRIANGLE_STRIP;
|
|
case GPU_PRIM_TRI_FAN:
|
|
return GL_TRIANGLE_FAN;
|
|
|
|
case GPU_PRIM_LINES_ADJ:
|
|
return GL_LINES_ADJACENCY;
|
|
case GPU_PRIM_LINE_STRIP_ADJ:
|
|
return GL_LINE_STRIP_ADJACENCY;
|
|
case GPU_PRIM_TRIS_ADJ:
|
|
return GL_TRIANGLES_ADJACENCY;
|
|
};
|
|
}
|
|
|
|
} // namespace blender::gpu
|