Files
test/source/blender/draw/engines/image/image_private.hh
Campbell Barton e955c94ed3 License Headers: Set copyright to "Blender Authors", add AUTHORS
Listing the "Blender Foundation" as copyright holder implied the Blender
Foundation holds copyright to files which may include work from many
developers.

While keeping copyright on headers makes sense for isolated libraries,
Blender's own code may be refactored or moved between files in a way
that makes the per file copyright holders less meaningful.

Copyright references to the "Blender Foundation" have been replaced with
"Blender Authors", with the exception of `./extern/` since these this
contains libraries which are more isolated, any changed to license
headers there can be handled on a case-by-case basis.

Some directories in `./intern/` have also been excluded:

- `./intern/cycles/` it's own `AUTHORS` file is planned.
- `./intern/opensubdiv/`.

An "AUTHORS" file has been added, using the chromium projects authors
file as a template.

Design task: #110784

Ref !110783.
2023-08-16 00:20:26 +10:00

58 lines
1.3 KiB
C++

/* SPDX-FileCopyrightText: 2020 Blender Authors
*
* SPDX-License-Identifier: GPL-2.0-or-later */
/** \file
* \ingroup draw_engine
*/
#pragma once
#include <optional>
#include "BKE_image.h"
#include "image_instance_data.hh"
#include "image_texture_info.hh"
/* Forward declarations */
extern "C" {
struct Image;
}
/* *********** LISTS *********** */
namespace blender::draw::image_engine {
struct IMAGE_Data {
void *engine_type;
DRWViewportEmptyList *fbl;
DRWViewportEmptyList *txl;
DRWViewportEmptyList *psl;
DRWViewportEmptyList *stl;
IMAGE_InstanceData *instance_data;
};
/**
* Abstract class for a drawing mode of the image engine.
*
* The drawing mode decides how to draw the image on the screen. Each way how to draw would have
* its own subclass. For now there is only a single drawing mode. #DefaultDrawingMode.
**/
class AbstractDrawingMode {
public:
virtual ~AbstractDrawingMode() = default;
virtual void begin_sync(IMAGE_Data *vedata) const = 0;
virtual void image_sync(IMAGE_Data *vedata, Image *image, ImageUser *iuser) const = 0;
virtual void draw_viewport(IMAGE_Data *vedata) const = 0;
virtual void draw_finish(IMAGE_Data *vedata) const = 0;
};
/* `image_shader.cc` */
GPUShader *IMAGE_shader_image_get();
GPUShader *IMAGE_shader_depth_get();
void IMAGE_shader_free();
} // namespace blender::draw::image_engine