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

Side by Side Diff: command_buffer/service/win/d3d9/effect_d3d9.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 28 matching lines...) Expand all
39 #include "command_buffer/service/win/d3d9/geometry_d3d9.h" 39 #include "command_buffer/service/win/d3d9/geometry_d3d9.h"
40 #include "command_buffer/service/win/d3d9/gapi_d3d9.h" 40 #include "command_buffer/service/win/d3d9/gapi_d3d9.h"
41 #include "command_buffer/service/win/d3d9/effect_d3d9.h" 41 #include "command_buffer/service/win/d3d9/effect_d3d9.h"
42 #include "command_buffer/service/win/d3d9/sampler_d3d9.h" 42 #include "command_buffer/service/win/d3d9/sampler_d3d9.h"
43 #include "command_buffer/service/cross/effect_utils.h" 43 #include "command_buffer/service/cross/effect_utils.h"
44 44
45 // TODO: remove link-dependency on D3DX. 45 // TODO: remove link-dependency on D3DX.
46 46
47 namespace o3d { 47 namespace o3d {
48 namespace command_buffer { 48 namespace command_buffer {
49 namespace o3d {
49 50
50 // Logs the D3D effect error, from either the buffer, or GetLastError(). 51 // Logs the D3D effect error, from either the buffer, or GetLastError().
51 static void LogFXError(LPD3DXBUFFER error_buffer) { 52 static void LogFXError(LPD3DXBUFFER error_buffer) {
52 if (error_buffer) { 53 if (error_buffer) {
53 LPVOID compile_errors = error_buffer->GetBufferPointer(); 54 LPVOID compile_errors = error_buffer->GetBufferPointer();
54 LOG(ERROR) << "Failed to compile effect: " 55 LOG(ERROR) << "Failed to compile effect: "
55 << static_cast<char *>(compile_errors); 56 << static_cast<char *>(compile_errors);
56 } else { 57 } else {
57 HLOCAL hLocal = NULL; 58 HLOCAL hLocal = NULL;
58 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_ALLOCATE_BUFFER, 59 FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_ALLOCATE_BUFFER,
(...skipping 607 matching lines...) Expand 10 before | Expand all | Expand 10 after
666 // Should only be called if the current effect is not valid. 667 // Should only be called if the current effect is not valid.
667 bool GAPID3D9::ValidateEffect() { 668 bool GAPID3D9::ValidateEffect() {
668 DCHECK(validate_effect_); 669 DCHECK(validate_effect_);
669 DCHECK(!current_effect_); 670 DCHECK(!current_effect_);
670 current_effect_ = effects_.Get(current_effect_id_); 671 current_effect_ = effects_.Get(current_effect_id_);
671 if (!current_effect_) return false; 672 if (!current_effect_) return false;
672 validate_effect_ = false; 673 validate_effect_ = false;
673 return current_effect_->Begin(); 674 return current_effect_->Begin();
674 } 675 }
675 676
677 } // namespace o3d
676 } // namespace command_buffer 678 } // namespace command_buffer
677 } // namespace o3d 679 } // namespace o3d
OLDNEW
« no previous file with comments | « command_buffer/service/win/d3d9/effect_d3d9.h ('k') | command_buffer/service/win/d3d9/gapi_d3d9.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698