/src/VBox/GuestHost/OpenGL/include/cr_bufpool.h

https://gitlab.com/ufo/virtualbox-ose-3-1-8 · C Header · 33 lines · 19 code · 9 blank · 5 comment · 0 complexity · f995e2efd2bc754a429e7dfa27c63c0c MD5 · raw file

  1. /* Copyright (c) 2001, Stanford University
  2. * All rights reserved.
  3. *
  4. * See the file LICENSE.txt for information on redistributing this software.
  5. */
  6. #ifndef CR_BUFPOOL_H
  7. #define CR_BUFPOOL_H
  8. #include <iprt/cdefs.h>
  9. #ifdef __cplusplus
  10. extern "C" {
  11. #endif
  12. typedef struct CRBufferPool_t CRBufferPool;
  13. typedef void (*CRBufferPoolDeleteCallback)(void *data);
  14. DECLEXPORT(CRBufferPool *) crBufferPoolInit( unsigned int maxBuffers );
  15. DECLEXPORT(void) crBufferPoolFree( CRBufferPool *pool );
  16. DECLEXPORT(void) crBufferPoolCallbackFree(CRBufferPool *pool, CRBufferPoolDeleteCallback pfnDelete);
  17. DECLEXPORT(void) crBufferPoolPush( CRBufferPool *pool, void *buf, unsigned int bytes );
  18. DECLEXPORT(void *) crBufferPoolPop( CRBufferPool *pool, unsigned int bytes );
  19. DECLEXPORT(int) crBufferPoolGetNumBuffers( CRBufferPool *pool );
  20. DECLEXPORT(int) crBufferPoolGetMaxBuffers( CRBufferPool *pool );
  21. #ifdef __cplusplus
  22. }
  23. #endif
  24. #endif /* CR_BUFPOOL_H */