Using GL_SHORT instead of GL_FLOAT in an OpenGL ES vertex array

后端 未结 2 1881
广开言路
广开言路 2021-02-11 08:55

I have this vertex array of a cube

float vertex_coordinates [] = {

-12.43796, -12.43796, 12.43796, -12.43796, 12.43796, 12.43796, 12.43796, 12.43796, 12.43796,
         


        
2条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-11 09:10

    instead of (+-)12.43796 use (+-)1

    then apply a glScalef operation on your modelview matrix of 12.43796

    I doubt this would speed up your code, however. All it will do is reduce your vertex array to half of its original size.

提交回复
热议问题