| 272 | } |
| 273 | |
| 274 | static void NullSetWindowSize(HContext _context, uint32_t width, uint32_t height) |
| 275 | { |
| 276 | assert(_context); |
| 277 | NullContext* context = (NullContext*) _context; |
| 278 | if (dmPlatform::GetWindowStateParam(context->m_BaseContext.m_Window, WINDOW_STATE_OPENED)) |
| 279 | { |
| 280 | FrameBuffer& main = context->m_MainFrameBuffer; |
| 281 | delete [] (char*)main.m_ColorBuffer[0]; |
| 282 | delete [] (char*)main.m_DepthBuffer; |
| 283 | delete [] (char*)main.m_StencilBuffer; |
| 284 | context->m_BaseContext.m_Width = width; |
| 285 | context->m_BaseContext.m_Height = height; |
| 286 | uint32_t buffer_size = 4 * width * height; |
| 287 | main.m_ColorBuffer[0] = new char[buffer_size]; |
| 288 | main.m_ColorBufferSize[0] = buffer_size; |
| 289 | main.m_DepthBuffer = new char[buffer_size]; |
| 290 | main.m_DepthBufferSize = buffer_size; |
| 291 | main.m_StencilBuffer = new char[buffer_size]; |
| 292 | main.m_StencilBufferSize = buffer_size; |
| 293 | |
| 294 | dmPlatform::SetWindowSize(context->m_BaseContext.m_Window, width, height); |
| 295 | } |
| 296 | } |
| 297 | |
| 298 | static void NullResizeWindow(HContext _context, uint32_t width, uint32_t height) |
| 299 | { |
nothing calls this directly
no test coverage detected