1 /* 2 * Copyright (C) 2015 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.example.android.rs.vr.engine; 17 18 /** 19 * The interface to the vr rendering pipeline 20 * This defines the various rendering stages that the system goes through 21 */ 22 public interface Pipeline { 23 /** 24 * cancel the current execution 25 */ cancel()26 public void cancel(); 27 28 /** 29 * @return true if the rendering was canceled the output is not valid if true 30 */ isCancel()31 public boolean isCancel(); 32 33 /** 34 * The pipline uses this stage to setup buffers it needs 35 * @param state 36 */ initBuffers(VrState state)37 public void initBuffers(VrState state); 38 39 /** 40 * This stage does needed transformations on the triangles to screen space 41 * @param state 42 */ setupTriangles(VrState state)43 public void setupTriangles(VrState state); 44 45 /** 46 * This stage converts triangles into buffers used in the raycast 47 * @param state 48 */ rasterizeTriangles(VrState state)49 public void rasterizeTriangles(VrState state); 50 51 /** 52 * This stage generates the final image 53 * @param state 54 */ raycast(VrState state)55 public void raycast(VrState state); 56 } 57