Exemple #1
0
 public SSScene(SSMainShaderProgram main                 = null,
                SSPssmShaderProgram pssm                 = null,
                SSInstanceShaderProgram instance         = null,
                SSInstancePssmShaderProgram instancePssm = null)
 {
     renderConfig = new SSRenderConfig(main, pssm, instance, instancePssm);
 }
Exemple #2
0
 public SSScene(SSMainShaderProgram main                          = null,
                SSPssmShaderProgram pssm                          = null,
                SSInstanceShaderProgram instance                  = null,
                SSInstancePssmShaderProgram instancePssm          = null,
                Dictionary <string, SSShaderProgram> otherShaders = null)
 {
     renderConfig = new SSRenderConfig(main, pssm, instance, instancePssm, otherShaders);
 }
Exemple #3
0
        public SSRenderConfig(SSMainShaderProgram main,
							  SSPssmShaderProgram pssm,
							  SSInstanceShaderProgram instance,
							  SSInstancePssmShaderProgram instancePssm)
        {
            mainShader = main;
            pssmShader = pssm;
            instanceShader = instance;
            instancePssmShader = instancePssm;
        }
Exemple #4
0
 public SSRenderConfig(SSMainShaderProgram main,
                       SSPssmShaderProgram pssm,
                       SSInstanceShaderProgram instance,
                       SSInstancePssmShaderProgram instancePssm)
 {
     mainShader         = main;
     pssmShader         = pssm;
     instanceShader     = instance;
     instancePssmShader = instancePssm;
 }
Exemple #5
0
 public SSRenderConfig(SSMainShaderProgram main,
                       SSPssmShaderProgram pssm,
                       SSInstanceShaderProgram instance,
                       SSInstancePssmShaderProgram instancePssm,
                       Dictionary <string, SSShaderProgram> other
                       )
 {
     mainShader         = main;
     pssmShader         = pssm;
     instanceShader     = instance;
     instancePssmShader = instancePssm;
     otherShaders       = other;
 }
Exemple #6
0
        public SSRenderConfig(SSMainShaderProgram main,
							  SSPssmShaderProgram pssm,
							  SSInstanceShaderProgram instance,
							  SSInstancePssmShaderProgram instancePssm,
                              Dictionary<string, SSShaderProgram> other
        )
        {
            mainShader = main;
            pssmShader = pssm;
            instanceShader = instance;
            instancePssmShader = instancePssm;
            otherShaders = other;
        }
Exemple #7
0
        public SSScene(SSMainShaderProgram main = null,
					   SSPssmShaderProgram pssm = null,
					   SSInstanceShaderProgram instance = null,
					   SSInstancePssmShaderProgram instancePssm = null)
        {
            renderConfig = new SSRenderConfig (main, pssm, instance, instancePssm);
        }
        /// <summary>Creates a 800x600 window with the specified title.</summary>
        public TestBenchBootstrap(string windowName)
            : base(#if false
				800, 600, 
				GraphicsMode.Default, // color format
				windowName,
				GameWindowFlags.Default,  // windowed mode 
				DisplayDevice.Default,    // primary monitor
				2, 2,  // opengl version
				GraphicsContextFlags.Debug
				#endif)
        {
            // this can be used to force other culture settings for testing..
            // System.Threading.Thread.CurrentThread.CurrentCulture = new CultureInfo("nl-NL");

            this.Title = windowName;
            VSync = VSyncMode.On;
            restoreClientWindowLocation();

            Console.WriteLine("GL Version = {0}",GL.GetString(StringName.Version));
            Console.WriteLine("GL Shader Version = {0}", GL.GetString(StringName.ShadingLanguageVersion));

            // setup asset manager contexts
            // these help the asset manager find the "Asset" directy up above the bin/obj/Debug
            // output directories...
            SSAssetManager.AddAssetArchive(new SSAssetArchiveHandler_FileSystem("./Assets"));
            SSAssetManager.AddAssetArchive(new SSAssetArchiveHandler_FileSystem("../../Assets"));
            SSAssetManager.AddAssetArchive(new SSAssetArchiveHandler_FileSystem("../../../Assets"));
            SSAssetManager.AddAssetArchive(new SSAssetArchiveHandler_FileSystem("../../../../Assets"));

            mainShader = new SSMainShaderProgram(); // before mscene
            if (!mainShader.IsValid) {
                throw new Exception ("Failed to build the main shader");
            }
            pssmShader = new SSPssmShaderProgram ();
            if (!pssmShader.IsValid) {
                pssmShader = null;
            }
            instancingShader = new SSInstanceShaderProgram ();
            if (!instancingShader.IsValid) {
                instancingShader = null;
            } else {
                instancingShader.debugLocations ();
            }
            instancingPssmShader = new SSInstancePssmShaderProgram ();
            if (!instancingPssmShader.IsValid) {
                instancingPssmShader = null;
            }

            setupInput ();
            setupScene ();
            setupCamera ();
            setupEnvironment ();
            setupHUD ();
        }
Exemple #9
0
        public SSScene(SSMainShaderProgram main = null,
					   SSPssmShaderProgram pssm = null,
					   SSInstanceShaderProgram instance = null,
					   SSInstancePssmShaderProgram instancePssm = null,
                       Dictionary<string, SSShaderProgram> otherShaders = null)
        {
            renderConfig = new SSRenderConfig (main, pssm, instance, instancePssm, otherShaders);
        }