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,6 +68,9 @@ const log = std.log.scoped(.generic_renderer);
|
|||
/// [ Texture ] - An abstraction over a GPU texture.
|
||||
///
|
||||
pub fn Renderer(comptime GraphicsAPI: type) type {
|
||||
return struct {
|
||||
const Self = @This();
|
||||
|
||||
const Target = GraphicsAPI.Target;
|
||||
const Buffer = GraphicsAPI.Buffer;
|
||||
const Texture = GraphicsAPI.Texture;
|
||||
|
|
@ -83,9 +86,6 @@ pub fn Renderer(comptime GraphicsAPI: type) type {
|
|||
|
||||
const ImagePlacementList = std.ArrayListUnmanaged(imagepkg.Placement);
|
||||
|
||||
return struct {
|
||||
const Self = @This();
|
||||
|
||||
/// Allocator that can be used
|
||||
alloc: std.mem.Allocator,
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue