summaryrefslogtreecommitdiffstats
path: root/o3d/command_buffer/service/effect_utils.h
diff options
context:
space:
mode:
authorapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-11 18:48:49 +0000
committerapatrick@google.com <apatrick@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-11-11 18:48:49 +0000
commit85c5b0230b1a9a9d8e02ad6049c31bf55eb5c076 (patch)
treea4d8ddd09d0beeffa01b2ad9222698cd914b4717 /o3d/command_buffer/service/effect_utils.h
parent5222bb1495ef2e9a6294da8a8f1b9c1dae2e54e4 (diff)
downloadchromium_src-85c5b0230b1a9a9d8e02ad6049c31bf55eb5c076.zip
chromium_src-85c5b0230b1a9a9d8e02ad6049c31bf55eb5c076.tar.gz
chromium_src-85c5b0230b1a9a9d8e02ad6049c31bf55eb5c076.tar.bz2
Reverting 31676.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31682 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/command_buffer/service/effect_utils.h')
-rw-r--r--o3d/command_buffer/service/effect_utils.h54
1 files changed, 54 insertions, 0 deletions
diff --git a/o3d/command_buffer/service/effect_utils.h b/o3d/command_buffer/service/effect_utils.h
new file mode 100644
index 0000000..dcfe718
--- /dev/null
+++ b/o3d/command_buffer/service/effect_utils.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2009, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+
+// This file declares some effect related utilities.
+
+#ifndef GPU_COMMAND_BUFFER_SERVICE_CROSS_EFFECT_UTILS_H_
+#define GPU_COMMAND_BUFFER_SERVICE_CROSS_EFFECT_UTILS_H_
+
+#include "command_buffer/common/types.h"
+
+namespace command_buffer {
+
+// This function parses the data passed to the CreateEffect commands, which
+// follows the following format:
+// vertex_program_entry \0 fragment_program_entry \0 effect_code
+// It returns the various components.
+bool ParseEffectData(unsigned int size,
+ const void *data,
+ String *vertex_program_entry,
+ String *fragment_program_entry,
+ String *effect_code);
+
+} // namespace command_buffer
+
+#endif // GPU_COMMAND_BUFFER_SERVICE_CROSS_EFFECT_UTILS_H_