As my project is approaching the optimization stage, I notice that reducing Vertex metadata can significantly improve 3D rendering performance.
In the end, I searched very well and found the following tips from stackoverflow.
Using GL_SHORT instead of GL_FLOAT in an OpenGL ES vertex array
How do you represent a normal or texture coordinate using GLshorts?
Acceleration Tips for OpenGL ES 1.1 on iPhone
Simple experiments show that switching from “FLOAT” to “SHORT” for the vertex and normal is not hard, but what worries me is that you have to scale back to your original size (using glScalef), the normals are multiplied on a reciprocal scale. A natural remedy for this is to multiply the w / scale normals before you submit to the GPU. Then my short normals almost become 0, because the scale factor is usually less than 0. Duh!
How do you use short for vertices and normal at the same time? I tried this all day, but so far I could only use "float vertex w / byte normal" or "short vertex w / float normal".
Your help will be truly appreciated.
, ?
glEnable( GL_NORMALIZE );
, , , , , GPU GPU. , , . , , , , , .
:
Source: https://habr.com/ru/post/1745406/More articles:Как вызвать хранимую процедуру с использованием HibernateTemplate в рамках spring? - javaHow to increase the speed of a component made from Javascript or JQuery? - javascriptNeed TV / Movie API with appropriate trailers - apiNested loop with dependent trip segment - algorithmWhat is the cleanest way to programmatically kill and restart explorer.exe? - installerUsing GL_SHORT instead of GL_FLOAT in an OpenGL ES vertex array - iphoneHow do you represent a normal or texture coordinate using GLshorts? - performanceruby nested classes and modules - ruby | fooobar.comXML Schema for Eclipse Target Definition Files - eclipseis zlib gzgets really slow? - c ++All Articles