Changeset 25293 in vbox for trunk/src/VBox/HostServices/SharedOpenGL
- Timestamp:
- Dec 10, 2009 11:14:59 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_cocoa_helper.m
r25207 r25293 1111 1111 GL_RESTORE_STATE; 1112 1112 } 1113 1114 /* Clear background to transparent */ 1115 glClear(GL_COLOR_BUFFER_BIT); 1116 1117 /* Blit the content of the FBO to the screen. todo: check for 1118 * optimization with display lists. */ 1119 GLint i; 1120 for (i = 0; i < m_cClipRects; ++i) 1113 } 1114 1115 /* Clear background to transparent */ 1116 glClear(GL_COLOR_BUFFER_BIT); 1117 1118 /* Blit the content of the FBO to the screen. todo: check for 1119 * optimization with display lists. */ 1120 GLint i; 1121 for (i = 0; i < m_cClipRects; ++i) 1122 { 1123 GLint x1 = m_paClipRects[4*i]; 1124 GLint y1 = r.size.height - m_paClipRects[4*i+1]; 1125 GLint x2 = m_paClipRects[4*i+2]; 1126 GLint y2 = r.size.height - m_paClipRects[4*i+3]; 1127 glBegin(GL_QUADS); 1121 1128 { 1122 GLint x1 = m_paClipRects[4*i]; 1123 GLint y1 = r.size.height - m_paClipRects[4*i+1]; 1124 GLint x2 = m_paClipRects[4*i+2]; 1125 GLint y2 = r.size.height - m_paClipRects[4*i+3]; 1126 glBegin(GL_QUADS); 1127 { 1128 glTexCoord2i(x1, y1); glVertex2i(x1, y1); 1129 glTexCoord2i(x1, y2); glVertex2i(x1, y2); 1130 glTexCoord2i(x2, y2); glVertex2i(x2, y2); 1131 glTexCoord2i(x2, y1); glVertex2i(x2, y1); 1132 } 1133 glEnd(); 1129 glTexCoord2i(x1, y1); glVertex2i(x1, y1); 1130 glTexCoord2i(x1, y2); glVertex2i(x1, y2); 1131 glTexCoord2i(x2, y2); glVertex2i(x2, y2); 1132 glTexCoord2i(x2, y1); glVertex2i(x2, y1); 1134 1133 } 1135 [m_pSharedGLCtx flushBuffer]; 1136 [m_pGLCtx makeCurrentContext]; 1134 glEnd(); 1137 1135 } 1136 [m_pSharedGLCtx flushBuffer]; 1137 [m_pGLCtx makeCurrentContext]; 1138 1138 } 1139 1139 }
Note:
See TracChangeset
for help on using the changeset viewer.