summaryrefslogtreecommitdiffstats
path: root/o3d/core
diff options
context:
space:
mode:
authorpetersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 19:57:56 +0000
committerpetersont@google.com <petersont@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-30 19:57:56 +0000
commitf45e5deec9729cf2fcd5edb8a23b76e91334984d (patch)
tree009b6e9127f32aa1cdcb0699a9de88940e9c5b41 /o3d/core
parent35b6e20279d714ab37fb9196ee57253111bbb83e (diff)
downloadchromium_src-f45e5deec9729cf2fcd5edb8a23b76e91334984d.zip
chromium_src-f45e5deec9729cf2fcd5edb8a23b76e91334984d.tar.gz
chromium_src-f45e5deec9729cf2fcd5edb8a23b76e91334984d.tar.bz2
Added 32-bit float textures to command buffers, also changed the texture::Format enum to be more like Texture::Format in o3d.
Review URL: http://codereview.chromium.org/227011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27644 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/core')
-rw-r--r--o3d/core/cross/command_buffer/texture_cb.cc10
1 files changed, 7 insertions, 3 deletions
diff --git a/o3d/core/cross/command_buffer/texture_cb.cc b/o3d/core/cross/command_buffer/texture_cb.cc
index 91791df..3b6b32d 100644
--- a/o3d/core/cross/command_buffer/texture_cb.cc
+++ b/o3d/core/cross/command_buffer/texture_cb.cc
@@ -65,6 +65,10 @@ texture::Format CBFormatFromO3DFormat(Texture::Format format) {
return texture::kARGB8;
case Texture::ABGR16F:
return texture::kABGR16F;
+ case Texture::R32F:
+ return texture::kR32F;
+ case Texture::ABGR32F:
+ return texture::kABGR32F;
case Texture::DXT1:
return texture::kDXT1;
// TODO: DXT3/5. It's not yet supported by the command buffer
@@ -74,7 +78,7 @@ texture::Format CBFormatFromO3DFormat(Texture::Format format) {
}
// failed to find a matching format
LOG(ERROR) << "Unrecognized Texture format type.";
- return texture::kNumFormats;
+ return texture::kUnknown;
}
// Checks that enums match in value, so that they can be directly used in
@@ -267,7 +271,7 @@ Texture2DCB* Texture2DCB::Create(ServiceLocator* service_locator,
RendererCB *renderer = static_cast<RendererCB *>(
service_locator->GetService<Renderer>());
texture::Format cb_format = CBFormatFromO3DFormat(format);
- if (cb_format == texture::kNumFormats) {
+ if (cb_format == texture::kUnknown) {
O3D_ERROR(service_locator)
<< "Unsupported format in Texture2DCB::Create.";
return NULL;
@@ -482,7 +486,7 @@ TextureCUBECB* TextureCUBECB::Create(ServiceLocator* service_locator,
RendererCB *renderer = static_cast<RendererCB *>(
service_locator->GetService<Renderer>());
texture::Format cb_format = CBFormatFromO3DFormat(format);
- if (cb_format == texture::kNumFormats) {
+ if (cb_format == texture::kUnknown) {
O3D_ERROR(service_locator)
<< "Unsupported format in Texture2DCB::Create.";
return NULL;