Merge lp:~macslow/unity-system-compositor/spinner-visual-update into lp:unity-system-compositor

Proposed by Mirco Müller
Status: Merged
Approved by: Alexandros Frantzis
Approved revision: 233
Merged at revision: 223
Proposed branch: lp:~macslow/unity-system-compositor/spinner-visual-update
Merge into: lp:unity-system-compositor
Diff against target: 502 lines (+217/-148)
2 files modified
spinner/CMakeLists.txt (+25/-11)
spinner/eglspinner.cpp (+192/-137)
To merge this branch: bzr merge lp:~macslow/unity-system-compositor/spinner-visual-update
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Alexandros Frantzis (community) Approve
Review via email: mp+263359@code.launchpad.net

Commit message

Updated visuals of spinner boot-anim to latest spec from Design.

Description of the change

Updated visuals of spinner boot-anim to latest spec from Design.

For the reviewer's convenience there's a screencast of the branch in action:
  * http://www.youtube.com/watch?v=5AS_r85m0Qs

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Tried on desktop and mako.

Looks fine on mako, but on the desktop (1280x800 intel gpu) the logo and dots seem a bit fuzzy... perhaps we need higher resolution textures?

review: Needs Information
Revision history for this message
Alexandros Frantzis (afrantzis) wrote :

Since this targeted mainly at the phone for now, I am OK landing this and making the output more crispy on desktops/landscape later.

review: Approve
Revision history for this message
Mirco Müller (macslow) wrote :

> Tried on desktop and mako.
>
> Looks fine on mako, but on the desktop (1280x800 intel gpu) the logo and dots
> seem a bit fuzzy... perhaps we need higher resolution textures?

The assets (dots, logo) handed over are @27.pngs. The provided mock-animation only covers the phone at the moment. Once this gets a higher priority for the tablet/desktop corresponding suggestions will be provided by Design I assume. Extending this will be a smaller change.

Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Mirco Müller (macslow) wrote :

Last jenkins-failure due to "ERROR:pbuilderjenkins:Exception: Unable to find the server at api.launchpad.net".

Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'spinner/CMakeLists.txt'
2--- spinner/CMakeLists.txt 2015-06-11 09:05:02 +0000
3+++ spinner/CMakeLists.txt 2015-07-06 09:25:06 +0000
4@@ -23,15 +23,27 @@
5 endfunction()
6
7 png2header(
8- ${CMAKE_CURRENT_SOURCE_DIR}/spinner-glow.png
9- ${CMAKE_CURRENT_BINARY_DIR}/spinner_glow.h
10- spinner_glow
11-)
12-
13-png2header(
14- ${CMAKE_CURRENT_SOURCE_DIR}/spinner-logo.png
15- ${CMAKE_CURRENT_BINARY_DIR}/spinner_logo.h
16- spinner_logo
17+ ${CMAKE_CURRENT_SOURCE_DIR}/wallpaper.png
18+ ${CMAKE_CURRENT_BINARY_DIR}/wallpaper.h
19+ wallpaper
20+)
21+
22+png2header(
23+ ${CMAKE_CURRENT_SOURCE_DIR}/logo.png
24+ ${CMAKE_CURRENT_BINARY_DIR}/logo.h
25+ logo
26+)
27+
28+png2header(
29+ ${CMAKE_CURRENT_SOURCE_DIR}/white-dot.png
30+ ${CMAKE_CURRENT_BINARY_DIR}/white_dot.h
31+ white_dot
32+)
33+
34+png2header(
35+ ${CMAKE_CURRENT_SOURCE_DIR}/orange-dot.png
36+ ${CMAKE_CURRENT_BINARY_DIR}/orange_dot.h
37+ orange_dot
38 )
39
40 include_directories(
41@@ -54,8 +66,10 @@
42 eglspinner.cpp
43 miregl.h
44 miregl.cpp
45- ${CMAKE_CURRENT_BINARY_DIR}/spinner_logo.h
46- ${CMAKE_CURRENT_BINARY_DIR}/spinner_glow.h
47+ ${CMAKE_CURRENT_BINARY_DIR}/wallpaper.h
48+ ${CMAKE_CURRENT_BINARY_DIR}/logo.h
49+ ${CMAKE_CURRENT_BINARY_DIR}/white_dot.h
50+ ${CMAKE_CURRENT_BINARY_DIR}/orange_dot.h
51 )
52
53 target_link_libraries(unity-system-compositor-spinner
54
55=== modified file 'spinner/eglspinner.cpp'
56--- spinner/eglspinner.cpp 2015-06-11 09:05:02 +0000
57+++ spinner/eglspinner.cpp 2015-07-06 09:25:06 +0000
58@@ -31,8 +31,10 @@
59 #endif
60 #include <signal.h>
61
62-#include "spinner_glow.h"
63-#include "spinner_logo.h"
64+#include "wallpaper.h"
65+#include "logo.h"
66+#include "white_dot.h"
67+#include "orange_dot.h"
68
69 // this is needed for get_gu() to obtain the grid-unit value
70 #define MAX_LENGTH 256
71@@ -43,9 +45,17 @@
72 #define FILE_BASE "/etc/ubuntu-touch-session.d/"
73 #define FILE_EXTENSION ".conf"
74
75+enum TextureIds {
76+ WALLPAPER = 0,
77+ LOGO,
78+ WHITE_DOT,
79+ ORANGE_DOT,
80+ MAX_TEXTURES
81+};
82+
83 int get_gu ()
84 {
85- int gu = 10; // use 10 as a default value
86+ int gu = 13; // use 13 as a default value
87 FILE* handle = NULL;
88 int i = 0;
89 int j = 0;
90@@ -151,9 +161,10 @@
91 GL_UNSIGNED_BYTE,
92 image.pixel_data);
93 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
94- glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
95+ glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
96 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
97 glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
98+ glGenerateMipmap(GL_TEXTURE_2D);
99 glBindTexture(GL_TEXTURE_2D, 0);
100 }
101
102@@ -194,96 +205,98 @@
103 typedef struct _AnimationValues
104 {
105 double lastTimeStamp;
106- GLfloat angle;
107 GLfloat fadeBackground;
108- GLfloat fadeLogo;
109- GLfloat fadeGlow;
110+ int dot_mask;
111 } AnimationValues;
112
113+void ortho(GLfloat* mat,
114+ GLfloat left,
115+ GLfloat right,
116+ GLfloat bottom,
117+ GLfloat top,
118+ GLfloat near,
119+ GLfloat far)
120+{
121+ if (right == left ||
122+ top == bottom ||
123+ far == near ||
124+ mat == NULL)
125+ {
126+ return;
127+ }
128+
129+ mat[0] = 2.0f / (right - left);
130+ mat[1] = 0.0f;
131+ mat[2] = 0.0f;
132+ mat[3] = 0.0f;
133+
134+ mat[4] = 0.0f;
135+ mat[5] = 2.0f / (top - bottom);
136+ mat[6] = 0.0f;
137+ mat[7] = 0.0f;
138+
139+ mat[8] = 0.0f;
140+ mat[9] = 0.0f;
141+ mat[10] = -2.0f / (far - near);
142+ mat[11] = 0.0f;
143+
144+ mat[12] = -(right + left) / (right - left);
145+ mat[13] = -(top + bottom) / (top - bottom);
146+ mat[14] = -(far + near) / (far - near);
147+ mat[15] = 1.0f;
148+}
149+
150+GLfloat gu2px(GLfloat gu) {
151+ static GLfloat pixelsPerGU = get_gu();
152+
153+ return gu * pixelsPerGU;
154+}
155+
156 void
157 updateAnimation (GTimer* timer, AnimationValues* anim)
158 {
159 if (!timer || !anim)
160 return;
161
162- //1.) 0.0 - 0.6: logo fades in fully
163- //2.) 0.0 - 6.0: logo does one full spin 360°
164- //3.) 6.0 - 6.833: glow fades in fully, black-background fades out to 50%
165- //4.) 6.833 - 7.666: glow fades out fully, black-background fades out to 0%
166- //5.) 7.666 - 8.266: logo fades out fully
167- //8.266..: now spinner can be closed as all its elements are faded out
168+ static const int sequence[] = {0, 1, 3, 7, 15, 31};
169+ static int counter = 0;
170+ static double second = 0.0f;
171
172 double elapsed = g_timer_elapsed (timer, NULL);
173- double dt = elapsed - anim->lastTimeStamp;
174+
175+ if (second >= 1.0f) {
176+ second = 0.0f;
177+ counter++;
178+ } else {
179+ second += elapsed - anim->lastTimeStamp;
180+ }
181+ anim->dot_mask = sequence[counter%6];
182+
183 anim->lastTimeStamp = elapsed;
184-
185- // step 1.)
186- if (elapsed < 0.6f)
187- anim->fadeLogo += 1.6f * dt;
188-
189- // step 2.)
190- anim->angle -= (0.017453292519943f * 360.0f / 6.0f) * dt;
191-
192- // step 3.) glow
193- if (elapsed > 6.0f && elapsed < 6.833f)
194- anim->fadeGlow += 1.2f * dt;
195-
196- // Ignore the following three until we can synchronize with greeter
197-
198- // step 3.) background
199- //if (elapsed > 6.0f && elapsed < 6.833f)
200- // anim->fadeBackground -= 0.6f * dt;
201-
202- // step 4.) background
203- //if (elapsed > 7.0f)
204- // anim->fadeBackground -= 0.6f * dt;
205-
206- // step 5.)
207- //if (elapsed > 6.833f)
208- // anim->fadeLogo -= 1.6f * dt;
209 }
210
211 namespace
212 {
213-const char vShaderSrcSpinner[] =
214- "attribute vec4 vPosition; \n"
215- "attribute vec2 aTexCoords; \n"
216- "uniform float theta; \n"
217- "varying vec2 vTexCoords; \n"
218- "void main() \n"
219- "{ \n"
220- " float c = cos(theta); \n"
221- " float s = sin(theta); \n"
222- " mat2 m; \n"
223- " m[0] = vec2(c, s); \n"
224- " m[1] = vec2(-s, c); \n"
225- " vTexCoords = m * aTexCoords + vec2 (0.5, 0.5); \n"
226- " gl_Position = vec4(vPosition.xy, -1.0, 1.0); \n"
227- "} \n";
228-
229-const char fShaderSrcGlow[] =
230- "precision mediump float; \n"
231- "varying vec2 vTexCoords; \n"
232- "uniform sampler2D uSampler; \n"
233- "uniform float uFadeGlow; \n"
234- "void main() \n"
235- "{ \n"
236- " vec4 col = texture2D(uSampler, vTexCoords); \n"
237- " col = col * uFadeGlow; \n"
238- " gl_FragColor = col; \n"
239- "} \n";
240-
241-const char fShaderSrcLogo[] =
242- "precision mediump float; \n"
243- "varying vec2 vTexCoords; \n"
244- "uniform sampler2D uSampler; \n"
245- "uniform float uFadeLogo; \n"
246- "void main() \n"
247- "{ \n"
248- " vec4 col = texture2D(uSampler, vTexCoords); \n"
249- " col = col * uFadeLogo; \n"
250- " gl_FragColor = col; \n"
251- "} \n";
252+const char vShaderSrcPlain[] =
253+ "attribute vec4 aPosition; \n"
254+ "attribute vec2 aTexCoords; \n"
255+ "uniform vec2 uOffset; \n"
256+ "varying vec2 vTexCoords; \n"
257+ "uniform mat4 uProjMat; \n"
258+ "void main() \n"
259+ "{ \n"
260+ " vTexCoords = aTexCoords + vec2 (0.5, 0.5); \n"
261+ " gl_Position = uProjMat * vec4(aPosition.xy + uOffset.xy, 0.0, 1.0);\n"
262+ "} \n";
263+
264+const char fShaderSrcPlain[] =
265+ "precision mediump float; \n"
266+ "varying vec2 vTexCoords; \n"
267+ "uniform sampler2D uSampler; \n"
268+ "void main() \n"
269+ "{ \n"
270+ " gl_FragColor = texture2D(uSampler, vTexCoords);\n"
271+ "} \n";
272
273 static volatile sig_atomic_t running = 0;
274
275@@ -305,14 +318,13 @@
276 int main(int argc, char *argv[])
277 try
278 {
279- GLuint prog[2];
280- GLuint texture[2];
281- GLint vpos[2];
282- GLint theta;
283- GLint fadeGlow;
284- GLint fadeLogo;
285- GLint aTexCoords[2];
286- GLint sampler[2];
287+ GLuint prog[3];
288+ GLuint texture[MAX_TEXTURES];
289+ GLint vpos[MAX_TEXTURES];
290+ GLint aTexCoords[MAX_TEXTURES];
291+ GLint sampler[MAX_TEXTURES];
292+ GLint offset[MAX_TEXTURES];
293+ GLint projMat[MAX_TEXTURES];
294
295 auto const surfaces = mir_eglapp_init(argc, argv);
296
297@@ -326,17 +338,17 @@
298 signal(SIGINT, shutdown);
299 signal(SIGTERM, shutdown);
300
301- double pixelSize = get_gu() * 11.18;
302- const GLfloat texCoordsSpinner[] =
303+ const GLfloat texCoords[] =
304 {
305- -0.5f, 0.5f,
306+ 0.5f, -0.5f,
307+ 0.5f, 0.5f,
308 -0.5f, -0.5f,
309- 0.5f, 0.5f,
310- 0.5f, -0.5f,
311+ -0.5f, 0.5f,
312 };
313
314- prog[0] = createShaderProgram(vShaderSrcSpinner, fShaderSrcGlow);
315- prog[1] = createShaderProgram(vShaderSrcSpinner, fShaderSrcLogo);
316+ prog[WALLPAPER] = createShaderProgram(vShaderSrcPlain, fShaderSrcPlain);
317+ prog[LOGO] = createShaderProgram(vShaderSrcPlain, fShaderSrcPlain);
318+ prog[WHITE_DOT] = createShaderProgram(vShaderSrcPlain, fShaderSrcPlain);
319
320 // setup proper GL-blending
321 glEnable(GL_BLEND);
322@@ -344,32 +356,45 @@
323 glBlendEquation(GL_FUNC_ADD);
324
325 // get locations of shader-attributes/uniforms
326- vpos[0] = glGetAttribLocation(prog[0], "vPosition");
327- aTexCoords[0] = glGetAttribLocation(prog[0], "aTexCoords");
328- theta = glGetUniformLocation(prog[0], "theta");
329- sampler[0] = glGetUniformLocation(prog[0], "uSampler");
330- fadeGlow = glGetUniformLocation(prog[0], "uFadeGlow");
331- vpos[1] = glGetAttribLocation(prog[1], "vPosition");
332- aTexCoords[1] = glGetAttribLocation(prog[1], "aTexCoords");
333- sampler[1] = glGetUniformLocation(prog[1], "uSampler");
334- fadeLogo = glGetUniformLocation(prog[1], "uFadeLogo");
335+ vpos[WALLPAPER] = glGetAttribLocation(prog[WALLPAPER], "aPosition");
336+ aTexCoords[WALLPAPER] = glGetAttribLocation(prog[WALLPAPER], "aTexCoords");
337+ sampler[WALLPAPER] = glGetUniformLocation(prog[WALLPAPER], "uSampler");
338+ offset[WALLPAPER] = glGetUniformLocation(prog[WALLPAPER], "uOffset");
339+ projMat[WALLPAPER] = glGetUniformLocation(prog[WALLPAPER], "uProjMat");
340+
341+ vpos[LOGO] = glGetAttribLocation(prog[LOGO], "aPosition");
342+ aTexCoords[LOGO] = glGetAttribLocation(prog[LOGO], "aTexCoords");
343+ sampler[LOGO] = glGetUniformLocation(prog[LOGO], "uSampler");
344+ offset[LOGO] = glGetUniformLocation(prog[LOGO], "uOffset");
345+ projMat[LOGO] = glGetUniformLocation(prog[LOGO], "uProjMat");
346+
347+ vpos[WHITE_DOT] = glGetAttribLocation(prog[WHITE_DOT], "aPosition");
348+ aTexCoords[WHITE_DOT] = glGetAttribLocation(prog[WHITE_DOT], "aTexCoords");
349+ sampler[WHITE_DOT] = glGetUniformLocation(prog[WHITE_DOT], "uSampler");
350+ offset[WHITE_DOT] = glGetUniformLocation(prog[WHITE_DOT], "uOffset");
351+ projMat[WHITE_DOT] = glGetUniformLocation(prog[WHITE_DOT], "uProjMat");
352
353 // create and upload spinner-artwork
354 // note that the embedded image data has pre-multiplied alpha
355- glGenTextures(2, texture);
356- uploadTexture(texture[0], spinner_glow);
357- uploadTexture(texture[1], spinner_logo);
358+ glGenTextures(MAX_TEXTURES, texture);
359+ uploadTexture(texture[WALLPAPER], wallpaper);
360+ uploadTexture(texture[LOGO], logo);
361+ uploadTexture(texture[WHITE_DOT], white_dot);
362+ uploadTexture(texture[ORANGE_DOT], orange_dot);
363
364 // bunch of shader-attributes to enable
365- glVertexAttribPointer(aTexCoords[0], 2, GL_FLOAT, GL_FALSE, 0, texCoordsSpinner);
366- glVertexAttribPointer(aTexCoords[1], 2, GL_FLOAT, GL_FALSE, 0, texCoordsSpinner);
367- glEnableVertexAttribArray(vpos[0]);
368- glEnableVertexAttribArray(vpos[1]);
369- glEnableVertexAttribArray(aTexCoords[0]);
370- glEnableVertexAttribArray(aTexCoords[1]);
371+ glVertexAttribPointer(aTexCoords[WALLPAPER], 2, GL_FLOAT, GL_FALSE, 0, texCoords);
372+ glEnableVertexAttribArray(vpos[WALLPAPER]);
373+ glEnableVertexAttribArray(aTexCoords[WALLPAPER]);
374+ glVertexAttribPointer(aTexCoords[LOGO], 2, GL_FLOAT, GL_FALSE, 0, texCoords);
375+ glEnableVertexAttribArray(vpos[LOGO]);
376+ glEnableVertexAttribArray(aTexCoords[LOGO]);
377+ glVertexAttribPointer(aTexCoords[WHITE_DOT], 2, GL_FLOAT, GL_FALSE, 0, texCoords);
378+ glEnableVertexAttribArray(vpos[WHITE_DOT]);
379+ glEnableVertexAttribArray(aTexCoords[WHITE_DOT]);
380 glActiveTexture(GL_TEXTURE0);
381
382- AnimationValues anim = {0.0, 0.0, 1.0, 0.0, 0.0};
383+ AnimationValues anim = {0.0, 0.0, 0};
384 GTimer* timer = g_timer_new();
385
386 while (mir_eglapp_running())
387@@ -377,47 +402,77 @@
388 for (auto const& surface : surfaces)
389 surface->paint([&](unsigned int width, unsigned int height)
390 {
391- GLfloat halfRealWidth = ((2.0 / width) * pixelSize) / 2.0;
392- GLfloat halfRealHeight = ((2.0 / height) * pixelSize) / 2.0;
393-
394- const GLfloat vertices[] =
395- {
396- halfRealWidth, halfRealHeight,
397- halfRealWidth, -halfRealHeight,
398- -halfRealWidth, halfRealHeight,
399- -halfRealWidth,-halfRealHeight,
400- };
401-
402- glVertexAttribPointer(vpos[0], 2, GL_FLOAT, GL_FALSE, 0, vertices);
403- glVertexAttribPointer(vpos[1], 2, GL_FLOAT, GL_FALSE, 0, vertices);
404+ GLfloat logoWidth = gu2px (14.5f);
405+ GLfloat logoHeight = gu2px (3.0f);
406+ GLfloat logoXOffset = gu2px (1.0f);
407+ GLfloat dotSize = gu2px (0.5f);
408+ GLfloat dotXGap = gu2px (2.5f);
409+ GLfloat dotYGap = gu2px (2.0f);
410+
411+ const GLfloat fullscreen[] = {
412+ (GLfloat) width, 0.0f,
413+ (GLfloat) width, (GLfloat) height,
414+ 0.0f, 0.0f,
415+ 0.0f, (GLfloat) height
416+ };
417+
418+ const GLfloat logo[] = {
419+ logoWidth, 0.0f,
420+ logoWidth, logoHeight,
421+ 0.0f, 0.0f,
422+ 0.0f, logoHeight
423+ };
424+
425+ const GLfloat dot[] = {
426+ dotSize, 0.0f,
427+ dotSize, dotSize,
428+ 0.0f, 0.0f,
429+ 0.0f, dotSize
430+ };
431+
432+ GLfloat projMatrix[16];
433+ ortho(&projMatrix[0], 0.0f, (GLfloat) width, (GLfloat) height, 0.0f, -1.0f, 1.0f);
434
435 glViewport(0, 0, width, height);
436
437 glClearColor(BLACK, anim.fadeBackground);
438 glClear(GL_COLOR_BUFFER_BIT);
439
440- // draw glow
441- glUseProgram(prog[0]);
442- glBindTexture(GL_TEXTURE_2D, texture[0]);
443- glUniform1i(sampler[0], 0);
444- glUniform1f(theta, anim.angle);
445- glUniform1f(fadeGlow, anim.fadeGlow);
446+ // draw wallpaper backdrop
447+ glVertexAttribPointer(vpos[WALLPAPER], 2, GL_FLOAT, GL_FALSE, 0, fullscreen);
448+ glUseProgram(prog[WALLPAPER]);
449+ glBindTexture(GL_TEXTURE_2D, texture[WALLPAPER]);
450+ glUniform1i(sampler[WALLPAPER], 0);
451+ glUniform2f(offset[WALLPAPER], 0.0f, 0.0f);
452+ glUniformMatrix4fv(projMat[WALLPAPER], 1, GL_FALSE, projMatrix);
453 glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
454
455 // draw logo
456- glUseProgram(prog[1]);
457- glBindTexture(GL_TEXTURE_2D, texture[1]);
458- glUniform1i(sampler[1], 0);
459- glUniform1f(theta, anim.angle);
460- glUniform1f(fadeLogo, anim.fadeLogo);
461+ glVertexAttribPointer(vpos[LOGO], 2, GL_FLOAT, GL_FALSE, 0, logo);
462+ glUseProgram(prog[LOGO]);
463+ glBindTexture(GL_TEXTURE_2D, texture[LOGO]);
464+ glUniform1i(sampler[LOGO], 0);
465+ glUniform2f(offset[LOGO], width/2.0f - logoWidth / 2.0f + logoXOffset, height / 2.0f - logoHeight * 0.75f);
466+ glUniformMatrix4fv(projMat[LOGO], 1, GL_FALSE, projMatrix);
467 glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
468+
469+ // draw white/orange dots
470+ glVertexAttribPointer(vpos[WHITE_DOT], 2, GL_FLOAT, GL_FALSE, 0, dot);
471+ glUseProgram(prog[WHITE_DOT]);
472+ glUniform1i(sampler[WHITE_DOT], 0);
473+ glUniformMatrix4fv(projMat[WHITE_DOT], 1, GL_FALSE, projMatrix);
474+ for (int i = -2; i < 3; i++) {
475+ glBindTexture(GL_TEXTURE_2D, texture[anim.dot_mask >> (i + 2) ? ORANGE_DOT : WHITE_DOT]);
476+ glUniform2f(offset[WHITE_DOT], width/2.0f + i * dotXGap, height / 2.0f + logoHeight / 2.0f + dotYGap - logoHeight * 0.25f);
477+ glDrawArrays(GL_TRIANGLE_STRIP, 0, 4);
478+ }
479 });
480
481 // update animation variable
482 updateAnimation(timer, &anim);
483 }
484
485- glDeleteTextures(2, texture);
486+ glDeleteTextures(MAX_TEXTURES, texture);
487 g_timer_destroy (timer);
488
489 return EXIT_SUCCESS;
490
491=== added file 'spinner/logo.png'
492Binary files spinner/logo.png 1970-01-01 00:00:00 +0000 and spinner/logo.png 2015-07-06 09:25:06 +0000 differ
493=== added file 'spinner/orange-dot.png'
494Binary files spinner/orange-dot.png 1970-01-01 00:00:00 +0000 and spinner/orange-dot.png 2015-07-06 09:25:06 +0000 differ
495=== removed file 'spinner/spinner-glow.png'
496Binary files spinner/spinner-glow.png 2014-04-02 18:27:53 +0000 and spinner/spinner-glow.png 1970-01-01 00:00:00 +0000 differ
497=== removed file 'spinner/spinner-logo.png'
498Binary files spinner/spinner-logo.png 2014-04-02 18:27:53 +0000 and spinner/spinner-logo.png 1970-01-01 00:00:00 +0000 differ
499=== added file 'spinner/wallpaper.png'
500Binary files spinner/wallpaper.png 1970-01-01 00:00:00 +0000 and spinner/wallpaper.png 2015-07-06 09:25:06 +0000 differ
501=== added file 'spinner/white-dot.png'
502Binary files spinner/white-dot.png 1970-01-01 00:00:00 +0000 and spinner/white-dot.png 2015-07-06 09:25:06 +0000 differ

Subscribers

People subscribed via source and target branches