OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009, Google Inc. | 2 * Copyright 2009, Google Inc. |
3 * All rights reserved. | 3 * All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
361 command_buffer::CommandBufferEntry args[6]; | 361 command_buffer::CommandBufferEntry args[6]; |
362 args[0].value_uint32 = left; | 362 args[0].value_uint32 = left; |
363 args[1].value_uint32 = top; | 363 args[1].value_uint32 = top; |
364 args[2].value_uint32 = width; | 364 args[2].value_uint32 = width; |
365 args[3].value_uint32 = height; | 365 args[3].value_uint32 = height; |
366 args[4].value_float = min_z; | 366 args[4].value_float = min_z; |
367 args[5].value_float = max_z; | 367 args[5].value_float = max_z; |
368 helper_->AddCommand(command_buffer::SET_VIEWPORT, 6, args); | 368 helper_->AddCommand(command_buffer::SET_VIEWPORT, 6, args); |
369 } | 369 } |
370 | 370 |
371 bool RendererCB::SaveScreen(const String& file_name) { | 371 Bitmap::Ref RendererCB::TakeScreenshot() { |
372 // TODO | 372 return Bitmap::Ref(); |
373 return false; | |
374 } | 373 } |
375 | 374 |
376 const int* RendererCB::GetRGBAUByteNSwizzleTable() { | 375 const int* RendererCB::GetRGBAUByteNSwizzleTable() { |
377 static int swizzle_table[] = { 0, 1, 2, 3, }; | 376 static int swizzle_table[] = { 0, 1, 2, 3, }; |
378 return swizzle_table; | 377 return swizzle_table; |
379 } | 378 } |
380 | 379 |
381 // This is a factory function for creating Renderer objects. Since | 380 // This is a factory function for creating Renderer objects. Since |
382 // we're implementing command buffers, we only ever return a CB renderer. | 381 // we're implementing command buffers, we only ever return a CB renderer. |
383 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) { | 382 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) { |
384 return RendererCB::CreateDefault(service_locator); | 383 return RendererCB::CreateDefault(service_locator); |
385 } | 384 } |
386 } // namespace o3d | 385 } // namespace o3d |
OLD | NEW |