1 From 757649a766f90e745f24df1d191caeef15c71399 Mon Sep 17 00:00:00 2001
2 From: Otavio Salvador <otavio@ossystems.com.br>
3 Date: Tue, 4 Jun 2013 09:28:51 -0300
4 Subject: [PATCH] Replace glWindowPos2iARB calls with glWindowPos2i
6 Vivante libGL does not provide the glWindowPos2iARB symbol, but
7 glWindowPos2i. Use this instead.
9 Upstream-Status: Inapropriate [embedded specific]
11 Reported-by: Jeremy Stashluk <jstashluk@dekaresearch.com>
12 Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
14 src/demos/copypix.c | 4 ++--
15 src/demos/engine.c | 2 +-
16 src/demos/fogcoord.c | 4 ++--
17 src/glsl/shadow_sampler.c | 2 +-
18 src/tests/auxbuffer.c | 2 +-
19 src/tests/copypixrate.c | 2 +-
20 src/tests/drawbuffers.c | 2 +-
21 src/tests/drawbuffers2.c | 2 +-
22 src/tests/fbotest1.c | 2 +-
23 src/tests/fbotest2.c | 4 ++--
24 src/tests/fbotest3.c | 2 +-
25 src/tests/readrate.c | 10 +++++-----
26 src/tests/viewmemory.c | 2 +-
27 src/trivial/clear-fbo-scissor.c | 2 +-
28 src/trivial/clear-fbo-tex.c | 2 +-
29 src/trivial/clear-fbo.c | 2 +-
30 src/trivial/readpixels.c | 2 +-
31 src/trivial/tri-fbo.c | 2 +-
32 src/xdemos/glxsnoop.c | 2 +-
33 src/xdemos/wincopy.c | 4 ++--
34 20 files changed, 28 insertions(+), 28 deletions(-)
36 diff --git a/src/demos/copypix.c b/src/demos/copypix.c
37 index 286c5a9..041b567 100644
38 --- a/src/demos/copypix.c
39 +++ b/src/demos/copypix.c
40 @@ -54,7 +54,7 @@ static void Display( void )
41 glClear( GL_COLOR_BUFFER_BIT );
43 /* draw original image */
44 - glWindowPos2iARB(dx, dy);
45 + glWindowPos2i(dx, dy);
46 glDrawPixels(ImgWidth, ImgHeight, ImgFormat, GL_UNSIGNED_BYTE, Image);
49 @@ -71,7 +71,7 @@ static void Display( void )
52 glPixelZoom(Xzoom, Yzoom);
53 - glWindowPos2iARB(Xpos, Ypos);
54 + glWindowPos2i(Xpos, Ypos);
55 glCopyPixels(dx, dy, ImgWidth, ImgHeight, GL_COLOR);
58 diff --git a/src/demos/engine.c b/src/demos/engine.c
59 index 928fcbb..beace4c 100644
60 --- a/src/demos/engine.c
61 +++ b/src/demos/engine.c
62 @@ -971,7 +971,7 @@ Draw(void)
63 glDisable(GL_LIGHTING);
64 glDisable(GL_TEXTURE_2D);
66 - glWindowPos2iARB(10, 10);
67 + glWindowPos2i(10, 10);
70 glEnable(GL_LIGHTING);
71 diff --git a/src/demos/fogcoord.c b/src/demos/fogcoord.c
72 index 567eec0..e833009 100644
73 --- a/src/demos/fogcoord.c
74 +++ b/src/demos/fogcoord.c
75 @@ -68,14 +68,14 @@ PrintInfo(void)
77 sprintf(s, "Mode(m): %s Start(s/S): %g End(e/E): %g Density(d/D): %g",
78 ModeStr, fogStart, fogEnd, fogDensity);
79 - glWindowPos2iARB(5, 20);
80 + glWindowPos2i(5, 20);
83 sprintf(s, "Arrays(a): %s glFogCoord(c): %s EyeZ(z/z): %g",
84 (Arrays ? "Yes" : "No"),
85 (fogCoord ? "Yes" : "No"),
87 - glWindowPos2iARB(5, 5);
88 + glWindowPos2i(5, 5);
92 diff --git a/src/glsl/shadow_sampler.c b/src/glsl/shadow_sampler.c
93 index b830030..eb82d8b 100644
94 --- a/src/glsl/shadow_sampler.c
95 +++ b/src/glsl/shadow_sampler.c
96 @@ -85,7 +85,7 @@ Redisplay(void)
100 - glWindowPos2iARB(80, 20);
101 + glWindowPos2i(80, 20);
102 PrintString("white black white black");
105 diff --git a/src/tests/auxbuffer.c b/src/tests/auxbuffer.c
106 index 5fa399a..0cd5f47 100644
107 --- a/src/tests/auxbuffer.c
108 +++ b/src/tests/auxbuffer.c
109 @@ -419,7 +419,7 @@ event_loop(Display *dpy, Window win)
110 /* Copy aux buffer image to back color buffer */
111 glReadBuffer(GL_AUX0);
112 glDrawBuffer(GL_BACK);
113 - glWindowPos2iARB(0, 0);
114 + glWindowPos2i(0, 0);
115 glDisable(GL_DEPTH_TEST);
116 glCopyPixels(0, 0, WinWidth, WinHeight, GL_COLOR);
117 glEnable(GL_DEPTH_TEST);
118 diff --git a/src/tests/copypixrate.c b/src/tests/copypixrate.c
119 index 2f64e0a..df1f9b0 100644
120 --- a/src/tests/copypixrate.c
121 +++ b/src/tests/copypixrate.c
122 @@ -91,7 +91,7 @@ BlitOne(void)
126 - glWindowPos2iARB(x, y);
127 + glWindowPos2i(x, y);
128 glCopyPixels(0, 0, ImgWidth, ImgHeight, GL_COLOR);
131 diff --git a/src/tests/drawbuffers.c b/src/tests/drawbuffers.c
132 index fa2f8a7..cd5033f 100644
133 --- a/src/tests/drawbuffers.c
134 +++ b/src/tests/drawbuffers.c
135 @@ -88,7 +88,7 @@ Display(void)
137 glDisable(GL_DEPTH_TEST);
138 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
139 - glWindowPos2iARB(0, 0);
140 + glWindowPos2i(0, 0);
141 glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
144 diff --git a/src/tests/drawbuffers2.c b/src/tests/drawbuffers2.c
145 index 5bcf0b2..84d444b 100644
146 --- a/src/tests/drawbuffers2.c
147 +++ b/src/tests/drawbuffers2.c
148 @@ -112,7 +112,7 @@ Display(void)
150 glDisable(GL_DEPTH_TEST);
151 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
152 - glWindowPos2iARB(0, 0);
153 + glWindowPos2i(0, 0);
154 glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
157 diff --git a/src/tests/fbotest1.c b/src/tests/fbotest1.c
158 index 161903c..5930a6d 100644
159 --- a/src/tests/fbotest1.c
160 +++ b/src/tests/fbotest1.c
161 @@ -61,7 +61,7 @@ Display( void )
164 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
165 - glWindowPos2iARB(0, 0);
166 + glWindowPos2i(0, 0);
167 glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
170 diff --git a/src/tests/fbotest2.c b/src/tests/fbotest2.c
171 index 6ef7f12..11c867e 100644
172 --- a/src/tests/fbotest2.c
173 +++ b/src/tests/fbotest2.c
174 @@ -72,7 +72,7 @@ Display( void )
176 glDisable(GL_DEPTH_TEST); /* in case window has depth buffer */
178 - glWindowPos2iARB(0, 0);
179 + glWindowPos2i(0, 0);
180 glCopyPixels(0, 0, Width, Height, GL_COLOR);
183 @@ -95,7 +95,7 @@ Display( void )
185 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
186 glDisable(GL_DEPTH_TEST); /* in case window has depth buffer */
187 - glWindowPos2iARB(0, 0);
188 + glWindowPos2i(0, 0);
189 glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
192 diff --git a/src/tests/fbotest3.c b/src/tests/fbotest3.c
193 index 19f684d..e6d7710 100644
194 --- a/src/tests/fbotest3.c
195 +++ b/src/tests/fbotest3.c
196 @@ -79,7 +79,7 @@ Display( void )
198 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
199 glDisable(GL_DEPTH_TEST); /* in case window has depth buffer */
200 - glWindowPos2iARB(0, 0);
201 + glWindowPos2i(0, 0);
202 glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
205 diff --git a/src/tests/readrate.c b/src/tests/readrate.c
206 index 3859cf4..81eb8a3 100644
207 --- a/src/tests/readrate.c
208 +++ b/src/tests/readrate.c
209 @@ -85,7 +85,7 @@ MeasureFormat(struct format_type *fmt, GLint width, GLint height, GLuint pbo)
213 - glWindowPos2iARB(0,0);
214 + glWindowPos2i(0,0);
215 glDrawPixels(width, height,
216 fmt->Format, fmt->Type, Buffer);
218 @@ -137,21 +137,21 @@ Draw(void)
220 glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
222 - glWindowPos2iARB(10, y);
223 + glWindowPos2i(10, y);
224 sprintf(str, "ReadPixels size: %d x %d", width, height);
228 - glWindowPos2iARB(10, y);
229 + glWindowPos2i(10, y);
230 PrintString("Press up/down/left/right to change image size.");
233 - glWindowPos2iARB(10, y);
234 + glWindowPos2i(10, y);
235 PrintString("Press 'b' to run benchmark test.");
239 - glWindowPos2iARB(10, y);
240 + glWindowPos2i(10, y);
241 PrintString("Testing...");
244 diff --git a/src/tests/viewmemory.c b/src/tests/viewmemory.c
245 index 16044b9..3584c33 100644
246 --- a/src/tests/viewmemory.c
247 +++ b/src/tests/viewmemory.c
248 @@ -95,7 +95,7 @@ Draw(void)
250 glDisable(GL_TEXTURE_2D);
252 - glWindowPos2iARB(10, 10);
253 + glWindowPos2i(10, 10);
257 diff --git a/src/trivial/clear-fbo-scissor.c b/src/trivial/clear-fbo-scissor.c
258 index a30935c..5c15200 100644
259 --- a/src/trivial/clear-fbo-scissor.c
260 +++ b/src/trivial/clear-fbo-scissor.c
261 @@ -182,7 +182,7 @@ Draw(void)
264 glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
265 - glWindowPos2iARB(0, 0);
266 + glWindowPos2i(0, 0);
267 glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
270 diff --git a/src/trivial/clear-fbo-tex.c b/src/trivial/clear-fbo-tex.c
271 index de84f98..f0fbdf6 100644
272 --- a/src/trivial/clear-fbo-tex.c
273 +++ b/src/trivial/clear-fbo-tex.c
274 @@ -140,7 +140,7 @@ static void Draw( void )
275 glClearColor(0.8, 0.8, 0, 0.0);
276 glClear(GL_COLOR_BUFFER_BIT);
278 - glWindowPos2iARB(30, 30);
279 + glWindowPos2i(30, 30);
280 glDrawPixels(Width-60, Height-60, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
283 diff --git a/src/trivial/clear-fbo.c b/src/trivial/clear-fbo.c
284 index 10d830b..3fee3e3 100644
285 --- a/src/trivial/clear-fbo.c
286 +++ b/src/trivial/clear-fbo.c
287 @@ -116,7 +116,7 @@ Draw(void)
288 glClearColor(0.8, 0.8, 0, 0.0);
289 glClear(GL_COLOR_BUFFER_BIT);
291 - glWindowPos2iARB(30, 30);
292 + glWindowPos2i(30, 30);
293 glDrawPixels(Width-60, Height-60, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
296 diff --git a/src/trivial/readpixels.c b/src/trivial/readpixels.c
297 index ccce4ed..74e0546 100644
298 --- a/src/trivial/readpixels.c
299 +++ b/src/trivial/readpixels.c
300 @@ -71,7 +71,7 @@ static void Draw(void)
301 printf("Pixel(0,0) = %f, %f, %f, %f\n",
302 image[0], image[1], image[2], image[3]);
303 /* draw to right half of window */
304 - glWindowPos2iARB(Width, 0);
305 + glWindowPos2i(Width, 0);
306 glPixelZoom(Zoom, Zoom);
307 glDrawPixels(Width, Height, GL_RGBA, GL_FLOAT, image);
309 diff --git a/src/trivial/tri-fbo.c b/src/trivial/tri-fbo.c
310 index d5800b2..dd1f21a 100644
311 --- a/src/trivial/tri-fbo.c
312 +++ b/src/trivial/tri-fbo.c
313 @@ -119,7 +119,7 @@ static void Draw( void )
314 glClearColor(0.8, 0.8, 0, 0.0);
315 glClear(GL_COLOR_BUFFER_BIT);
317 - glWindowPos2iARB(30, 30);
318 + glWindowPos2i(30, 30);
319 glDrawPixels(Width-60, Height-60, GL_RGBA, GL_UNSIGNED_BYTE, buffer);
322 diff --git a/src/xdemos/glxsnoop.c b/src/xdemos/glxsnoop.c
323 index 2215cfd..13d2b2d 100644
324 --- a/src/xdemos/glxsnoop.c
325 +++ b/src/xdemos/glxsnoop.c
326 @@ -91,7 +91,7 @@ redraw(Display *dpy, Window srcWin, Window dstWin )
329 glXMakeCurrent(dpy, dstWin, Context);
330 - glWindowPos2iARB(0, 0);
331 + glWindowPos2i(0, 0);
332 glDrawBuffer(GL_FRONT);
333 glDrawPixels(Width, Height, GL_RGBA, GL_UNSIGNED_BYTE, image);
335 diff --git a/src/xdemos/wincopy.c b/src/xdemos/wincopy.c
336 index f670983..d010085 100644
337 --- a/src/xdemos/wincopy.c
338 +++ b/src/xdemos/wincopy.c
339 @@ -156,11 +156,11 @@ Redraw(void)
340 glClear(GL_COLOR_BUFFER_BIT);
343 - glWindowPos2iARB(-2, -2);
344 + glWindowPos2i(-2, -2);
345 glCopyPixels(-2, -2, Width[0] + 4, Height[0] + 4, GL_COLOR);
348 - glWindowPos2iARB(0, 0);
349 + glWindowPos2i(0, 0);
350 glCopyPixels(0, 0, Width[0], Height[0], GL_COLOR);