0
\$\begingroup\$

So if I have a bunch of objects, I do:

glBegin(); renderThing1(); glEnd();
glBegin(); renderThing2(); glEnd();
glBegin(); renderThing3(); glEnd();

Is this more or less efficient than:

glBegin(); renderThing1(); renderThing2(); renderThing3(); glEnd();

Not using unity, using LWJGL and java.

\$\endgroup\$
0
\$\begingroup\$

It's more efficient to have fewer glBegin/glEnd pairs, but it shouldn't make too much of a difference unless you have lots of very small things--this type of rendering (immediate mode) is incredibly inefficient no matter what. If you want decent performance from OpenGL then you need to use the modern API (https://learnopengl.com would be a good place to start).

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .