mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 12:12:25 +01:00
- atempt to squeeze some extra rendering performance
This commit is contained in:
parent
cce338a2c6
commit
22f57e0684
@ -2452,12 +2452,15 @@ void Renderer::renderShadowsToTexture(const int renderFps){
|
||||
glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, shadowTextureSize, shadowTextureSize);
|
||||
|
||||
//get elemental matrices
|
||||
Matrix4f matrix1;
|
||||
static Matrix4f matrix1;
|
||||
static bool matrix1Populate = true;
|
||||
if(matrix1Populate == true) {
|
||||
matrix1Populate = false;
|
||||
matrix1[0]= 0.5f; matrix1[4]= 0.f; matrix1[8]= 0.f; matrix1[12]= 0.5f;
|
||||
matrix1[1]= 0.f; matrix1[5]= 0.5f; matrix1[9]= 0.f; matrix1[13]= 0.5f;
|
||||
matrix1[2]= 0.f; matrix1[6]= 0.f; matrix1[10]= 0.5f; matrix1[14]= 0.5f;
|
||||
matrix1[3]= 0.f; matrix1[7]= 0.f; matrix1[11]= 0.f; matrix1[15]= 1.f;
|
||||
|
||||
}
|
||||
Matrix4f matrix2;
|
||||
glGetFloatv(GL_PROJECTION_MATRIX, matrix2.ptr());
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user