* @~English * @brief Get a pointer to a ktxMemStream's data. * * Gets a pointer to data that has been written to the stream. Returned * pointer will be 0 if stream is read-only. * * @param [in] str pointer to the ktxStream whose data pointer is to * be queried. * @param [in,out] ppBytes pointer to a variable in which the data pointer * wi
| 412 | * @exception KTX_INVALID_VALUE @p str or @p ppBytes is @c NULL. |
| 413 | */ |
| 414 | KTX_error_code ktxMemStream_getdata(ktxStream* str, ktx_uint8_t** ppBytes) |
| 415 | { |
| 416 | if (!str || !ppBytes) |
| 417 | return KTX_INVALID_VALUE; |
| 418 | |
| 419 | assert(str->type == eStreamTypeMemory); |
| 420 | |
| 421 | *ppBytes = str->data.mem->bytes; |
| 422 | return KTX_SUCCESS; |
| 423 | } |
| 424 | |
| 425 | /** |
| 426 | * @~English |