style(renderer): capture generic consts as decls in returned struct
Out of an abundance of caution, since there have been issues in the past relating to consts outside of the returned struct.pull/7620/head
parent
b9e35c5970
commit
dccbec2283
|
|
@ -68,24 +68,24 @@ const log = std.log.scoped(.generic_renderer);
|
||||||
/// [ Texture ] - An abstraction over a GPU texture.
|
/// [ Texture ] - An abstraction over a GPU texture.
|
||||||
///
|
///
|
||||||
pub fn Renderer(comptime GraphicsAPI: type) type {
|
pub fn Renderer(comptime GraphicsAPI: type) type {
|
||||||
const Target = GraphicsAPI.Target;
|
|
||||||
const Buffer = GraphicsAPI.Buffer;
|
|
||||||
const Texture = GraphicsAPI.Texture;
|
|
||||||
const RenderPass = GraphicsAPI.RenderPass;
|
|
||||||
const shaderpkg = GraphicsAPI.shaders;
|
|
||||||
|
|
||||||
const cellpkg = GraphicsAPI.cellpkg;
|
|
||||||
const imagepkg = GraphicsAPI.imagepkg;
|
|
||||||
const Image = imagepkg.Image;
|
|
||||||
const ImageMap = imagepkg.ImageMap;
|
|
||||||
|
|
||||||
const Shaders = shaderpkg.Shaders;
|
|
||||||
|
|
||||||
const ImagePlacementList = std.ArrayListUnmanaged(imagepkg.Placement);
|
|
||||||
|
|
||||||
return struct {
|
return struct {
|
||||||
const Self = @This();
|
const Self = @This();
|
||||||
|
|
||||||
|
const Target = GraphicsAPI.Target;
|
||||||
|
const Buffer = GraphicsAPI.Buffer;
|
||||||
|
const Texture = GraphicsAPI.Texture;
|
||||||
|
const RenderPass = GraphicsAPI.RenderPass;
|
||||||
|
const shaderpkg = GraphicsAPI.shaders;
|
||||||
|
|
||||||
|
const cellpkg = GraphicsAPI.cellpkg;
|
||||||
|
const imagepkg = GraphicsAPI.imagepkg;
|
||||||
|
const Image = imagepkg.Image;
|
||||||
|
const ImageMap = imagepkg.ImageMap;
|
||||||
|
|
||||||
|
const Shaders = shaderpkg.Shaders;
|
||||||
|
|
||||||
|
const ImagePlacementList = std.ArrayListUnmanaged(imagepkg.Placement);
|
||||||
|
|
||||||
/// Allocator that can be used
|
/// Allocator that can be used
|
||||||
alloc: std.mem.Allocator,
|
alloc: std.mem.Allocator,
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue