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 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
140 | 140 |
141 private: | 141 private: |
142 int index_; | 142 int index_; |
143 }; | 143 }; |
144 | 144 |
145 virtual ~Renderer(); | 145 virtual ~Renderer(); |
146 | 146 |
147 // Creates a 'default' renderer, choosing the correct implementation type. | 147 // Creates a 'default' renderer, choosing the correct implementation type. |
148 static Renderer* CreateDefaultRenderer(ServiceLocator* service_locator); | 148 static Renderer* CreateDefaultRenderer(ServiceLocator* service_locator); |
149 | 149 |
| 150 // Creates a 2D renderer. This can be used instead of CreateDefaultRenderer |
| 151 // when 3D is not supported by the underlying system, and is not strictly |
| 152 // needed by the application. |
| 153 static Renderer* Create2DRenderer(ServiceLocator* service_locator); |
| 154 |
| 155 |
150 // Gets whether or not the renderer should attempt to use the software | 156 // Gets whether or not the renderer should attempt to use the software |
151 // renderer. | 157 // renderer. |
152 static bool IsForceSoftwareRenderer(); | 158 static bool IsForceSoftwareRenderer(); |
153 | 159 |
154 // Initialises the renderer for use, claiming hardware resources. | 160 // Initialises the renderer for use, claiming hardware resources. |
155 InitStatus Init(const DisplayWindow& display, bool off_screen); | 161 InitStatus Init(const DisplayWindow& display, bool off_screen); |
156 | 162 |
157 // The platform specific part of initalization. | 163 // The platform specific part of initalization. |
158 virtual InitStatus InitPlatformSpecific(const DisplayWindow& display, | 164 virtual InitStatus InitPlatformSpecific(const DisplayWindow& display, |
159 bool off_screen) = 0; | 165 bool off_screen) = 0; |
(...skipping 611 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 | 777 |
772 // Maximum frames per second. | 778 // Maximum frames per second. |
773 int max_fps_; | 779 int max_fps_; |
774 | 780 |
775 DISALLOW_COPY_AND_ASSIGN(Renderer); | 781 DISALLOW_COPY_AND_ASSIGN(Renderer); |
776 }; | 782 }; |
777 | 783 |
778 } // namespace o3d | 784 } // namespace o3d |
779 | 785 |
780 #endif // O3D_CORE_CROSS_RENDERER_H_ | 786 #endif // O3D_CORE_CROSS_RENDERER_H_ |
OLD | NEW |