OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 | 400 |
401 private: | 401 private: |
402 friend class IClassManager; | 402 friend class IClassManager; |
403 static ObjectBase::Ref Create(ServiceLocator* service_locator); | 403 static ObjectBase::Ref Create(ServiceLocator* service_locator); |
404 | 404 |
405 // pointer to the raw bitmap data | 405 // pointer to the raw bitmap data |
406 scoped_array<uint8> image_data_; | 406 scoped_array<uint8> image_data_; |
407 // format of the texture this is meant to represent. | 407 // format of the texture this is meant to represent. |
408 Texture::Format format_; | 408 Texture::Format format_; |
409 // width of the bitmap in pixels. | 409 // width of the bitmap in pixels. |
410 unsigned int width_; | 410 int width_; |
411 // height of the bitmap in pixels. | 411 // height of the bitmap in pixels. |
412 unsigned int height_; | 412 int height_; |
413 // number of mipmap levels in this texture. | 413 // number of mipmap levels in this texture. |
414 unsigned int num_mipmaps_; | 414 unsigned int num_mipmaps_; |
415 // is this cube-map data | 415 // is this cube-map data |
416 bool is_cubemap_; | 416 bool is_cubemap_; |
417 | 417 |
418 // utility function used in AdjustDrawImageBoundary. | 418 // utility function used in AdjustDrawImageBoundary. |
419 // It adjusts start point and related measures | 419 // It adjusts start point and related measures |
420 // for a specific dimension. | 420 // for a specific dimension. |
421 // Parameter: | 421 // Parameter: |
422 // src_a: the coordinate which is negative. | 422 // src_a: the coordinate which is negative. |
423 // dest_a: same coordinate in the other image. | 423 // dest_a: same coordinate in the other image. |
424 // src_length: length measure of source image to draw. | 424 // src_length: length measure of source image to draw. |
425 // dest_length: length measure of dest image to draw. | 425 // dest_length: length measure of dest image to draw. |
426 // src_bmp_length: length measure of src image. | 426 // src_bmp_length: length measure of src image. |
427 // Returns: | 427 // Returns: |
428 // true if adjust is successful. | 428 // true if adjust is successful. |
429 static bool AdjustDrawImageBoundHelper(int* src_a, int* dest_a, | 429 static bool AdjustDrawImageBoundHelper(int* src_a, int* dest_a, |
430 int* src_length, int* dest_length, | 430 int* src_length, int* dest_length, |
431 int src_bmp_length); | 431 int src_bmp_length); |
432 | 432 |
433 O3D_DECL_CLASS(Bitmap, ParamObject); | 433 O3D_DECL_CLASS(Bitmap, ParamObject); |
434 DISALLOW_COPY_AND_ASSIGN(Bitmap); | 434 DISALLOW_COPY_AND_ASSIGN(Bitmap); |
435 }; | 435 }; |
436 | 436 |
437 } // namespace o3d | 437 } // namespace o3d |
438 | 438 |
439 #endif // O3D_CORE_CROSS_BITMAP_H_ | 439 #endif // O3D_CORE_CROSS_BITMAP_H_ |
OLD | NEW |