Skip to content

Shader binding and matrix calculations inside loop. #2062

Answered by raysan5
ghost asked this question in Q&A
Discussion options

You must be logged in to vote

@hexaflex Actually RLGL.State.modelview and RLGL.State.projection depend on:

    // Set current eye view offset to modelview matrix
    rlSetMatrixModelview(rlMatrixMultiply(matModelView, RLGL.State.viewOffsetStereo[eye]));
    // Set current eye projection matrix
    rlSetMatrixProjection(RLGL.State.projectionStereo[eye]);

In any case, the overhead of calling those functions for one or two eyes is minimal so I prefer to keep all the code inside the loop.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@ghost
Comment options

Answer selected
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant