Exemple #1
0
GL_LineAO::GL_LineAO( std::shared_ptr< const LineSet > sLines ) :
	streamlines( sLines )
{

	GLint value[4];
	glGetIntegerv( GL_VIEWPORT, value );

	int width = value[2];
	int height = value[3];

	m_width = width;
	m_height = height;

	srand( time( NULL ) );

	// create shaders
	m_lineShader = std::unique_ptr< Shader >( new Shader( 
		"/u/mai11dre/VisPrak/fantom/praktikum/shader/Line-vertex.glsl",
		"/u/mai11dre/VisPrak/fantom/praktikum/shader/Line-fragment.glsl")
	);

	m_textureShader = std::unique_ptr< Shader >( new Shader (
		"/u/mai11dre/VisPrak/fantom/praktikum/shader/Lightning-vertex.glsl",
		"/u/mai11dre/VisPrak/fantom/praktikum/shader/Lightning-fragment.glsl")
	);

	initLines();
	initQuad();
	initGBuffer();
	genNoiseTexture();

}
void GraphicsDevice::initGBufferAndDepthStencil()
{
	initDepthStencil();
	initGBuffer();
}