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 24 const int ShaderParam_FLOAT4_DATA = SHADER_PARAM_FLOAT4_DATA; 25 const int ShaderParam_TRANSFORM_DATA = SHADER_PARAM_TRANSFORM_DATA; 26 const int ShaderParam_TRANSFORM_MODEL = SHADER_PARAM_TRANSFORM_MODEL; 27 28 const int ShaderParam_FLOAT4_CAMERA_POS = SHADER_PARAM_FLOAT4_CAMERA_POS; 29 const int ShaderParam_FLOAT4_CAMERA_DIR = SHADER_PARAM_FLOAT4_CAMERA_DIR; 30 const int ShaderParam_TRANSFORM_VIEW = SHADER_PARAM_TRANSFORM_VIEW; 31 const int ShaderParam_TRANSFORM_PROJ = SHADER_PARAM_TRANSFORM_PROJ; 32 const int ShaderParam_TRANSFORM_VIEW_PROJ = SHADER_PARAM_TRANSFORM_VIEW_PROJ; 33 const int ShaderParam_TRANSFORM_MODEL_VIEW = SHADER_PARAM_TRANSFORM_MODEL_VIEW; 34 const int ShaderParam_TRANSFORM_MODEL_VIEW_PROJ = SHADER_PARAM_TRANSFORM_MODEL_VIEW_PROJ; 35 36 const int ShaderParam_FLOAT4_LIGHT_COLOR = SHADER_PARAM_FLOAT4_LIGHT_COLOR; 37 const int ShaderParam_FLOAT4_LIGHT_POS = SHADER_PARAM_FLOAT4_LIGHT_POS; 38 const int ShaderParam_FLOAT4_LIGHT_DIR = SHADER_PARAM_FLOAT4_LIGHT_DIR; 39 40 const int ShaderParam_TEXTURE = SHADER_PARAM_TEXTURE; 41 42 const int Transform_TRANSLATE = TRANSFORM_TRANSLATE; 43 const int Transform_ROTATE = TRANSFORM_ROTATE; 44 const int Transform_SCALE = TRANSFORM_SCALE; 45 46 const int TextureType_TEXTURE_2D = TEXTURE_2D; 47 const int TextureType_TEXTURE_CUBE = TEXTURE_CUBE; 48 const int TextureType_TEXTURE_RENDER_TARGET = TEXTURE_RENDER_TARGET; 49 50 SgTransform *exportPtr; 51 SgTransformComponent *componentPtr; 52 SgRenderState *sExport; 53 SgRenderable *drExport; 54 SgRenderPass *pExport; 55 SgCamera *exportPtrCam; 56 SgLight *exportPtrLight; 57 SgShaderParam *spExport; 58 SgShaderParamData *spDataExport; 59 SgVertexShader *pvExport; 60 SgFragmentShader *pfExport; 61 SgTexture *texExport; 62