1 #ifndef DALI_SCENE3D_LOADERERER_INTERPRET_RENDERER_STATE_H
2 #define DALI_SCENE3D_LOADERERER_INTERPRET_RENDERER_STATE_H
4 * Copyright (c) 2023 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
21 #include <dali-scene3d/public-api/loader/renderer-state.h>
22 #include <dali-scene3d/public-api/loader/string-callback.h>
24 namespace Dali::Scene3D::Loader
26 namespace RendererState
29 * @brief Attempts to interpret a string for renderer states, which can be a combination of the following
30 * (using '|' as a delimiter, if multiple specified):<br/>
31 * - one of Value, exc. for NONE or those with the _BITS, _SHIFT, _MASK or _ITEMS suffix;<br/>
32 * - DEPTH_FUNC:${one of Comparison::Type, exc. OMIT};<br/>
33 * - BLEND_(SRC_DST)_(RGB|ALPHA):${one of BlendFactor::Type, exc. OMIT};<br/>
34 * - BUFFER_MODE:${one of BufferMode::Type, exc. OMIT};
35 * @param string The string to parse;
36 * @param length The length of the string; If left at 0, strlen() will be called, which of
37 * course is only suitable i the string is null-terminated.
38 * @param onError The callback to call when an error occurred.
39 * @note No other characters are allowed.
41 DALI_SCENE3D_API Type Parse(const char* string, size_t length = 0, StringCallback onError = DefaultErrorCallback);
43 } // namespace RendererState
44 } // namespace Dali::Scene3D::Loader
46 #endif //DALI_SCENE3D_LOADERERER_INTERPRET_RENDERER_STATE_H