這就是我OpenGL的文檔中找到:什麼是opengl當前頂點?
void glGetVertexAttribfv(GLuint index, GLenum pname, GLfloat *params);
GL_CURRENT_VERTEX_ATTRIB
params returns four
values that represent the current value for the
generic vertex attribute specified by index. Generic
vertex attribute 0 is unique in that it has no
current state, so an error will be generated if
index is 0. The initial value
for all other generic vertex attributes is
(0,0,0,1).
glGetVertexAttribdv and glGetVertexAttribfv
return the current attribute values as four single-precision floating-point values;
glGetVertexAttribiv reads them as floating-point values and
converts them to four integer values; glGetVertexAttribIiv and
glGetVertexAttribIuiv read and return them as signed or unsigned
integer values, respectively; glGetVertexAttribLdv reads and returns
them as four double-precision floating-point values.
但我的問題是,我不知道當前頂點是什麼。我如何設置當前頂點?我可以用它來測試天氣我發送給opengl的屬性是否包含正確的數據?
您使用的是桌面OpenGL還是OpenGL ES? –
我認爲你有一些語義混淆。沒有當前的「頂點」,而是頂點屬性狀態。所以如果寫成英文句子,這將是「OpenGL,請給我一個通用頂點屬性的當前狀態(一個字,而不是兩個)。」 – datenwolf
實際上我使用Desktop OpenGl。但這裏有關係嗎?我不得不添加一些標籤,但是失去了更多的創意。 @datenwolf不,我很舒服我的問題是正確的,因爲這是一個問題。給我一個答案,告訴我如何正確的定義是有效的。 – Arne