Changeset 25155 in vbox for trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_snapshot.c
- Timestamp:
- Dec 3, 2009 12:23:36 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/GuestHost/OpenGL/state_tracker/state_snapshot.c
r25154 r25155 1125 1125 diff_api.PixelStorei(GL_PACK_LSB_FIRST, 0); 1126 1126 1127 diff_api.ReadBuffer(GL_FRONT); 1127 1128 diff_api.ReadPixels(0, 0, pVP->viewportW, pVP->viewportH, GL_RGBA, GL_UNSIGNED_BYTE, pData); 1128 1129 1130 diff_api.ReadBuffer(pContext->framebufferobject.readFB ? 1131 pContext->framebufferobject.readFB->readbuffer : pContext->buffer.readBuffer); 1129 1132 diff_api.PixelStorei(GL_PACK_SKIP_ROWS, packing.skipRows); 1130 1133 diff_api.PixelStorei(GL_PACK_SKIP_PIXELS, packing.skipPixels); … … 1786 1789 { 1787 1790 CRViewportState *pVP = &pContext->viewport; 1788 CRPixelPackState unpack = pContext->client.unpack;1789 1791 GLint cbData = crPixelSize(GL_RGBA, GL_UNSIGNED_BYTE) * pVP->viewportH * pVP->viewportW; 1790 1792 void *pData = crAlloc(cbData); … … 1792 1794 if (!pData) 1793 1795 { 1796 pContext->pImage = NULL; 1794 1797 return VERR_NO_MEMORY; 1795 1798 } … … 1798 1801 AssertRCReturn(rc, rc); 1799 1802 1800 diff_api.PixelStorei(GL_UNPACK_SKIP_ROWS, 0); 1801 diff_api.PixelStorei(GL_UNPACK_SKIP_PIXELS, 0); 1802 diff_api.PixelStorei(GL_UNPACK_ALIGNMENT, 1); 1803 diff_api.PixelStorei(GL_UNPACK_ROW_LENGTH, 0); 1804 diff_api.PixelStorei(GL_UNPACK_IMAGE_HEIGHT, 0); 1805 diff_api.PixelStorei(GL_UNPACK_SKIP_IMAGES, 0); 1806 diff_api.PixelStorei(GL_UNPACK_SWAP_BYTES, 0); 1807 diff_api.PixelStorei(GL_UNPACK_LSB_FIRST, 0); 1808 1809 diff_api.WindowPos2iARB(0, 0); 1810 diff_api.DrawPixels(pVP->viewportW, pVP->viewportH, GL_RGBA, GL_UNSIGNED_BYTE, pData); 1811 1812 diff_api.PixelStorei(GL_UNPACK_SKIP_ROWS, unpack.skipRows); 1813 diff_api.PixelStorei(GL_UNPACK_SKIP_PIXELS, unpack.skipPixels); 1814 diff_api.PixelStorei(GL_UNPACK_ALIGNMENT, unpack.alignment); 1815 diff_api.PixelStorei(GL_UNPACK_ROW_LENGTH, unpack.rowLength); 1816 diff_api.PixelStorei(GL_UNPACK_IMAGE_HEIGHT, unpack.imageHeight); 1817 diff_api.PixelStorei(GL_UNPACK_SKIP_IMAGES, unpack.skipImages); 1818 diff_api.PixelStorei(GL_UNPACK_SWAP_BYTES, unpack.swapBytes); 1819 diff_api.PixelStorei(GL_UNPACK_LSB_FIRST, unpack.psLSBFirst); 1820 1821 crFree(pData); 1803 pContext->pImage = pData; 1822 1804 } 1823 1805
Note:
See TracChangeset
for help on using the changeset viewer.