Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is scale important in OpenGL?

Tags:

c++

opengl

Does the scale of a scene matter in OpenGL? By scale I mean, for instance, drawing a 1 unit cube but setting the camera position 1000 pixels away vs setting the camera 100 pixels away from a 0.1 unit cube? I guess, firstly, am I correct in thinking this would yield the same results visually? And if so, does anyone know how either would effect performance, if at all?

My hunch would be that it would have no effect but a more definitive answer would be nice.

like image 244
dzimney Avatar asked Dec 16 '22 11:12

dzimney


2 Answers

It doesn't matter except for imprecisions using floating point arithmetic. So try not to use super small or large numbers.

like image 152
Sarien Avatar answered Dec 23 '22 23:12

Sarien


If you mean 2D this may not matter. Image created both ways may look the same.

like image 27
Antua Avatar answered Dec 23 '22 21:12

Antua