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

Side by Side Diff: command_buffer/service/cross/gl/sampler_gl.cc

Issue 332036: move all O3D specific command buffer stuff to command_buffer::o3d... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/o3d/
Patch Set: Created 11 years, 1 month 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
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 19 matching lines...) Expand all
30 */ 30 */
31 31
32 32
33 // This file implements the sampler-related GAPI functions on GL. 33 // This file implements the sampler-related GAPI functions on GL.
34 34
35 #include "command_buffer/service/cross/gl/gapi_gl.h" 35 #include "command_buffer/service/cross/gl/gapi_gl.h"
36 #include "command_buffer/service/cross/gl/sampler_gl.h" 36 #include "command_buffer/service/cross/gl/sampler_gl.h"
37 37
38 namespace o3d { 38 namespace o3d {
39 namespace command_buffer { 39 namespace command_buffer {
40 namespace o3d {
40 41
41 namespace { 42 namespace {
42 43
43 // Gets the GL enum corresponding to an addressing mode. 44 // Gets the GL enum corresponding to an addressing mode.
44 GLenum GLAddressMode(sampler::AddressingMode o3d_mode) { 45 GLenum GLAddressMode(sampler::AddressingMode o3d_mode) {
45 switch (o3d_mode) { 46 switch (o3d_mode) {
46 case sampler::kWrap: 47 case sampler::kWrap:
47 return GL_REPEAT; 48 return GL_REPEAT;
48 case sampler::kMirrorRepeat: 49 case sampler::kMirrorRepeat:
49 return GL_MIRRORED_REPEAT; 50 return GL_MIRRORED_REPEAT;
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 ResourceId texture_id) { 227 ResourceId texture_id) {
227 SamplerGL *sampler = samplers_.Get(id); 228 SamplerGL *sampler = samplers_.Get(id);
228 if (!sampler) 229 if (!sampler)
229 return parse_error::kParseInvalidArguments; 230 return parse_error::kParseInvalidArguments;
230 // Dirty effect, because this sampler id may be used. 231 // Dirty effect, because this sampler id may be used.
231 DirtyEffect(); 232 DirtyEffect();
232 sampler->SetTexture(texture_id); 233 sampler->SetTexture(texture_id);
233 return parse_error::kParseNoError; 234 return parse_error::kParseNoError;
234 } 235 }
235 236
236 237 } // namespace o3d
237 } // namespace command_buffer 238 } // namespace command_buffer
238 } // namespace o3d 239 } // namespace o3d
OLDNEW
« no previous file with comments | « command_buffer/service/cross/gl/sampler_gl.h ('k') | command_buffer/service/cross/gl/states_gl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698