so let's have single vertex (to make things easy) in program, (0, 0, 0). right @ origin. render single frame simple translation matrix, moving vertex 2 units down x-axis. vertex rendered accordingly. same vertex show in vram as
(2, 0, 0)? i've read it's important load respective identity matrices in opengl every time frame rendered--and assume that's because continually move, rotate, etc. further , further, implying applying transformations modify actual data, not appearance onscreen.
here link on wiki mathematics involved transformation matrices. https://en.wikipedia.org/wiki/transformation_matrix give understanding of math behind scenes. way @ on lines of linear or vector algebra. happens under hood when render scene of vertex (pixel) data sent cpu gpu rasterized , drawn screen. batch process or render call, have frame function happen x amount of times per second give frames per second. if rendering @ 60 fps these pixels, vertices, triangles etc., drawn 60 times each second. when apply transformation set of vertices happens here have transformation matrix being multiplied model view projection matrix. mvp * t saved existing mvp matrix if how have calculations set up. there differences between version of opengl using go opengl v1.0 pure cpu calls v4.5. far know after version 3.2 or 3.3 don't remember version off hand have implement mvp versions greater v1.5 shaders first introduced handled already. here documentation on opengl https://www.opengl.org/ , on main page there topic says documentation there can either select opengl registry or ever specific version want at. here can read documentation opengl api since site covers available in api. begin understand process, yes actual coordinate data these vertices change, not continuously change unless incrementing static type variable factor of time giving kind of simulation of movement or animation. if apply single transformation these pixels, vertices, triangles, etc., either rotate, translate, scale, or shear depending on transformation applying. tell order of these operations matter, not tell order are, read on , figure out. these reason matter due fact not every matrix multiplication has valid inverse matrix. identity used reasons such round off errors , floating point precision, if happen apply 1,000 transformations in matter of 10 seconds, not have astronomical errors. should enough point in right direction , serve guide how opengl api works.
Comments
Post a Comment