菜鸟教程小白 发表于 2022-12-12 20:48:22

iphone - 如何在 OpenGLES(iPhone) 中重置或清除 glVertexAttribPointer 值?


                                            <p><p>目前我正在使用简单的游戏应用程序,我对 glVertexAttribPointer 是否在 <code>glVertexAttribPointer</code> 中清除或重新设置值有疑问。有没有可能。你能告诉我吗? </p>

<p>示例代码:</p>

<pre><code>glVertexAttribPointer(GLKVertexAttribPosition, 2, GL_FLOAT, GL_FALSE, sizeof(TexturedVertex), (void *) (offset + offsetof(TexturedVertex, geometryVertex)));
</code></pre>

<p>提前致谢。</p></p>
                                    <br><hr><h1><strong>Best Answer-推荐答案</ strong></h1><br>
                                            <p><p>你是什么意思 - 重置?如果您不需要特定属性,请禁用它:</p>

<pre><code>glDisableVertexAttribArray(GLKVertexAttribPosition);
</code></pre></p>
                                   
                                                <p style="font-size: 20px;">关于iphone - 如何在 OpenGLES(iPhone) 中重置或清除 glVertexAttribPointer 值?,我们在Stack Overflow上找到一个类似的问题:
                                                        <a href="https://stackoverflow.com/questions/10562036/" rel="noreferrer noopener nofollow" style="color: red;">
                                                                https://stackoverflow.com/questions/10562036/
                                                        </a>
                                                </p>
                                       
页: [1]
查看完整版本: iphone - 如何在 OpenGLES(iPhone) 中重置或清除 glVertexAttribPointer 值?