当我使用 AWS SSO 登录时,我无法访问 aws。我从我的电脑登录使用:
aws sso login --profile staging
Run Code Online (Sandbox Code Playgroud)
配置文件配置如下:
[profile staging]
sso_start_url = https://som-nice-working-url
sso_region = us-east-1
sso_account_id = 1234
sso_role_name = the-role-name
region = eu-west-1
output = yaml
Run Code Online (Sandbox Code Playgroud)
登录后,我可以通过 aws cli 访问 aws。
然后我设置了变量:AWS_PROFILE=staging
但是在 java 上我得到以下异常:
com.amazonaws.SdkClientException: Unable to load AWS credentials from any provider in the chain: [EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY)), SystemPropertiesCredentialsProvider: Unable to load AWS credentials from Java system properties (aws.accessKeyId …Run Code Online (Sandbox Code Playgroud) 总之,我有以下顶点缓冲区:
GLfloat _vertices[] = {
-1.0f, -1.0f,
1.0f, -1.0f,
-1.0f, 1.0f,
1.0f, -1.0f,
1.0f, 1.0f,
-1.0f, 1.0f };
Run Code Online (Sandbox Code Playgroud)
然后我设置顶点并调用绘制,如下所示:
glViewport(0, 0, w, h);
glEnableVertexAttribArray(0);
glDisable(GL_BLEND);
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, _vertices);
glDrawArrays(GL_TRIANGLES, 0, 6);
Run Code Online (Sandbox Code Playgroud)
我的顶点着色器如下:
glViewport(0, 0, w, h);
glEnableVertexAttribArray(0);
glDisable(GL_BLEND);
glVertexAttribPointer(0, 2, GL_FLOAT, GL_FALSE, 0, _vertices);
glDrawArrays(GL_TRIANGLES, 0, 6);
Run Code Online (Sandbox Code Playgroud)
片段是:
#version 320 es
layout(location = 0) in vec2 vertPos;
out vec2 fragPos;
out float theLength;
void main()
{
fragPos = vertPos;
theLength = length(fragPos);
gl_Position = vec4(vertPos.xy, 1.0, 1.0); …Run Code Online (Sandbox Code Playgroud)