Differences From Artifact [a418a3dce6]:
- File
src/OFColor+Cube.m
— part of check-in
[75e920ae30]
at
2025-03-29 14:25:43
on branch trunk
— Switch from clang-format to manual formatting
clang-format does too many weird things. (user: js, size: 242) [annotate] [blame] [check-ins using]
To Artifact [054d4ed36a]:
- File src/OFColor+Cube.m — part of check-in [cd2ac12a14] at 2025-03-29 22:29:22 on branch trunk — Add variables with a getter / setter block (user: js, size: 595) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 7 8 9 10 11 12 | #include "cube.h" #import "OFColor+Cube.h" @implementation OFColor (Cube) - (void)cube_setAsGLColor { float red, green, blue, alpha; [self getRed: &red green: &green blue: &blue alpha: &alpha]; glColor4f(red, green, blue, alpha); } @end | > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 | #include "cube.h" #import "OFColor+Cube.h" @implementation OFColor (Cube) - (void)cube_setAsGLColor { float red, green, blue, alpha; [self getRed: &red green: &green blue: &blue alpha: &alpha]; glColor4f(red, green, blue, alpha); } - (void)cube_setAsGLClearColor { float red, green, blue, alpha; [self getRed: &red green: &green blue: &blue alpha: &alpha]; glClearColor(red, green, blue, alpha); } - (void)cube_setAsGLFogColor { float color[4]; [self getRed: &color[0] green: &color[1] blue: &color[2] alpha: &color[3]]; glFogfv(GL_FOG_COLOR, color); } @end |