Nux

Merge lp:~unity-team/nux/nux.dont_pass_pointers_to_temporaries into lp:nux

Proposed by Sam Spilsbury
Status: Merged
Merged at revision: 372
Proposed branch: lp:~unity-team/nux/nux.dont_pass_pointers_to_temporaries
Merge into: lp:nux
Diff against target: 250 lines (+60/-39)
3 files modified
NuxGraphics/GLSh_ColorPicker.cpp (+3/-1)
NuxGraphics/GLSh_DrawFunction.cpp (+3/-2)
NuxGraphics/RenderingPipeGLSL.cpp (+54/-36)
To merge this branch: bzr merge lp:~unity-team/nux/nux.dont_pass_pointers_to_temporaries
Reviewer Review Type Date Requested Status
Neil J. Patel (community) Approve
Review via email: mp+64218@code.launchpad.net

Description of the change

Work with -fpermissive

To post a comment you must log in.
Revision history for this message
Andrea Cimitan (cimi) wrote :

compiles fine with the new gcc in Oneiric

Revision history for this message
Tim Penhey (thumper) wrote :

On Sat, 11 Jun 2011 04:29:58 you wrote:
> Sam "SmSpillaz" Spilsbury has proposed merging
> lp:~unity-team/nux/nux.dont_pass_pointers_to_temporaries into lp:nux.
>
> Requested reviews:
> Unity Team (unity-team)
>
> For more details, see:
> https://code.launchpad.net/~unity-team/nux/nux.dont_pass_pointers_to_tempor
> aries/+merge/64218
>
> Work with -fpermissive

Sam,

Can we *please* not use the C style casts? If the converstion isn't handled
by the compiler, we should perhaps look at the parameters we are passing in.

What does the code do if we use:
 sprog->SetUniformLocMatrix4fv(VPMatrixLocation, 1, false, &(MVPMatrix.m));
instead of:
 sprog->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat
*) & (MVPMatrix.m) );

Perhaps we add a method to the Matrix4 class to get the matrix as a float*

Tim

Revision history for this message
Neil J. Patel (njpatel) wrote :

Approved. We can fix C-style casts in another merge. Thanks Sam.

review: Approve
Revision history for this message
David Barth (dbarth) wrote :

Sam, Tim,

Can you open a new branch to resolve the casts issue separately. Neil needs to be unblocked to land things first.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NuxGraphics/GLSh_ColorPicker.cpp'
2--- NuxGraphics/GLSh_ColorPicker.cpp 2011-05-26 21:08:18 +0000
3+++ NuxGraphics/GLSh_ColorPicker.cpp 2011-06-10 16:29:36 +0000
4@@ -372,7 +372,9 @@
5 int VertexLocation = sprog->GetAttributeLocation ("AVertex");
6
7 int VPMatrixLocation = sprog->GetUniformLocationARB ("ViewProjectionMatrix");
8- sprog->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetGraphicsDisplay()->GetGraphicsEngine()->GetOpenGLModelViewProjectionMatrix().m) );
9+ Matrix4 MVPMatrix = GetGraphicsDisplay()->GetGraphicsEngine ()->GetOpenGLModelViewProjectionMatrix ();
10+
11+ sprog->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m) );
12
13 int ColorBase = sprog->GetUniformLocationARB ("Color");
14 int RectPosition = sprog->GetUniformLocationARB ("RectPosition");
15
16=== modified file 'NuxGraphics/GLSh_DrawFunction.cpp'
17--- NuxGraphics/GLSh_DrawFunction.cpp 2011-05-26 21:08:18 +0000
18+++ NuxGraphics/GLSh_DrawFunction.cpp 2011-06-10 16:29:36 +0000
19@@ -143,8 +143,9 @@
20
21 int VertexLocation = sprog->GetAttributeLocation ("AVertex");
22
23- int VPMatrixLocation = sprog->GetUniformLocationARB ("ViewProjectionMatrix");
24- sprog->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetGraphicsDisplay()->GetGraphicsEngine()->GetOpenGLModelViewProjectionMatrix().m) );
25+ int VPMatrixLocation = sprog->GetUniformLocationARB ("ViewProjectionMatrix");
26+ Matrix4 MVPMatrix = GetGraphicsDisplay()->GetGraphicsEngine()->GetOpenGLModelViewProjectionMatrix();
27+ sprog->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m) );
28
29 GetGraphicsDisplay()->GetGraphicsEngine()->SetTexture (GL_TEXTURE0, m_device_texture);
30
31
32=== modified file 'NuxGraphics/RenderingPipeGLSL.cpp'
33--- NuxGraphics/RenderingPipeGLSL.cpp 2011-05-26 21:08:18 +0000
34+++ NuxGraphics/RenderingPipeGLSL.cpp 2011-06-10 16:29:36 +0000
35@@ -899,8 +899,9 @@
36 int VertexLocation = ShaderProg->GetAttributeLocation ("AVertex");
37 int VertexColorLocation = ShaderProg->GetAttributeLocation ("VertexColor");
38
39- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
40- ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m) );
41+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
42+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
43+ ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m) );
44
45 CHECKGL ( glEnableVertexAttribArrayARB (VertexLocation) );
46 CHECKGL ( glVertexAttribPointerARB ( (GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 32, VtxBuffer) );
47@@ -960,8 +961,9 @@
48 SetTexture (GL_TEXTURE0, DeviceTexture);
49 CHECKGL ( glUniform1iARB (TextureObjectLocation, 0) );
50
51- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
52- ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m) );
53+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
54+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
55+ ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m) );
56
57 CHECKGL ( glEnableVertexAttribArrayARB (VertexLocation) );
58 CHECKGL ( glVertexAttribPointerARB ( (GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 48, VtxBuffer) );
59@@ -1036,8 +1038,9 @@
60 CHECKGL ( glUniform1iARB (TextureObjectLocation, 0) );
61 }
62
63- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
64- ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m) );
65+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
66+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
67+ ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m) );
68
69 if (VertexLocation != -1)
70 {
71@@ -1119,8 +1122,9 @@
72 CHECKGL ( glUniform4fARB (TextureCoef0Location, color0.red, color0.green, color0.blue, color0.alpha ) );
73 CHECKGL ( glUniform4fARB (TextureCoef1Location, color1.red, color1.green, color1.blue, color1.alpha ) );
74
75- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
76- ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m) );
77+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
78+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
79+ ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m) );
80
81 CHECKGL ( glEnableVertexAttribArrayARB (VertexLocation) );
82 CHECKGL ( glVertexAttribPointerARB ( (GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 48, VtxBuffer) );
83@@ -1196,8 +1200,9 @@
84 CHECKGL ( glUniform4fARB (TextureCoef0Location, c0.red, c0.green, c0.blue, c0.alpha ) );
85 CHECKGL ( glUniform4fARB (TextureCoef1Location, c1.red, c1.green, c1.blue, c1.alpha ) );
86
87- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
88- ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m) );
89+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
90+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
91+ ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m) );
92
93 CHECKGL ( glEnableVertexAttribArrayARB (VertexLocation) );
94 CHECKGL ( glVertexAttribPointerARB ( (GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 48, VtxBuffer) );
95@@ -1272,8 +1277,9 @@
96 CHECKGL ( glUniform4fARB (TextureCoef0Location, color0.red, color0.green, color0.blue, color0.alpha ) );
97 CHECKGL ( glUniform4fARB (TextureCoef1Location, color1.red, color1.green, color1.blue, color1.alpha ) );
98
99- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
100- ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m) );
101+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
102+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
103+ ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m) );
104
105 CHECKGL ( glEnableVertexAttribArrayARB (VertexLocation) );
106 CHECKGL ( glVertexAttribPointerARB ( (GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 48, VtxBuffer) );
107@@ -1361,8 +1367,9 @@
108 CHECKGL ( glUniform4fARB (TextureCoef2Location, color2.red, color2.green, color2.blue, color2.alpha ) );
109 CHECKGL ( glUniform4fARB (TextureCoef3Location, color3.red, color3.green, color3.blue, color3.alpha ) );
110
111- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
112- ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m) );
113+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
114+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
115+ ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m) );
116
117 CHECKGL ( glEnableVertexAttribArrayARB (VertexLocation) );
118 CHECKGL ( glVertexAttribPointerARB ( (GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 80, VtxBuffer) );
119@@ -1440,8 +1447,9 @@
120 int VertexLocation = m_SlColor->GetAttributeLocation ("AVertex");
121 int VertexColorLocation = m_SlColor->GetAttributeLocation ("VertexColor");
122
123- int VPMatrixLocation = m_SlColor->GetUniformLocationARB ("ViewProjectionMatrix");
124- m_SlColor->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m) );
125+ int VPMatrixLocation = m_SlColor->GetUniformLocationARB ("ViewProjectionMatrix");
126+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
127+ m_SlColor->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m) );
128
129 CHECKGL ( glEnableVertexAttribArrayARB (VertexLocation) );
130 CHECKGL ( glVertexAttribPointerARB ( (GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 32, VtxBuffer) );
131@@ -1493,8 +1501,9 @@
132
133 CHECKGL ( glUniform1iARB (TextureObjectLocation, 0) );
134
135- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
136- ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m) );
137+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
138+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
139+ ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m) );
140
141 CHECKGL ( glEnableVertexAttribArrayARB (VertexLocation) );
142 CHECKGL ( glVertexAttribPointerARB ( (GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 48, VtxBuffer) );
143@@ -1558,8 +1567,9 @@
144
145 CHECKGL ( glUniform1iARB (TextureObjectLocation, 0) );
146
147- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
148- ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m) );
149+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
150+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
151+ ShaderProg->SetUniformLocMatrix4fv ( (GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m) );
152
153 CHECKGL ( glEnableVertexAttribArrayARB (VertexLocation) );
154 CHECKGL ( glVertexAttribPointerARB ( (GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 48, VtxBuffer) );
155@@ -1633,8 +1643,9 @@
156
157 CHECKGL ( glUniform4fARB (Color0Location, c0.red, c0.green, c0.blue, c0.alpha));
158
159- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
160- ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m));
161+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
162+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
163+ ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m));
164
165 CHECKGL ( glEnableVertexAttribArrayARB (VertexLocation) );
166 CHECKGL ( glVertexAttribPointerARB ((GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 32, VtxBuffer));
167@@ -1694,8 +1705,9 @@
168
169 CHECKGL ( glUniform4fARB (Color0Location, c0.red, c0.green, c0.blue, c0.alpha));
170
171- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
172- ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m));
173+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
174+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
175+ ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m));
176
177 CHECKGL (glEnableVertexAttribArrayARB (VertexLocation));
178 CHECKGL (glVertexAttribPointerARB ((GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 32, VtxBuffer));
179@@ -1763,8 +1775,9 @@
180
181 CHECKGL( glUniform2fARB(TextureSizeLocation, width, height) );
182
183- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
184- ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m));
185+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
186+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
187+ ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m));
188
189 CHECKGL (glEnableVertexAttribArrayARB (VertexLocation));
190 CHECKGL (glVertexAttribPointerARB ((GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 32, VtxBuffer));
191@@ -1834,8 +1847,9 @@
192
193 CHECKGL( glUniform2fARB(TextureSizeLocation, width, height) );
194
195- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
196- ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m));
197+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
198+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
199+ ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m));
200
201 CHECKGL (glEnableVertexAttribArrayARB (VertexLocation));
202 CHECKGL (glVertexAttribPointerARB ((GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 32, VtxBuffer));
203@@ -1903,8 +1917,9 @@
204
205 CHECKGL( glUniform2fARB(TextureSizeLocation, width, height) );
206
207- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
208- ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m));
209+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
210+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
211+ ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m));
212
213 CHECKGL (glEnableVertexAttribArrayARB (VertexLocation));
214 CHECKGL (glVertexAttribPointerARB ((GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 32, VtxBuffer));
215@@ -1974,8 +1989,9 @@
216
217 CHECKGL( glUniform2fARB(TextureSizeLocation, width, height) );
218
219- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
220- ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m));
221+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
222+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
223+ ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m));
224
225 CHECKGL (glEnableVertexAttribArrayARB (VertexLocation));
226 CHECKGL (glVertexAttribPointerARB ((GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 32, VtxBuffer));
227@@ -2052,8 +2068,9 @@
228 v[0] = color_matrix.m[3][0]; v[1] = color_matrix.m[3][1]; v[2] = color_matrix.m[3][2]; v[3] = color_matrix.m[3][3]; v[4] = offset.w;
229 CHECKGL (glUniform1fvARB (MatrixRow3Location, 5, v));
230
231- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
232- ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix().m));
233+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
234+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
235+ ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m));
236
237 CHECKGL (glEnableVertexAttribArrayARB (VertexLocation));
238 CHECKGL (glVertexAttribPointerARB ((GLuint) VertexLocation, 4, GL_FLOAT, GL_FALSE, 32, VtxBuffer));
239@@ -2503,8 +2520,9 @@
240 SetTexture (GL_TEXTURE0, DeviceTexture);
241 CHECKGL ( glUniform1iARB (TextureObjectLocation, 0) );
242
243- int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
244- ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (GetOpenGLModelViewProjectionMatrix ().m));
245+ int VPMatrixLocation = ShaderProg->GetUniformLocationARB ("ViewProjectionMatrix");
246+ Matrix4 MVPMatrix = GetOpenGLModelViewProjectionMatrix();
247+ ShaderProg->SetUniformLocMatrix4fv ((GLint) VPMatrixLocation, 1, false, (GLfloat *) & (MVPMatrix.m));
248
249 ShaderProg->SetUniform4f ((GLint) PixelSizeLocation, (float)pixel_size / (float)tex_width, (float)pixel_size / (float)tex_height, 1.0f, 1.0f);
250 ShaderProg->SetUniform4f ((GLint) PixelSizeInvLocation, (float)tex_width / (float)pixel_size, (float)tex_height / (float)pixel_size, 1.0f, 1.0f);

Subscribers

People subscribed via source and target branches