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 804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
815 // and context here. | 815 // and context here. |
816 HINSTANCE module_handle; | 816 HINSTANCE module_handle; |
817 if (!::GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT | | 817 if (!::GetModuleHandleEx(GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT | |
818 GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, | 818 GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS, |
819 reinterpret_cast<wchar_t*>(IntermediateWindowProc), | 819 reinterpret_cast<wchar_t*>(IntermediateWindowProc), |
820 &module_handle)) { | 820 &module_handle)) { |
821 return Renderer::INITIALIZATION_ERROR; | 821 return Renderer::INITIALIZATION_ERROR; |
822 } | 822 } |
823 | 823 |
824 WNDCLASS intermediate_class; | 824 WNDCLASS intermediate_class; |
825 intermediate_class.style = CS_HREDRAW | CS_VREDRAW; | 825 intermediate_class.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; |
826 intermediate_class.lpfnWndProc = IntermediateWindowProc; | 826 intermediate_class.lpfnWndProc = IntermediateWindowProc; |
827 intermediate_class.cbClsExtra = 0; | 827 intermediate_class.cbClsExtra = 0; |
828 intermediate_class.cbWndExtra = 0; | 828 intermediate_class.cbWndExtra = 0; |
829 intermediate_class.hInstance = module_handle; | 829 intermediate_class.hInstance = module_handle; |
830 intermediate_class.hIcon = LoadIcon(NULL, IDI_APPLICATION); | 830 intermediate_class.hIcon = LoadIcon(NULL, IDI_APPLICATION); |
831 intermediate_class.hCursor = LoadCursor(NULL, IDC_ARROW); | 831 intermediate_class.hCursor = LoadCursor(NULL, IDC_ARROW); |
832 intermediate_class.hbrBackground = NULL; | 832 intermediate_class.hbrBackground = NULL; |
833 intermediate_class.lpszMenuName = NULL; | 833 intermediate_class.lpszMenuName = NULL; |
834 intermediate_class.lpszClassName = L"Intermediate GL Window"; | 834 intermediate_class.lpszClassName = L"Intermediate GL Window"; |
835 | 835 |
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1550 return swizzle_table; | 1550 return swizzle_table; |
1551 } | 1551 } |
1552 | 1552 |
1553 // This is a factory function for creating Renderer objects. Since | 1553 // This is a factory function for creating Renderer objects. Since |
1554 // we're implementing GL, we only ever return a GL renderer. | 1554 // we're implementing GL, we only ever return a GL renderer. |
1555 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) { | 1555 Renderer* Renderer::CreateDefaultRenderer(ServiceLocator* service_locator) { |
1556 return RendererGL::CreateDefault(service_locator); | 1556 return RendererGL::CreateDefault(service_locator); |
1557 } | 1557 } |
1558 | 1558 |
1559 } // namespace o3d | 1559 } // namespace o3d |
OLD | NEW |