1// Copyright (C) 2011 The Android Open Source Project
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7//      http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma version(1)
16
17#pragma rs java_package_name(com.android.scenegraph)
18
19// The sole purpose of this script is to have various structs exposed
20// so that java reflected classes are generated
21#include "scenegraph_objects.rsh"
22
23// Export our native constants to java so that we don't have parallel definitions
24const int ShaderParam_FLOAT4_DATA = SHADER_PARAM_FLOAT4_DATA;
25const int ShaderParam_TRANSFORM_DATA = SHADER_PARAM_TRANSFORM_DATA;
26const int ShaderParam_TRANSFORM_MODEL = SHADER_PARAM_TRANSFORM_MODEL;
27
28const int ShaderParam_FLOAT4_CAMERA_POS = SHADER_PARAM_FLOAT4_CAMERA_POS;
29const int ShaderParam_FLOAT4_CAMERA_DIR = SHADER_PARAM_FLOAT4_CAMERA_DIR;
30const int ShaderParam_TRANSFORM_VIEW = SHADER_PARAM_TRANSFORM_VIEW;
31const int ShaderParam_TRANSFORM_PROJ = SHADER_PARAM_TRANSFORM_PROJ;
32const int ShaderParam_TRANSFORM_VIEW_PROJ = SHADER_PARAM_TRANSFORM_VIEW_PROJ;
33const int ShaderParam_TRANSFORM_MODEL_VIEW = SHADER_PARAM_TRANSFORM_MODEL_VIEW;
34const int ShaderParam_TRANSFORM_MODEL_VIEW_PROJ = SHADER_PARAM_TRANSFORM_MODEL_VIEW_PROJ;
35
36const int ShaderParam_FLOAT4_LIGHT_COLOR = SHADER_PARAM_FLOAT4_LIGHT_COLOR;
37const int ShaderParam_FLOAT4_LIGHT_POS = SHADER_PARAM_FLOAT4_LIGHT_POS;
38const int ShaderParam_FLOAT4_LIGHT_DIR = SHADER_PARAM_FLOAT4_LIGHT_DIR;
39
40const int ShaderParam_TEXTURE = SHADER_PARAM_TEXTURE;
41
42const int Transform_TRANSLATE = TRANSFORM_TRANSLATE;
43const int Transform_ROTATE = TRANSFORM_ROTATE;
44const int Transform_SCALE = TRANSFORM_SCALE;
45
46const int TextureType_TEXTURE_2D = TEXTURE_2D;
47const int TextureType_TEXTURE_CUBE = TEXTURE_CUBE;
48const int TextureType_TEXTURE_RENDER_TARGET = TEXTURE_RENDER_TARGET;
49
50SgTransform *exportPtr;
51SgTransformComponent *componentPtr;
52SgRenderState *sExport;
53SgRenderable *drExport;
54SgRenderPass *pExport;
55SgCamera *exportPtrCam;
56SgLight *exportPtrLight;
57SgShaderParam *spExport;
58SgShaderParamData *spDataExport;
59SgVertexShader *pvExport;
60SgFragmentShader *pfExport;
61SgTexture *texExport;
62