render.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /* SCE CONFIDENTIAL
  2. * $PSLibId$
  3. * Copyright (C) 2011 Sony Computer Entertainment Inc.
  4. * All Rights Reserved.
  5. */
  6. #ifndef _RENDER_H
  7. #define _RENDER_H
  8. #include <gxm.h>
  9. #include <tilebackend/tilebackend.h>
  10. // WebView window parameters
  11. #define WEBVIEW_WIDTH 960
  12. #define WEBVIEW_HEIGHT 544
  13. #define WEBVIEW_FORMAT SCE_GXM_TEXTURE_FORMAT_A8R8G8B8
  14. // Shared Texture Buffer
  15. extern uint8_t *g_testTextureData;
  16. extern tilebackend::Target g_target;
  17. // Create data for clear draw call
  18. void createClearData(void);
  19. // Destroy data for clear draw call
  20. void destroyClearData(void);
  21. // Create data for cube draw call
  22. void createCubeData(void);
  23. // Destroy data for cube draw call
  24. void destroyCubeData(void);
  25. // Create test texture data
  26. void createTestTextureData(uint32_t width, uint32_t height, SceGxmTextureFormat format);
  27. // Destroy test texture data
  28. void destroyTestTextureData(void);
  29. // Create the offscreen buffer
  30. void createOffscreenBuffer(void);
  31. // Destroy the offscreen buffer
  32. void destroyOffscreenBuffer(void);
  33. // Do update step
  34. void updateRender(void);
  35. // Render offscreen buffer
  36. void renderOffscreen(void);
  37. // Render main buffer
  38. void renderMain(void);
  39. // Get View Offset
  40. void getOffset(uint32_t *x, uint32_t *y);
  41. // convert the coord-system for a point. (coord-system: the device-coord to the local-coord on a plane) and returns if the point is on the plane.
  42. // x/y: the point
  43. bool convertScreenToLocalCSS(short& x, short& y);
  44. // popup a window of mag
  45. void popup_mag(float x, float y, float z, float w, float h, float tx, float ty, float tw, float th);
  46. // update a content of mag
  47. void update_mag(float x, float y, float rx, float ry);
  48. // close a window of mag
  49. void dismiss_mag();
  50. #endif /* _RENDER_H */