Subversion Repositories gelsvn

Rev

Rev 370 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 370 Rev 373
Line 5... Line 5...
5
 *  Created by J. Andreas Bærentzen on 05/08/08.
5
 *  Created by J. Andreas Bærentzen on 05/08/08.
6
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
6
 *  Copyright 2008 __MyCompanyName__. All rights reserved.
7
 *
7
 *
8
 */
8
 */
9
#include <iostream>
9
#include <iostream>
10
#include "glsl_shader.h"
10
#include <GLGraphics/glsl_shader.h>
11
#include "wireframe.h"
11
#include "wireframe.h"
12
 
12
 
13
using namespace std;
13
using namespace std;
-
 
14
using namespace GLGraphics;
14
 
15
 
15
namespace 
16
namespace 
16
{
17
{
17
	const string vp = 
18
	const string vp = 
18
	"#version 120\n"
19
	"#version 120\n"
Line 113... Line 114...
113
	
114
	
114
	GLint vpdim[4];
115
	GLint vpdim[4];
115
	glGetIntegerv(GL_VIEWPORT,vpdim); 
116
	glGetIntegerv(GL_VIEWPORT,vpdim); 
116
	
117
	
117
	// Set the value of a uniform
118
	// Set the value of a uniform
118
	glUniform2f(glGetUniformLocation(prog_P0,"WIN_SCALE"), vpdim[2]/2,vpdim[3]/2);
119
	glUniform2f(glGetUniformLocation(prog_P0,"WIN_SCALE"), 
-
 
120
              static_cast<float>(vpdim[2]/2), static_cast<float>(vpdim[3]/2));
119
}
121
}