Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(768)

Side by Side Diff: core/cross/renderer.h

Issue 2825074: Initial version rendering 2D path for O3D. This will eventually allow O3D app... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/o3d/
Patch Set: '' Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « core/cross/pack.h ('k') | core/cross/renderer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 // default values are (0.0, 1.0). The depth range provides the mapping of 270 // default values are (0.0, 1.0). The depth range provides the mapping of
271 // the clip space coordinates into normalized z buffer coordinates. 271 // the clip space coordinates into normalized z buffer coordinates.
272 // 272 //
273 // Note: The rectangle values must describe a rectangle that is 100% inside 273 // Note: The rectangle values must describe a rectangle that is 100% inside
274 // the client area. In other words, (0.5, 0.0, 1.0, 1.0) would describe an 274 // the client area. In other words, (0.5, 0.0, 1.0, 1.0) would describe an
275 // area that is 1/2 off right side of the screen. That is an invalid value and 275 // area that is 1/2 off right side of the screen. That is an invalid value and
276 // will be clipped to (0.5, 0.0, 0.5, 1.0). 276 // will be clipped to (0.5, 0.0, 0.5, 1.0).
277 void SetViewport(const Float4& rectangle, const Float2& depth_range); 277 void SetViewport(const Float4& rectangle, const Float2& depth_range);
278 278
279 // Clears the current buffers. 279 // Clears the current buffers.
280 void Clear(const Float4 &color, 280 virtual void Clear(const Float4 &color,
281 bool color_flag, 281 bool color_flag,
282 float depth, 282 float depth,
283 bool depth_flag, 283 bool depth_flag,
284 int stencil, 284 int stencil,
285 bool stencil_flag); 285 bool stencil_flag);
286 286
287 // Renders this Element using the parameters from override first, followed by 287 // Renders this Element using the parameters from override first, followed by
288 // the draw_element, followed by params on this Primitive and material. 288 // the draw_element, followed by params on this Primitive and material.
289 // Parameters: 289 // Parameters:
290 // element: Element to draw 290 // element: Element to draw
291 // draw_element: DrawElement to override params with. 291 // draw_element: DrawElement to override params with.
292 // material: Material to render with. 292 // material: Material to render with.
293 // override: Override to render with. 293 // override: Override to render with.
294 void RenderElement(Element* element, 294 void RenderElement(Element* element,
295 DrawElement* draw_element, 295 DrawElement* draw_element,
296 Material* material, 296 Material* material,
297 ParamObject* override, 297 ParamObject* override,
298 ParamCache* param_cache); 298 ParamCache* param_cache);
299 299
300 // Pushes rendering states. 300 // Pushes rendering states.
301 void PushRenderStates(State *state); 301 virtual void PushRenderStates(State *state);
302 302
303 // Pops rendering states to back to their previous settings. 303 // Pops rendering states to back to their previous settings.
304 void PopRenderStates(); 304 virtual void PopRenderStates();
305 305
306 // Binds the passed surfaces to the color and depth buffers of the 306 // Binds the passed surfaces to the color and depth buffers of the
307 // renderer. 307 // renderer.
308 // Parameters: 308 // Parameters:
309 // surface: RenderSurface to bind to the color buffer. 309 // surface: RenderSurface to bind to the color buffer.
310 // depth_surface: RenderDepthStencilSurface to bind to the depth/stencil 310 // depth_surface: RenderDepthStencilSurface to bind to the depth/stencil
311 // buffer. 311 // buffer.
312 // is_back_buffer: True if the render surface being set should be considered 312 // is_back_buffer: True if the render surface being set should be considered
313 // the backbuffer. 313 // the backbuffer.
314 void SetRenderSurfaces(const RenderSurface* surface, 314 void SetRenderSurfaces(const RenderSurface* surface,
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 771
772 // Maximum frames per second. 772 // Maximum frames per second.
773 int max_fps_; 773 int max_fps_;
774 774
775 DISALLOW_COPY_AND_ASSIGN(Renderer); 775 DISALLOW_COPY_AND_ASSIGN(Renderer);
776 }; 776 };
777 777
778 } // namespace o3d 778 } // namespace o3d
779 779
780 #endif // O3D_CORE_CROSS_RENDERER_H_ 780 #endif // O3D_CORE_CROSS_RENDERER_H_
OLDNEW
« no previous file with comments | « core/cross/pack.h ('k') | core/cross/renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698