2 * Copyright (C) 2021-2022 Mt.ZERO Software, Harry Godden - All Rights Reserved
10 #include "shaders/blit.h"
11 #include "shaders/blitblur.h"
12 #include "shaders/blitcolour.h"
15 #include "shaders/standard.h"
16 #include "shaders/vblend.h"
19 VG_STATIC
void render_water_texture( world_instance
*world
, camera
*cam
,
21 VG_STATIC
void render_water_surface( world_instance
*world
, camera
*cam
);
22 VG_STATIC
void render_world( world_instance
*world
, camera
*cam
,
24 VG_STATIC
void render_world_depth( world_instance
*world
, camera
*cam
);
29 typedef struct framebuffer framebuffer
;
32 * All standard buffers used in rendering
34 VG_STATIC
struct pipeline
{
42 float view_render_scale
,
45 gpipeline
= { .view_render_scale
= 1.0f
};
48 const char *display_name
;
49 int resolution_div
, /* definition */
53 render_w
, /* runtime */
56 struct framebuffer_attachment
{
57 const char *display_name
;
59 enum framebuffer_attachment_type
{
60 k_framebuffer_attachment_type_none
,
61 k_framebuffer_attachment_type_texture
,
62 k_framebuffer_attachment_type_renderbuffer
,
63 k_framebuffer_attachment_type_texture_depth
67 enum framebuffer_quality_profile
{
68 k_framebuffer_quality_all
,
69 k_framebuffer_quality_high_only
73 GLenum internalformat
,
91 * The primary draw target
94 .link
= &gpipeline
.fb_main
,
99 "colour", k_framebuffer_attachment_type_texture
,
101 .internalformat
= GL_RGB
,
103 .type
= GL_UNSIGNED_BYTE
,
104 .attachment
= GL_COLOR_ATTACHMENT0
107 "motion", k_framebuffer_attachment_type_texture
,
109 .quality
= k_framebuffer_quality_high_only
,
110 .internalformat
= GL_RG16F
,
113 .attachment
= GL_COLOR_ATTACHMENT1
117 "depth_stencil", k_framebuffer_attachment_type_renderbuffer
,
119 .internalformat
= GL_DEPTH24_STENCIL8
,
121 "depth_stencil", k_framebuffer_attachment_type_texture_depth
,
122 .internalformat
= GL_DEPTH24_STENCIL8
,
123 .format
= GL_DEPTH_STENCIL
,
124 .type
= GL_UNSIGNED_INT_24_8
,
126 .attachment
= GL_DEPTH_STENCIL_ATTACHMENT
132 * Second rendered view from the perspective of the water reflection
135 .link
= &gpipeline
.fb_water_reflection
,
140 "colour", k_framebuffer_attachment_type_texture
,
141 .internalformat
= GL_RGB
,
143 .type
= GL_UNSIGNED_BYTE
,
144 .attachment
= GL_COLOR_ATTACHMENT0
147 "depth_stencil", k_framebuffer_attachment_type_renderbuffer
,
149 .internalformat
= GL_DEPTH24_STENCIL8
,
150 .attachment
= GL_DEPTH_STENCIL_ATTACHMENT
156 * Thid rendered view from the perspective of the camera, but just
157 * captures stuff thats under the water
160 .link
= &gpipeline
.fb_water_beneath
,
165 "colour", k_framebuffer_attachment_type_texture
,
166 .internalformat
= GL_RED
,
168 .type
= GL_UNSIGNED_BYTE
,
169 .attachment
= GL_COLOR_ATTACHMENT0
172 "depth_stencil", k_framebuffer_attachment_type_renderbuffer
,
174 .internalformat
= GL_DEPTH24_STENCIL8
,
175 .attachment
= GL_DEPTH_STENCIL_ATTACHMENT
182 * Get the current (automatically scaled or fixed) resolution of framebuffer
184 VG_STATIC
void render_fb_get_current_res( struct framebuffer
*fb
,
187 if( fb
->resolution_div
){
188 *x
= vg
.window_x
/ fb
->resolution_div
;
189 *y
= vg
.window_y
/ fb
->resolution_div
;
197 VG_STATIC
void render_fb_inverse_ratio( framebuffer
*fb
, v2f inverse
)
201 render_fb_get_current_res( fb
, &x
, &y
);
203 v2f render
= { fb
->render_w
, fb
->render_h
},
206 v2_div( render
, original
, inverse
);
209 v2_div( (v2f
){1.0f
,1.0f
}, (v2f
){ vg
.window_x
, vg
.window_y
}, inverse
);
214 * Bind framebuffer for drawing to
216 VG_STATIC
void render_fb_bind( framebuffer
*fb
, int use_scaling
)
219 render_fb_get_current_res( fb
, &x
, &y
);
222 x
= gpipeline
.view_render_scale
*(float)x
;
223 y
= gpipeline
.view_render_scale
*(float)y
;
232 glBindFramebuffer( GL_FRAMEBUFFER
, fb
->fb
);
233 glViewport( 0, 0, x
, y
);
237 * Bind framebuffer attachment's texture
239 VG_STATIC
void render_fb_bind_texture( framebuffer
*fb
,
240 int attachment
, int slot
)
242 struct framebuffer_attachment
*at
= &fb
->attachments
[attachment
];
244 if( (at
->purpose
!= k_framebuffer_attachment_type_texture
) &&
245 (at
->purpose
!= k_framebuffer_attachment_type_texture_depth
) )
247 vg_fatal_error( "illegal operation: bind non-texture framebuffer"
248 " attachment to texture slot" );
251 glActiveTexture( GL_TEXTURE0
+ slot
);
252 glBindTexture( GL_TEXTURE_2D
, fb
->attachments
[attachment
].id
);
260 #define FB_FORMAT_STR( E ) { E, #E },
263 * Convert OpenGL attachment ID enum to string
265 VG_STATIC
const char *render_fb_attachment_str( GLenum e
)
267 struct { GLenum e
; const char *str
; }
270 FB_FORMAT_STR(GL_COLOR_ATTACHMENT0
)
271 FB_FORMAT_STR(GL_COLOR_ATTACHMENT1
)
272 FB_FORMAT_STR(GL_COLOR_ATTACHMENT2
)
273 FB_FORMAT_STR(GL_COLOR_ATTACHMENT3
)
274 FB_FORMAT_STR(GL_COLOR_ATTACHMENT4
)
275 FB_FORMAT_STR(GL_DEPTH_STENCIL_ATTACHMENT
)
278 for( int i
=0; i
<vg_list_size(formats
); i
++ )
279 if( formats
[i
].e
== e
)
280 return formats
[i
].str
;
286 * Convert OpenGL texture format enums from TexImage2D table 1,2 &
287 * RenderBufferStorage Table 1, into strings
289 VG_STATIC
const char *render_fb_format_str( GLenum format
)
291 struct { GLenum e
; const char *str
; }
295 FB_FORMAT_STR(GL_DEPTH_COMPONENT
)
296 FB_FORMAT_STR(GL_DEPTH_STENCIL
)
297 FB_FORMAT_STR(GL_RED
)
299 FB_FORMAT_STR(GL_RGB
)
300 FB_FORMAT_STR(GL_RGBA
)
302 /* Render buffer formats */
303 FB_FORMAT_STR(GL_DEPTH_COMPONENT16
)
304 FB_FORMAT_STR(GL_DEPTH_COMPONENT24
)
305 FB_FORMAT_STR(GL_DEPTH_COMPONENT32F
)
306 FB_FORMAT_STR(GL_DEPTH24_STENCIL8
)
307 FB_FORMAT_STR(GL_DEPTH32F_STENCIL8
)
308 FB_FORMAT_STR(GL_STENCIL_INDEX8
)
312 FB_FORMAT_STR(GL_R8_SNORM
)
313 FB_FORMAT_STR(GL_R16
)
314 FB_FORMAT_STR(GL_R16_SNORM
)
315 FB_FORMAT_STR(GL_RG8
)
316 FB_FORMAT_STR(GL_RG8_SNORM
)
317 FB_FORMAT_STR(GL_RG16
)
318 FB_FORMAT_STR(GL_RG16_SNORM
)
319 FB_FORMAT_STR(GL_R3_G3_B2
)
320 FB_FORMAT_STR(GL_RGB4
)
321 FB_FORMAT_STR(GL_RGB5
)
322 FB_FORMAT_STR(GL_RGB8
)
323 FB_FORMAT_STR(GL_RGB8_SNORM
)
324 FB_FORMAT_STR(GL_RGB10
)
325 FB_FORMAT_STR(GL_RGB12
)
326 FB_FORMAT_STR(GL_RGB16_SNORM
)
327 FB_FORMAT_STR(GL_RGBA2
)
328 FB_FORMAT_STR(GL_RGBA4
)
329 FB_FORMAT_STR(GL_RGB5_A1
)
330 FB_FORMAT_STR(GL_RGBA8
)
331 FB_FORMAT_STR(GL_RGBA8_SNORM
)
332 FB_FORMAT_STR(GL_RGB10_A2
)
333 FB_FORMAT_STR(GL_RGB10_A2UI
)
334 FB_FORMAT_STR(GL_RGBA12
)
335 FB_FORMAT_STR(GL_RGBA16
)
336 FB_FORMAT_STR(GL_SRGB8
)
337 FB_FORMAT_STR(GL_SRGB8_ALPHA8
)
338 FB_FORMAT_STR(GL_R16F
)
339 FB_FORMAT_STR(GL_RG16F
)
340 FB_FORMAT_STR(GL_RGB16F
)
341 FB_FORMAT_STR(GL_RGBA16F
)
342 FB_FORMAT_STR(GL_R32F
)
343 FB_FORMAT_STR(GL_RG32F
)
344 FB_FORMAT_STR(GL_RGB32F
)
345 FB_FORMAT_STR(GL_RGBA32F
)
346 FB_FORMAT_STR(GL_R11F_G11F_B10F
)
347 FB_FORMAT_STR(GL_RGB9_E5
)
348 FB_FORMAT_STR(GL_R8I
)
349 FB_FORMAT_STR(GL_R8UI
)
350 FB_FORMAT_STR(GL_R16I
)
351 FB_FORMAT_STR(GL_R16UI
)
352 FB_FORMAT_STR(GL_R32I
)
353 FB_FORMAT_STR(GL_R32UI
)
354 FB_FORMAT_STR(GL_RG8I
)
355 FB_FORMAT_STR(GL_RG8UI
)
356 FB_FORMAT_STR(GL_RG16I
)
357 FB_FORMAT_STR(GL_RG16UI
)
358 FB_FORMAT_STR(GL_RG32I
)
359 FB_FORMAT_STR(GL_RG32UI
)
360 FB_FORMAT_STR(GL_RGB8I
)
361 FB_FORMAT_STR(GL_RGB8UI
)
362 FB_FORMAT_STR(GL_RGB16I
)
363 FB_FORMAT_STR(GL_RGB16UI
)
364 FB_FORMAT_STR(GL_RGB32I
)
365 FB_FORMAT_STR(GL_RGB32UI
)
366 FB_FORMAT_STR(GL_RGBA8I
)
367 FB_FORMAT_STR(GL_RGBA8UI
)
368 FB_FORMAT_STR(GL_RGBA16I
)
369 FB_FORMAT_STR(GL_RGBA16UI
)
370 FB_FORMAT_STR(GL_RGBA32I
)
371 FB_FORMAT_STR(GL_RGBA32UI
)
374 for( int i
=0; i
<vg_list_size(formats
); i
++ )
375 if( formats
[i
].e
== format
)
376 return formats
[i
].str
;
382 * Bind and allocate texture for framebuffer attachment
384 VG_STATIC
void render_fb_allocate_texture( struct framebuffer
*fb
,
385 struct framebuffer_attachment
*a
)
388 render_fb_get_current_res( fb
, &rx
, &ry
);
390 if( a
->purpose
== k_framebuffer_attachment_type_renderbuffer
){
391 glBindRenderbuffer( GL_RENDERBUFFER
, a
->id
);
392 glRenderbufferStorage( GL_RENDERBUFFER
, a
->internalformat
, rx
, ry
);
394 else if( a
->purpose
== k_framebuffer_attachment_type_texture
||
395 a
->purpose
== k_framebuffer_attachment_type_texture_depth
)
397 glBindTexture( GL_TEXTURE_2D
, a
->id
);
398 glTexImage2D( GL_TEXTURE_2D
, 0, a
->internalformat
, rx
, ry
,
399 0, a
->format
, a
->type
, NULL
);
404 * Full allocation of a framebuffer
406 VG_STATIC
void render_fb_allocate( struct framebuffer
*fb
)
408 glGenFramebuffers( 1, &fb
->fb
);
409 glBindFramebuffer( GL_FRAMEBUFFER
, fb
->fb
);
412 render_fb_get_current_res( fb
, &rx
, &ry
);
414 vg_info( "allocate_framebuffer( %s, %dx%d )\n", fb
->display_name
, rx
, ry
);
417 GLenum colour_attachments
[4];
418 u32 colour_count
= 0;
420 for( int j
=0; j
<vg_list_size(fb
->attachments
); j
++ ){
421 struct framebuffer_attachment
*attachment
= &fb
->attachments
[j
];
423 if( attachment
->purpose
== k_framebuffer_attachment_type_none
)
426 vg_info( " %s: %s\n",
427 render_fb_attachment_str( attachment
->attachment
),
428 render_fb_format_str( attachment
->internalformat
) );
430 if( attachment
->purpose
== k_framebuffer_attachment_type_renderbuffer
){
431 glGenRenderbuffers( 1, &attachment
->id
);
432 render_fb_allocate_texture( fb
, attachment
);
433 glFramebufferRenderbuffer( GL_FRAMEBUFFER
,
434 GL_DEPTH_STENCIL_ATTACHMENT
,
435 GL_RENDERBUFFER
, attachment
->id
);
437 else if( attachment
->purpose
== k_framebuffer_attachment_type_texture
||
438 attachment
->purpose
== k_framebuffer_attachment_type_texture_depth
)
440 glGenTextures( 1, &attachment
->id
);
441 render_fb_allocate_texture( fb
, attachment
);
442 glTexParameteri( GL_TEXTURE_2D
, GL_TEXTURE_MIN_FILTER
, GL_LINEAR
);
443 glTexParameteri( GL_TEXTURE_2D
, GL_TEXTURE_MAG_FILTER
, GL_LINEAR
);
444 glTexParameteri( GL_TEXTURE_2D
, GL_TEXTURE_WRAP_S
, GL_CLAMP_TO_EDGE
);
445 glTexParameteri( GL_TEXTURE_2D
, GL_TEXTURE_WRAP_T
, GL_CLAMP_TO_EDGE
);
447 glFramebufferTexture2D( GL_FRAMEBUFFER
, attachment
->attachment
,
448 GL_TEXTURE_2D
, attachment
->id
, 0 );
450 if( attachment
->purpose
== k_framebuffer_attachment_type_texture
)
451 colour_attachments
[ colour_count
++ ] = attachment
->attachment
;
455 glDrawBuffers( colour_count
, colour_attachments
);
460 GLenum result
= glCheckFramebufferStatus( GL_FRAMEBUFFER
);
462 if( result
== GL_FRAMEBUFFER_COMPLETE
){
464 * Attatch to gpipeline
469 vg_success( " status: complete\n" );
473 if( result
== GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
)
474 vg_error( " status: Incomplete attachment" );
475 else if( result
== GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT
)
476 vg_error( " status: Missing attachment" );
477 else if( result
== GL_FRAMEBUFFER_UNSUPPORTED
)
478 vg_error( " status: Unsupported framebuffer format" );
480 vg_error( " status: Generic Error" );
483 vg_fatal_error( "Incomplete framebuffer (see logs)" );
488 * Resize/Update all framebuffers(we know about)
490 VG_STATIC
void render_fb_resize(void)
492 if( !gpipeline
.ready
)
495 for( int i
=0; i
<vg_list_size(framebuffers
); i
++ ){
496 struct framebuffer
*fb
= &framebuffers
[i
];
497 for( int j
=0; j
<vg_list_size(fb
->attachments
); j
++ ){
498 struct framebuffer_attachment
*attachment
= &fb
->attachments
[j
];
499 render_fb_allocate_texture( fb
, attachment
);
504 VG_STATIC
int render_framebuffer_control( int argc
, char const *argv
[] );
505 VG_STATIC
void render_framebuffer_poll( int argc
, char const *argv
[] );
507 VG_STATIC
void async_render_init( void *payload
, u32 size
)
510 * Complete Framebuffers
512 for( int i
=0; i
<vg_list_size(framebuffers
); i
++ ){
513 struct framebuffer
*fb
= &framebuffers
[i
];
514 render_fb_allocate( fb
);
518 0.00f
,0.00f
, 1.00f
,1.00f
, 0.00f
,1.00f
, /* fsquad */
519 0.00f
,0.00f
, 1.00f
,0.00f
, 1.00f
,1.00f
,
521 0.00f
,0.00f
, 1.00f
,0x1p
-4f
,0.00f
,0x1p
-4f
, /* fsquad1 */
522 0.00f
,0.00f
, 1.00f
,0.00f
, 1.00f
,0x1p
-4f
,
526 0.00f
,0.00f
, 0.30f
,0.30f
, 0.00f
,0.30f
,
527 0.00f
,0.00f
, 0.30f
,0.00f
, 0.30f
,0.30f
,
528 0.30f
,0.00f
, 0.60f
,0.30f
, 0.30f
,0.30f
,
529 0.30f
,0.00f
, 0.60f
,0.00f
, 0.60f
,0.30f
,
530 0.60f
,0.00f
, 0.90f
,0.30f
, 0.60f
,0.30f
,
531 0.60f
,0.00f
, 0.90f
,0.00f
, 0.90f
,0.30f
,
533 0.00f
,0.30f
, 0.30f
,0.60f
, 0.00f
,0.60f
,
534 0.00f
,0.30f
, 0.30f
,0.30f
, 0.30f
,0.60f
,
535 0.30f
,0.30f
, 0.60f
,0.60f
, 0.30f
,0.60f
,
536 0.30f
,0.30f
, 0.60f
,0.30f
, 0.60f
,0.60f
,
537 0.60f
,0.30f
, 0.90f
,0.60f
, 0.60f
,0.60f
,
538 0.60f
,0.30f
, 0.90f
,0.30f
, 0.90f
,0.60f
,
540 0.00f
,0.60f
, 0.30f
,0.90f
, 0.00f
,0.90f
,
541 0.00f
,0.60f
, 0.30f
,0.60f
, 0.30f
,0.90f
,
542 0.30f
,0.60f
, 0.60f
,0.90f
, 0.30f
,0.90f
,
543 0.30f
,0.60f
, 0.60f
,0.60f
, 0.60f
,0.90f
,
544 0.60f
,0.60f
, 0.90f
,0.90f
, 0.60f
,0.90f
,
545 0.60f
,0.60f
, 0.90f
,0.60f
, 0.90f
,0.90f
,
548 vg_console_reg_cmd( "fb", render_framebuffer_control
,
549 render_framebuffer_poll
);
551 glGenVertexArrays( 1, &gpipeline
.fsquad
.vao
);
552 glGenBuffers( 1, &gpipeline
.fsquad
.vbo
);
553 glBindVertexArray( gpipeline
.fsquad
.vao
);
554 glBindBuffer( GL_ARRAY_BUFFER
, gpipeline
.fsquad
.vbo
);
555 glBufferData( GL_ARRAY_BUFFER
, sizeof(quad
), quad
, GL_STATIC_DRAW
);
556 glBindVertexArray( gpipeline
.fsquad
.vao
);
557 glVertexAttribPointer( 0, 2, GL_FLOAT
, GL_FALSE
,
558 sizeof(float)*2, (void*)0 );
559 glEnableVertexAttribArray( 0 );
563 glBindFramebuffer( GL_FRAMEBUFFER
, 0 );
567 VG_STATIC
void render_init(void)
569 shader_blit_register();
570 shader_blitblur_register();
571 shader_blitcolour_register();
573 vg_async_call( async_render_init
, NULL
, 0 );
579 VG_STATIC
void render_fsquad(void)
581 glBindVertexArray( gpipeline
.fsquad
.vao
);
582 glDrawArrays( GL_TRIANGLES
, 0, 6 );
585 VG_STATIC
void render_fsquad1(void)
587 glBindVertexArray( gpipeline
.fsquad
.vao
);
588 glDrawArrays( GL_TRIANGLES
, 6, 6 );
592 * Call this inside the UI function
594 VG_STATIC
void render_view_framebuffer_ui(void)
597 int viewing_count
= 0;
599 glBindVertexArray( gpipeline
.fsquad
.vao
);
601 shader_blit_uTexMain( 0 );
603 v2f identity
= { 1.0f
, 1.0f
};
604 shader_blit_uInverseRatio( identity
);
606 for( int i
=0; i
<vg_list_size(framebuffers
); i
++ ){
607 struct framebuffer
*fb
= &framebuffers
[i
];
609 for( int j
=0; j
<vg_list_size(fb
->attachments
); j
++ ){
610 struct framebuffer_attachment
*at
= &fb
->attachments
[j
];
612 if( !at
->debug_view
)
616 window
= { vg
.window_x
, vg
.window_y
};
618 corner
[0] = viewing_count
% 3;
619 corner
[1] = 1 + (viewing_count
/ 3);
620 v2_mul( corner
, window
, corner
);
621 v2_muls( corner
, 0.3f
, corner
);
622 corner
[1] = vg
.window_y
- corner
[1];
624 ui_text( (ui_rect
){ corner
[0], corner
[1], 0.0f
, 0.0f
},
625 fb
->display_name
, 2, k_text_align_left
);
626 ui_text( (ui_rect
){ corner
[0], corner
[1] + 32, 0.0f
, 0.0f
, },
627 at
->display_name
, 1, k_text_align_left
);
629 if( at
->purpose
== k_framebuffer_attachment_type_renderbuffer
){
631 v2_muladds( corner
, window
, 0.15f
, center
);
633 ui_text( (ui_rect
){ center
[0], center
[1], 0.0f
, 0.0f
},
634 "<hardware texture>", 1, k_text_align_center
);
637 render_fb_bind_texture( fb
, j
, 0 );
639 int start
= (viewing_count
+2) * 6,
641 glDrawArrays( GL_TRIANGLES
, start
, count
);
650 VG_STATIC
void render_framebuffer_show( struct framebuffer
*fb
,
651 struct framebuffer_attachment
*at
,
654 at
->debug_view
= operation
;
655 vg_info( "%s %s:%s\n", (operation
?"shown": "hidden"),
656 fb
->display_name
, at
->display_name
);
660 * arg0: command "show"/"hide"
661 * arg1: framebuffer name <name>/"all"
662 * arg2: subname <name>/none
664 VG_STATIC
int render_framebuffer_control( int argc
, char const *argv
[] )
667 vg_error( "Usage: fb \"show/hide\" <name>/\"all\" <name>/none\n" );
674 if( !strcmp( argv
[0], "show" ) )
676 else if( !strcmp( argv
[0], "hide" ) )
679 vg_error( "Unknown framebuffer operation: '%s'\n", argv
[0] );
683 if( !strcmp( argv
[1], "all" ) )
686 for( int i
=0; i
<vg_list_size(framebuffers
); i
++ ){
687 struct framebuffer
*fb
= &framebuffers
[i
];
689 for( int j
=0; j
<vg_list_size(fb
->attachments
); j
++ ){
690 struct framebuffer_attachment
*at
= &fb
->attachments
[j
];
692 if( at
->purpose
== k_framebuffer_attachment_type_none
)
696 render_framebuffer_show( fb
, at
, operation
);
699 if( !strcmp( fb
->display_name
, argv
[1] ) ){
701 render_framebuffer_show( fb
, at
, operation
);
702 else if( !strcmp( at
->display_name
, argv
[2] ) )
703 render_framebuffer_show( fb
, at
, operation
);
712 VG_STATIC
void render_framebuffer_poll( int argc
, char const *argv
[] )
714 const char *term
= argv
[argc
-1];
717 console_suggest_score_text( "show", term
, 0 );
718 console_suggest_score_text( "hide", term
, 0 );
720 else if( argc
== 2 ){
721 console_suggest_score_text( "all", term
, 0 );
723 for( int i
=0; i
<vg_list_size(framebuffers
); i
++ ){
724 struct framebuffer
*fb
= &framebuffers
[i
];
725 console_suggest_score_text( fb
->display_name
, term
, 0 );
728 else if( argc
== 3 ){
731 if( !strcmp( argv
[1], "all" ) )
734 for( int i
=0; i
<vg_list_size(framebuffers
); i
++ ){
735 struct framebuffer
*fb
= &framebuffers
[i
];
737 for( int j
=0; j
<vg_list_size(fb
->attachments
); j
++ ){
738 struct framebuffer_attachment
*at
= &fb
->attachments
[j
];
740 if( at
->purpose
== k_framebuffer_attachment_type_none
)
744 console_suggest_score_text( at
->display_name
, term
, 0 );
746 else if( !strcmp( fb
->display_name
, argv
[1] ) ){
747 console_suggest_score_text( at
->display_name
, term
, 0 );
754 #endif /* RENDER_H */