Commit d4c1a67996a182c59f6641b9b7ebe4b274e9ae98
Committed by
Gerrit Code Review
Merge "Removed redundant BufferImage code" into devel/master
Showing
1 changed file
with
0 additions
and
30 deletions
examples/textured-mesh/textured-mesh-example.cpp
| @@ -173,36 +173,6 @@ public: | @@ -173,36 +173,6 @@ public: | ||
| 173 | stage.SetBackgroundColor(Vector4(0.0f, 0.2f, 0.2f, 1.0f)); | 173 | stage.SetBackgroundColor(Vector4(0.0f, 0.2f, 0.2f, 1.0f)); |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | - BufferImage CreateBufferImage() | ||
| 177 | - { | ||
| 178 | - BufferImage image = BufferImage::New( 200, 200, Pixel::RGB888 ); | ||
| 179 | - PixelBuffer* pixelBuffer = image.GetBuffer(); | ||
| 180 | - unsigned int stride = image.GetBufferStride(); | ||
| 181 | - for( unsigned int x=0; x<200; x++ ) | ||
| 182 | - { | ||
| 183 | - for( unsigned int y=0; y<200; y++ ) | ||
| 184 | - { | ||
| 185 | - PixelBuffer* pixel = pixelBuffer + y*stride + x*3; | ||
| 186 | - if( ((int)(x/20.0f))%2 + ((int)(y/20.0f)%2) == 1 ) | ||
| 187 | - { | ||
| 188 | - pixel[0]=255; | ||
| 189 | - pixel[1]=0; | ||
| 190 | - pixel[2]=0; | ||
| 191 | - pixel[3]=255; | ||
| 192 | - } | ||
| 193 | - else | ||
| 194 | - { | ||
| 195 | - pixel[0]=0; | ||
| 196 | - pixel[1]=0; | ||
| 197 | - pixel[2]=255; | ||
| 198 | - pixel[3]=255; | ||
| 199 | - } | ||
| 200 | - } | ||
| 201 | - } | ||
| 202 | - image.Update(); | ||
| 203 | - return image; | ||
| 204 | - } | ||
| 205 | - | ||
| 206 | /** | 176 | /** |
| 207 | * Invoked whenever the quit button is clicked | 177 | * Invoked whenever the quit button is clicked |
| 208 | * @param[in] button the quit button | 178 | * @param[in] button the quit button |