Exemple #1
0
	void Renderer::init()
	{
		// Temp Should set to default OpenGL states.
		memset(m_aeState, 0, sizeof(unsigned int)*STATE_COUNT);
		m_aeState[STATE_BLEND_DST] = ONE;
		m_aeState[STATE_BLEND_SRC] = ONE;

		//////////////////////////////////////////////////////////////////////////
		// Temp settings for testing - these will be encapsulated elsewhere
		setClearColour(Vec4(0.0f, 0.0f, 0.0f, 0.0f));
		setRenderState(STATE_DEPTH_TEST, TRUE);
		setRenderState(STATE_BLEND_SRC, SRC_ALPHA);
		setRenderState(STATE_BLEND_DST, ONE_MINUS_SRC_ALPHA);
		//////////////////////////////////////////////////////////////////////////
	}
Exemple #2
0
void SDLAppDisplay::setClearColour(vec3 colour) {
    setClearColour(vec4(colour, enable_alpha ? 0.0f : 1.0f));
}