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 463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 // passed, such as invalid parameter ID, or unsufficient data size, | 474 // passed, such as invalid parameter ID, or unsufficient data size, |
475 // BufferSyncInterface::PARSE_NO_ERROR otherwise. Note that | 475 // BufferSyncInterface::PARSE_NO_ERROR otherwise. Note that |
476 // BufferSyncInterface::PARSE_NO_ERROR will be returned if the structure | 476 // BufferSyncInterface::PARSE_NO_ERROR will be returned if the structure |
477 // itself fits, not necessarily the names. To make sure all the information | 477 // itself fits, not necessarily the names. To make sure all the information |
478 // is available, the caller should compare the returned size member of the | 478 // is available, the caller should compare the returned size member of the |
479 // effect_param::Desc structure to the size parameter passed in. | 479 // effect_param::Desc structure to the size parameter passed in. |
480 virtual ParseError GetParamDesc(ResourceID id, | 480 virtual ParseError GetParamDesc(ResourceID id, |
481 unsigned int size, | 481 unsigned int size, |
482 void *data) = 0; | 482 void *data) = 0; |
483 | 483 |
| 484 // Gets the number of input streams for an effect, returning it in a memory |
| 485 // buffer as a Uint32. |
| 486 // Parameters: |
| 487 // id: the resource ID of the effect. |
| 488 // size: the size of the data buffer. Must be at least 4 (the size of the |
| 489 // Uint32). |
| 490 // data: the buffer receiving the data. |
| 491 // Returns: |
| 492 // BufferSyncInterface::PARSE_INVALID_ARGUMENTS if invalid arguments are |
| 493 // passed, BufferSyncInterface::PARSE_NO_ERROR otherwise. |
| 494 virtual ParseError GetStreamCount(ResourceID id, |
| 495 unsigned int size, |
| 496 void *data) = 0; |
| 497 |
| 498 // Gets the stream semantics, storing them in the data buffer. The stream |
| 499 // is described by an effect_stream::Desc structure which contains a |
| 500 // semantic type and a semantic index. |
| 501 // Parameters: |
| 502 // id: the resource ID of the effect. |
| 503 // index: which stream semantic to get |
| 504 // size: the size of the data buffer. Must be at least 8 (the size of two |
| 505 // Uint32). |
| 506 // data: the buffer receiving the data. |
| 507 virtual ParseError GetStreamDesc(ResourceID id, |
| 508 unsigned int index, |
| 509 unsigned int size, |
| 510 void *data) = 0; |
| 511 |
484 // Creates a 2D texture resource. | 512 // Creates a 2D texture resource. |
485 // Parameters: | 513 // Parameters: |
486 // id: the resource ID of the texture. | 514 // id: the resource ID of the texture. |
487 // width: the texture width. Must be positive. | 515 // width: the texture width. Must be positive. |
488 // height: the texture height. Must be positive. | 516 // height: the texture height. Must be positive. |
489 // levels: the number of mipmap levels in the texture, or 0 to use the | 517 // levels: the number of mipmap levels in the texture, or 0 to use the |
490 // maximum. | 518 // maximum. |
491 // format: the format of the texels in the texture. | 519 // format: the format of the texels in the texture. |
492 // flags: the texture flags, as a combination of texture::Flags. | 520 // flags: the texture flags, as a combination of texture::Flags. |
493 // Returns: | 521 // Returns: |
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 BlendFunc alpha_dst_func) = 0; | 845 BlendFunc alpha_dst_func) = 0; |
818 | 846 |
819 // Sets the blending color. | 847 // Sets the blending color. |
820 virtual void SetBlendingColor(const RGBA &color) = 0; | 848 virtual void SetBlendingColor(const RGBA &color) = 0; |
821 }; | 849 }; |
822 | 850 |
823 } // namespace command_buffer | 851 } // namespace command_buffer |
824 } // namespace o3d | 852 } // namespace o3d |
825 | 853 |
826 #endif // O3D_COMMAND_BUFFER_COMMON_CROSS_GAPI_INTERFACE_H__ | 854 #endif // O3D_COMMAND_BUFFER_COMMON_CROSS_GAPI_INTERFACE_H__ |
OLD | NEW |