1e5c31af7Sopenharmony_ci#!amber
2e5c31af7Sopenharmony_ci# Copyright 2019 The Amber Authors.
3e5c31af7Sopenharmony_ci#
4e5c31af7Sopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
5e5c31af7Sopenharmony_ci# you may not use this file except in compliance with the License.
6e5c31af7Sopenharmony_ci# You may obtain a copy of the License at
7e5c31af7Sopenharmony_ci#
8e5c31af7Sopenharmony_ci#     https://www.apache.org/licenses/LICENSE-2.0
9e5c31af7Sopenharmony_ci#
10e5c31af7Sopenharmony_ci# Unless required by applicable law or agreed to in writing, software
11e5c31af7Sopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
12e5c31af7Sopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13e5c31af7Sopenharmony_ci# See the License for the specific language governing permissions and
14e5c31af7Sopenharmony_ci# limitations under the License.
15e5c31af7Sopenharmony_ci
16e5c31af7Sopenharmony_ciSHADER vertex vert_shader PASSTHROUGH
17e5c31af7Sopenharmony_ciSHADER fragment frag_shader GLSL
18e5c31af7Sopenharmony_ci#version 430
19e5c31af7Sopenharmony_cilayout(location = 0) out vec4 color_out;
20e5c31af7Sopenharmony_civoid main() {
21e5c31af7Sopenharmony_ci  color_out = vec4(1.0, 0.0, 0.0, 1.0);
22e5c31af7Sopenharmony_ci}
23e5c31af7Sopenharmony_ciEND
24e5c31af7Sopenharmony_ci
25e5c31af7Sopenharmony_ciBUFFER framebuffer FORMAT B8G8R8A8_UNORM
26e5c31af7Sopenharmony_ci
27e5c31af7Sopenharmony_ciPIPELINE graphics my_pipeline
28e5c31af7Sopenharmony_ci  ATTACH vert_shader
29e5c31af7Sopenharmony_ci  ATTACH frag_shader
30e5c31af7Sopenharmony_ci  BIND BUFFER framebuffer AS color LOCATION 0
31e5c31af7Sopenharmony_ciEND
32e5c31af7Sopenharmony_ci
33e5c31af7Sopenharmony_ciRUN my_pipeline DRAW_RECT POS 0 0 SIZE 250 250
34e5c31af7Sopenharmony_ciEXPECT framebuffer IDX 0 0 SIZE 250 250 EQ_RGBA 255 0 0 255
35