OpenGL: convert to new matrix API (part 5)
Pretty sure source/blender is now finished, with all legacy matrix calls confined to gpu_matrix.c. This was the easy part, but doing it first makes the next part much easier. TODO and XXX notes describe what is left. glMatrixMode is still in place, since the new API does not share this concept of modes. Similar for glOrtho and glFrustum which I'll tackle very soon. Part of T49450
This commit is contained in:
		@@ -58,6 +58,7 @@
 | 
			
		||||
#include "BIF_glutil.h"
 | 
			
		||||
 | 
			
		||||
#include "GPU_immediate.h"
 | 
			
		||||
#include "GPU_matrix.h"
 | 
			
		||||
 | 
			
		||||
#include "ED_anim_api.h"
 | 
			
		||||
#include "ED_gpencil.h"
 | 
			
		||||
@@ -1287,11 +1288,11 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
 | 
			
		||||
 | 
			
		||||
	if (draw_backdrop) {
 | 
			
		||||
		glMatrixMode(GL_PROJECTION);
 | 
			
		||||
		glPushMatrix();
 | 
			
		||||
		glLoadIdentity();
 | 
			
		||||
		gpuPushMatrix();
 | 
			
		||||
		gpuLoadIdentity();
 | 
			
		||||
		glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
		glPushMatrix();
 | 
			
		||||
		glLoadIdentity();
 | 
			
		||||
		gpuPushMatrix();
 | 
			
		||||
		gpuLoadIdentity();
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	glGenTextures(1, (GLuint *)&texid);
 | 
			
		||||
@@ -1420,9 +1421,9 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	if (draw_backdrop) {
 | 
			
		||||
		glPopMatrix();
 | 
			
		||||
		gpuPopMatrix();
 | 
			
		||||
		glMatrixMode(GL_PROJECTION);
 | 
			
		||||
		glPopMatrix();
 | 
			
		||||
		gpuPopMatrix();
 | 
			
		||||
		glMatrixMode(GL_MODELVIEW);
 | 
			
		||||
		return;
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user