Commit: 1d469f3780dc9138448a49851a9056c3596a7cf8 Author: Mike Erwin Date: Thu Sep 22 12:19:24 2016 +0200 Branches: blender2.8 https://developer.blender.org/rB1d469f3780dc9138448a49851a9056c3596a7cf8
OpenGL: remove double precision matrix functions Proper fp64 is a GL 4.x feature. Pretending to support it in our API is just clutter. =================================================================== M source/blender/gpu/GPU_matrix.h M source/blender/gpu/intern/gpu_matrix.c =================================================================== diff --git a/source/blender/gpu/GPU_matrix.h b/source/blender/gpu/GPU_matrix.h index 9d61084..4588e70 100644 --- a/source/blender/gpu/GPU_matrix.h +++ b/source/blender/gpu/GPU_matrix.h @@ -48,14 +48,11 @@ void gpuPushMatrix(eGPUMatrixMode stack); void gpuPopMatrix(eGPUMatrixMode stack); void gpuLoadMatrix(eGPUMatrixMode stack, const float m[16]); -void gpuLoadMatrixd(eGPUMatrixMode stack, const double m[16]); const float *gpuGetMatrix(eGPUMatrixMode stack, float m[16]); -void gpuGetMatrixd(eGPUMatrixMode stack, double m[16]); void gpuLoadIdentity(eGPUMatrixMode stack); void gpuMultMatrix(eGPUMatrixMode stack, const float m[16]); -void gpuMultMatrixd(eGPUMatrixMode stack, const double m[16]); void gpuTranslate(eGPUMatrixMode stack, float x, float y, float z); void gpuScale(eGPUMatrixMode stack, GLfloat x, GLfloat y, GLfloat z); @@ -78,7 +75,6 @@ void gpu_commit_matrix(void); void GPU_feedback_vertex_3fv(GLenum type, GLfloat x, GLfloat y, GLfloat z, GLfloat out[3]); void GPU_feedback_vertex_4fv(GLenum type, GLfloat x, GLfloat y, GLfloat z, GLfloat w, GLfloat out[4]); -void GPU_feedback_vertex_4dv(GLenum type, GLdouble x, GLdouble y, GLdouble z, GLdouble w, GLdouble out[4]); #if defined(GLEW_ES_ONLY) diff --git a/source/blender/gpu/intern/gpu_matrix.c b/source/blender/gpu/intern/gpu_matrix.c index 29b8c02..9a938cc 100644 --- a/source/blender/gpu/intern/gpu_matrix.c +++ b/source/blender/gpu/intern/gpu_matrix.c @@ -220,22 +220,6 @@ void gpuLoadMatrix(eGPUMatrixMode stack, const float *m) CHECKMAT(ms_current); } -void gpuLoadMatrixd(eGPUMatrixMode stack, const double *md) -{ - GPU_matrix_stack *ms_current = mstacks + stack; - float mf[16]; - int i; - - for (i = 0; i < 16; i++) { - mf[i] = md[i]; - } - - copy_m4_m4(ms_current->dynstack[ms_current->pos], (float (*)[4])mf); - - CHECKMAT(ms_current); -} - - const GLfloat *gpuGetMatrix(eGPUMatrixMode stack, GLfloat *m) { GPU_matrix_stack *ms_select = mstacks + stack; @@ -249,20 +233,6 @@ const GLfloat *gpuGetMatrix(eGPUMatrixMode stack, GLfloat *m) } } -void gpuGetMatrixd(eGPUMatrixMode stack, double m[16]) -{ - GPU_matrix_stack *ms_select = mstacks + stack; - - if (m) { - int i; - float *f = ms_select->dynstack[ms_select->pos][0]; - for (i = 0; i < 16; i++) { - m[i] = f[i]; - /* copy_m3_m3d(); should use something like */ - } - } -} - void gpuLoadIdentity(eGPUMatrixMode stack) { GPU_matrix_stack *ms_current = mstacks + stack; @@ -298,18 +268,6 @@ void gpuMultMatrix(eGPUMatrixMode stack, const float *m) CHECKMAT(ms_current); } -void gpuMultMatrixd(eGPUMatrixMode stack, const double *m) -{ - GLfloat mf[16]; - GLint i; - - for (i = 0; i < 16; i++) { - mf[i] = m[i]; - } - - gpuMultMatrix(stack, mf); -} - void gpuRotateVector(eGPUMatrixMode stack, GLfloat deg, GLfloat vector[3]) { GPU_matrix_stack *ms_current = mstacks + stack; @@ -459,10 +417,3 @@ void GPU_feedback_vertex_4fv(GLenum type, GLfloat x, GLfloat y, GLfloat z, GLflo float in[4] = {x, y, z, w}; mul_v4_m4v4(out, m[0], in); } - -void GPU_feedback_vertex_4dv(GLenum type, GLdouble x, GLdouble y, GLdouble z, GLdouble w, GLdouble out[3]) -{ - GPU_matrix *m = (GPU_matrix*)gpuGetMatrix(type, NULL); - double in[4] = {x, y, z, w}; - mul_v4d_m4v4d(out, m[0], in); -} _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org https://lists.blender.org/mailman/listinfo/bf-blender-cvs