1d86ed7fbStbbdev /* 2*b15aabb3Stbbdev Copyright (c) 2005-2021 Intel Corporation 3d86ed7fbStbbdev 4d86ed7fbStbbdev Licensed under the Apache License, Version 2.0 (the "License"); 5d86ed7fbStbbdev you may not use this file except in compliance with the License. 6d86ed7fbStbbdev You may obtain a copy of the License at 7d86ed7fbStbbdev 8d86ed7fbStbbdev http://www.apache.org/licenses/LICENSE-2.0 9d86ed7fbStbbdev 10d86ed7fbStbbdev Unless required by applicable law or agreed to in writing, software 11d86ed7fbStbbdev distributed under the License is distributed on an "AS IS" BASIS, 12d86ed7fbStbbdev WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13d86ed7fbStbbdev See the License for the specific language governing permissions and 14d86ed7fbStbbdev limitations under the License. 15d86ed7fbStbbdev */ 16d86ed7fbStbbdev 17d86ed7fbStbbdev /* 18d86ed7fbStbbdev The original source for this example is 19d86ed7fbStbbdev Copyright (c) 1994-2008 John E. Stone 20d86ed7fbStbbdev All rights reserved. 21d86ed7fbStbbdev 22d86ed7fbStbbdev Redistribution and use in source and binary forms, with or without 23d86ed7fbStbbdev modification, are permitted provided that the following conditions 24d86ed7fbStbbdev are met: 25d86ed7fbStbbdev 1. Redistributions of source code must retain the above copyright 26d86ed7fbStbbdev notice, this list of conditions and the following disclaimer. 27d86ed7fbStbbdev 2. Redistributions in binary form must reproduce the above copyright 28d86ed7fbStbbdev notice, this list of conditions and the following disclaimer in the 29d86ed7fbStbbdev documentation and/or other materials provided with the distribution. 30d86ed7fbStbbdev 3. The name of the author may not be used to endorse or promote products 31d86ed7fbStbbdev derived from this software without specific prior written permission. 32d86ed7fbStbbdev 33d86ed7fbStbbdev THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS 34d86ed7fbStbbdev OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 35d86ed7fbStbbdev WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 36d86ed7fbStbbdev ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 37d86ed7fbStbbdev DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 38d86ed7fbStbbdev DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 39d86ed7fbStbbdev OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 40d86ed7fbStbbdev HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 41d86ed7fbStbbdev LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 42d86ed7fbStbbdev OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 43d86ed7fbStbbdev SUCH DAMAGE. 44d86ed7fbStbbdev */ 45d86ed7fbStbbdev 46d86ed7fbStbbdev /* 47d86ed7fbStbbdev * global.cpp - any/all global data items etc should be in this file 48d86ed7fbStbbdev */ 49d86ed7fbStbbdev 50d86ed7fbStbbdev #include "types.hpp" 51d86ed7fbStbbdev #include "machine.hpp" 52d86ed7fbStbbdev #include "sphere.hpp" 53d86ed7fbStbbdev #include "light.hpp" 54d86ed7fbStbbdev 55d86ed7fbStbbdev /* stuff moved from intersect.c */ 56d86ed7fbStbbdev object* rootobj = nullptr; /* starts out empty. */ 57d86ed7fbStbbdev 58d86ed7fbStbbdev point_light* lightlist[MAXLIGHTS]; 59d86ed7fbStbbdev int numlights = 0; 60d86ed7fbStbbdev 61d86ed7fbStbbdev unsigned int numobjects = 0; /* used to assign unique object ID's */ 62d86ed7fbStbbdev 63d86ed7fbStbbdev /* used in util.c */ 64d86ed7fbStbbdev unsigned int rt_mem_in_use = 0; 65d86ed7fbStbbdev 66d86ed7fbStbbdev /* used in api.c */ 67d86ed7fbStbbdev int parinitted = 0; 68d86ed7fbStbbdev 69d86ed7fbStbbdev int graphicswindowopen = 0; 70