PrevUpHomeNext

Program pipelines

#include <oglplus/program_pipeline.hpp>

Common program pipeline operations

template <>
class ObjCommonOps<tag::ProgramPipeline>
 : public ProgramPipelineName
{
public:
	static ProgramPipelineName Binding(void); 1

	static void Bind(ProgramPipelineName pipeline); 2

	void Bind(void) const; 3
};

1

Returns the currently bound program pipeline. See glGetIntegerv.

2

Binds the specified program pipeline See glBindProgramPipeline.

3

Binds this program pipeline. See glBindProgramPipeline.

Operations with direct state access

template <>
class ObjectOps<tag::DirectState, tag::ProgramPipeline>
 : public ObjZeroOps<tag::DirectState, tag::ProgramPipeline> 1
{
public:
	struct Properties
	{
		typedef ProgramPipelineStage Stage;
	};

	ProgPLUseStages UseStages(ProgramName program) const; 2

	void UseStages(
		Bitfield<ProgramPipelineStage> stages,
		ProgramName program
	) const; 3

#if defined GL_ALL_SHADER_BITS
	void UseAllStages(ProgramName program) const; 4
#endif

	String GetInfoLog(void) const; 5

	Boolean IsValid(void) const; 6

	ObjectOps& Validate(void); 7

	Outcome<ObjectOps&> Validate(std::nothrow_t);

	void ActiveShaderProgram(ProgramName program) const; 8
	ProgramName ActiveShaderProgram(void) const; 9

	Boolean HasShader(ShaderType shader_type) const; 10

	ProgramName ShaderProgram(ShaderType shader_type) const; 11
};

1

Indirectly inherits from ObjCommonOps<tag::ProgramPipeline>.

2

This function returns an object that allows to specify which stages of program should by used when this pipeline is active by calling its Vertex(), TessControl(), TessEvaluation(), Geometry(), Fragment() and and All() member functions of the object returned by UseStages. See glUseProgramStages.

Program prog;
ProgramPipeline pp;
...
pp.UseStages(prog).Vertex();
pp.UseStages(prog).Vertex().Geometry();
pp.UseStages(prog).Vertex().TessControl().TessEvaluation().Geometry();
pp.UseStages(prog).Vertex().Geometry().Fragment();
pp.UseStages(prog).Geometry();
pp.UseStages(prog).All();

3

Uses the specified stages of the specified program. See glUseProgramStages.

4

Use all stages of the program. See glUseProgramStages.

5

Returns the validation process output. See glGetProgramPipeline, glGetProgramPipelineInfoLog.

6

Returns true if the pipeline is validated, false otherwise. See glGetProgramPipeline, GL_VALIDATE_STATUS.

7

Validates this program pipeline. Throws ValidationError on failure. See glValidateProgramPipeline.

8

Make the program active for this program pipeline. See glActiveShaderProgram.

9

Returns the current active shader program. See glGetProgramPipeline, GL_ACTIVE_PROGRAM.

10

Returns true if this pipeline contains a shader of the specified type. See glGetProgramPipeline.

11

Returns the program from which the shader of the specified type is used. See glGetProgramPipeline.

Definition

typedef ObjectOps<tag::DirectState, tag::ProgramPipeline>
	ProgramPipelineOps;

typedef Object<ProgramPipelineOps> ProgramPipeline;

typedef ObjectZero<ObjZeroOps<tag::DirectState, tag::ProgramPipeline>> 1
	NoProgramPipeline;

1

Indirectly inherits from ObjCommonOps<tag::ProgramPipeline>.

Stage

#include <oglplus/program_pipeline_stage.hpp>

enum class ProgramPipelineStage : GLbitfield
{
	VertexShader         = GL_VERTEX_SHADER_BIT,
	TessControlShader    = GL_TESS_CONTROL_SHADER_BIT,
	TessEvaluationShader = GL_TESS_EVALUATION_SHADER_BIT,
	GeometryShader       = GL_GEOMETRY_SHADER_BIT,
	FragmentShader       = GL_FRAGMENT_SHADER_BIT,
	ComputeShader        = GL_COMPUTE_SHADER_BIT,
	AllShaders           = GL_ALL_SHADER_BITS
};

template <>
Range<ProgramPipelineStage> EnumValueRange<ProgramPipelineStage>(void);

StrCRef EnumValueName(ProgramPipelineStage);

Bitfield<ProgramPipelineStage> operator | (ProgramPipelineStage b1, ProgramPipelineStage b2);

PrevUpHomeNext