일단 하고 싶은건 현재 사이즈의 윈도우 창의 가로 세로값을

uniform value로 넣어서 shader파일에서 불러오려고 하고있음

 float cwidth;
 float cheight;

현재 윈도우창의 크기를 넣을 변수를 선언하고

uniform값을 update할 함수를

{
...
 GLuint cw = glGetUniformLocation( program, "width");
 glUniform1f(cw, cwidth);
 GLuint ch = glGetUniformLocation( program, "height");
 glUniform1f(ch, cheight);
...
 }

reshape( int width, int height )

 glViewport( 0, 0, width, height );

 glutPostRedisplay();
}

그리고 shader에서
attribute float cwidth;
attribute float cheight;
이렇게 선언을 해줬음

이렇게 하면 되는거 맞음?

어디가 잘못된건지 잘 모르겠음 오류라도 나면 따라가면서 해볼텐데 ㅠ

횽들 조언좀 해줘