Example #1
0
	void OGLTexture::TexParameterfv(GLenum pname, GLfloat const * param)
	{
		float4 const f4_param(param);
		KLAYGE_AUTO(iter, tex_param_fv_.find(pname));
		if ((iter == tex_param_fv_.end()) || (iter->second != f4_param))
		{
			if (glloader_GL_EXT_direct_state_access())
			{
				glTextureParameterfvEXT(texture_, target_type_, pname, param);
			}
			else
			{
				glBindTexture(target_type_, texture_);
				glTexParameterfv(target_type_, pname, param);
			}

			tex_param_fv_[pname] = f4_param;
		}
	}
Example #2
0
	void OGLTexture::TexParameterfv(GLenum pname, GLfloat const * param)
	{
		float4 const f4_param(param);
		auto iter = tex_param_fv_.find(pname);
		if ((iter == tex_param_fv_.end()) || (iter->second != f4_param))
		{
			if (glloader_GL_VERSION_4_5() || glloader_GL_ARB_direct_state_access())
			{
				glTextureParameterfv(texture_, pname, param);
			}
			else if (glloader_GL_EXT_direct_state_access())
			{
				glTextureParameterfvEXT(texture_, target_type_, pname, param);
			}
			else
			{
				OGLRenderEngine& re = *checked_cast<OGLRenderEngine*>(&Context::Instance().RenderFactoryInstance().RenderEngineInstance());
				re.BindTexture(0, target_type_, texture_);
				glTexParameterfv(target_type_, pname, param);
			}

			tex_param_fv_[pname] = f4_param;
		}
	}
Example #3
0
void AbstractTexture::parameterImplementationDSA(GLenum parameter, const GLfloat* values) {
    glTextureParameterfvEXT(_id, _target, parameter, values);
}