GlShaderBlinnShadowMap()
	{
		std::string infoLog;

		initVertFragShadersFromDirectory("shader_blinn_shadow_map");
		attachFragShader(SHADER_GLSL_DEFAULT_DIR"shader_blinn/fragment_shader_skeleton.glsl");

		// link programs
		if (!link())
		{
			std::string infoLog;
			getInfoLog(infoLog);
			std::cerr << "info Log: during linking: " << infoLog << std::endl;
			return;
		}

		setupUniform(texture0_enabled, "texture0_enabled");
		setupUniform(shadow_map_matrix_uniform, "shadow_map_matrix");

		use();
		setUniform1i("texture0", 0);
		setUniform1i("texture_shadow_map", 1);
		disable();

		initBlinnSkeleton(*this);
	}
	GlShaderTexturize()
	{
		if (!initVertFragShadersFromDirectory("shader_texturize"))
			return;

		if (!link())
		{
			std::string infoLog;
			getInfoLog(infoLog);
			std::cerr << "info Log: linking: " << infoLog << std::endl;
			return;
		}

		setupUniform(pvm_matrix_uniform, "pvm_matrix");
	}
	CShaderBathymetry()
	{
		std::string infoLog;

		initVertFragShadersFromDirectory("shader_bathymetry");
		attachFragShader(SHADER_GLSL_DEFAULT_DIR"shader_blinn/fragment_shader_skeleton.glsl");

		// link programs
		link();
		if (error())
		{
			std::string infoLog;
			getInfoLog(infoLog);
			std::cerr << "info Log: during linking: " << infoLog << std::endl;
			return;
		}

		initBlinnSkeleton(*this);
	}
Exemple #4
0
	GlShaderBlinn()
	{
		std::string infoLog;

		initVertFragShadersFromDirectory("shader_blinn");
		attachFragShader(SHADER_GLSL_DEFAULT_DIR"shader_blinn/fragment_shader_skeleton.glsl");

		// link programs
		if (!link())
		{
			std::string infoLog;
			getInfoLog(infoLog);
			std::cerr << "info Log: during linking: " << infoLog << std::endl;
			return;
		}

		setupUniform(texture0_enabled, "texture0_enabled");
		setupUniform(vertex_color, "vertex_color");

		initBlinnSkeleton(*this);
	}
	GLShaderHeightColorBlinn()
	{
		std::string infoLog;

		initVertFragShadersFromDirectory("shader_height_color_blinn");
		attachFragShader(SHADER_GLSL_DEFAULT_DIR"shader_blinn/fragment_shader_skeleton.glsl");

		// link programs
		if (!link())
		{
			std::string infoLog;
			getInfoLog(infoLog);
			std::cerr << "info Log: during linking: " << infoLog << std::endl;
			return;
		}

		setupUniform(height_color_scale, "height_color_scale");
		setupUniform(height_color_offset, "height_color_offset");

		initBlinnSkeleton(*this);

		setupColorScaleAndOffset();
	}