Ejemplo n.º 1
0
        public void Select(JLoader loader)
        {
            JModelTexture texture = new JModelTexture(loader.loadTexture(SphereTexturePathSelected));

            SphereTexturedModel = new JTexturedModel(SphereModel, texture);
            SphereEntity        = new JEntity(SphereTexturedModel, SphereEntity.Position, new Vector3(0, 0, 1), 0.5f);
        }
Ejemplo n.º 2
0
 public JWaterRenderer(JLoader loader, JWaterShader waterShader, Matrix4 projectionMatrix, JWaterFrameBuffer frameBuffer, JWaterTile waterTile)
 {
     this.WaterShader   = waterShader;
     this.FrameBuffer   = frameBuffer;
     this.WaterTile     = waterTile;
     dudvMapTexture     = JFileUtils.GetPathToResFile("waterDUDV.png");
     normalMapTexture   = JFileUtils.GetPathToResFile("matchingNormalMap.png");
     dudvMap            = loader.loadTexture(dudvMapTexture);
     normalMap          = loader.loadTexture(normalMapTexture);
     distortionVariance = 0;
     WaterShader.start();
     WaterShader.LoadTextures();
     WaterShader.LoadProjectionMatrix(projectionMatrix);
     WaterShader.stop();
     SetupVAO(loader);
 }
Ejemplo n.º 3
0
        /// <summary>
        /// Load the model and texture of the JBoundingSphere if we want to render it in the world.
        /// </summary>
        /// <param name="loader"></param>
        public void LoadSphereModel(JLoader loader)
        {
            SphereModelData = JObjFileLoader.LoadObj(SphereModelPath);
            SphereModel     = loader.LoadToVAO(SphereModelData.Vertices, SphereModelData.TextureCoords, SphereModelData.Normals, SphereModelData.Indices);
            JModelTexture texture = new JModelTexture(loader.loadTexture(SphereTexturePathUnselected));

            SphereTexturedModel = new JTexturedModel(SphereModel, texture);
            SphereEntity        = new JEntity(SphereTexturedModel, new Vector3(50, 0, -50), new Vector3(0, 0, 1), 0.5f);
        }