wok-next view celestia/stuff/make-dereferenced-temporaries-explicit @ rev 13362
hplip: add parallel support
author | Richard Dunbar <mojo@slitaz.org> |
---|---|
date | Thu Sep 13 00:36:01 2012 +0000 (2012-09-13) |
parents | |
children |
line source
1 --- celestia-1.6.0+dfsg.orig/src/celengine/vecgl.h
2 +++ celestia-1.6.0+dfsg/src/celengine/vecgl.h
3 @@ -89,17 +89,20 @@ inline void glScale(const Vec3f& v)
5 inline void glLightDirection(GLenum light, const Vec3f& dir)
6 {
7 - glLightfv(light, GL_POSITION, &(Vec4f(dir.x, dir.y, dir.z, 0.0f).x));
8 + Vec4f dir4(dir.x, dir.y, dir.z, 0.0f);
9 + glLightfv(light, GL_POSITION, &dir4.x);
10 }
12 inline void glLightPosition(GLenum light, const Point3f& pos)
13 {
14 - glLightfv(light, GL_POSITION, &(Vec4f(pos.x, pos.y, pos.z, 1.0f).x));
15 + Vec4f pos4(pos.x, pos.y, pos.z, 1.0f);
16 + glLightfv(light, GL_POSITION, &pos4.x);
17 }
19 inline void glLightColor(GLenum light, GLenum which, const Vec3f& color)
20 {
21 - glLightfv(light, which, &(Vec4f(color.x, color.y, color.z, 1.0f).x));
22 + Vec4f color4(color.x, color.y, color.z, 1.0f);
23 + glLightfv(light, which, &color4.x);
24 }
26 inline void glLightColor(GLenum light, GLenum which, const Vec4f& color)
27 @@ -109,15 +112,14 @@ inline void glLightColor(GLenum light, G
29 inline void glLightColor(GLenum light, GLenum which, const Color& color)
30 {
31 - glLightfv(light, which,
32 - &(Vec4f(color.red(), color.green(), color.blue(), color.alpha()).x));
33 + Vec4f color4(color.red(), color.green(), color.blue(), color.alpha());
34 + glLightfv(light, which, &color4.x);
35 }
37 inline void glAmbientLightColor(const Color& color)
38 {
39 - glLightModelfv(GL_LIGHT_MODEL_AMBIENT,
40 - &(Vec4f(color.red(), color.green(), color.blue(),
41 - color.alpha()).x));
42 + Vec4f color4(color.red(), color.green(), color.blue(), color.alpha());
43 + glLightModelfv(GL_LIGHT_MODEL_AMBIENT, &color4.x);
44 }
46 #endif // _VECGL_H_