This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* OpenSceneGraph example, osgdrawinstanced. | |
| * | |
| * Permission is hereby granted, free of charge, to any person obtaining a copy | |
| * of this software and associated documentation files (the "Software"), to deal | |
| * in the Software without restriction, including without limitation the rights | |
| * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| * copies of the Software, and to permit persons to whom the Software is | |
| * furnished to do so, subject to the following conditions: | |
| * | |
| * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* -*-c++-*- */ | |
| /* osgEarth - Dynamic map generation toolkit for OpenSceneGraph | |
| * Copyright 2016 Pelican Mapping | |
| * http://osgearth.org | |
| * | |
| * osgEarth is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU Lesser General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* -*-c++-*- */ | |
| /* osgEarth - Dynamic map generation toolkit for OpenSceneGraph | |
| * Copyright 2016 Pelican Mapping | |
| * http://osgearth.org | |
| * | |
| * osgEarth is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU Lesser General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <osgEarth/SpatialReference> | |
| #include <osgEarth/Notify> | |
| #include <osgEarth/GeoData> | |
| using namespace osgEarth; | |
| double square(double d) { return d*d; } | |
| int | |
| main(int argc, char** argv) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <osgViewer/Viewer> | |
| #include <osgEarth/Notify> | |
| #include <osgEarthUtil/ExampleResources> | |
| #include <osgEarth/MapNode> | |
| #include <osgEarth/TerrainEngineNode> | |
| #include <osgGA/TrackballManipulator> | |
| #include <osgEarth/NodeUtils> | |
| using namespace osgEarth; | |
| using namespace osgEarth::Util; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <osgViewer/Viewer> | |
| #include <osgEarthUtil/EarthManipulator> | |
| #include <osgEarthUtil/ExampleResources> | |
| #include <osgEarth/MapNode> | |
| #include <osgEarth/ModelLayer> | |
| #include <osgEarthDrivers/kml/KML> | |
| #include <osg/ProxyNode> | |
| using namespace osgEarth; | |
| using namespace osgEarth::Util; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Allow overriding of the final sky fragment color | |
| void overrideSkyFragColor(inout vec4 finalColor) | |
| { | |
| } | |
| // Allows overriding of the fog color, fog blend factor, underlying cloud color, and alpha blending of the cloud. | |
| void overrideStratusLighting(in vec3 fogColor, in float fogFactor, in vec3 cloudColor, in float cloudFade, inout vec4 finalColor) | |
| { | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #ifdef OPENGL32 | |
| out vec4 fragColor; | |
| #endif | |
| // Light, view, and normal vectors are all in world space. | |
| // This function may be used to modify the ambient, diffuse, and specular light computed by Triton's fragment shaders. | |
| void user_lighting(in vec3 L | |
| , in vec3 vVertex_World_Space, in vec3 vNormal_World_Space | |
| , in vec4 vVertex_Projection_Space |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* -*-c++-*- */ | |
| /* osgEarth - Dynamic map generation toolkit for OpenSceneGraph | |
| * Copyright 2016 Pelican Mapping | |
| * http://osgearth.org | |
| * | |
| * osgEarth is free software; you can redistribute it and/or modify | |
| * it under the terms of the GNU Lesser General Public License as published by | |
| * the Free Software Foundation; either version 2 of the License, or | |
| * (at your option) any later version. | |
| * |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <osgViewer/Viewer> | |
| #include <osg/Texture2DArray> | |
| #include <osgDB/ReadFile> | |
| #include <osg/Geometry> | |
| #include <iostream> | |
| const char* vert = | |
| "#version 330 compatibility\n" | |
| "out vec4 coord;\n" | |
| "void main() {\n" |