예제 #1
0
void GLTexture::EndRenderTarget(int w, int h)
{
  glActiveTexture(GL_TEXTURE0);
  glEnable(GL_TEXTURE_2D);
  glBindTexture(GL_TEXTURE_2D, GetGLHandle());
  glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, 0,0, width,height, 0);
  glViewport(0,0, w,h);
}
예제 #2
0
float* GLTexture::GetData()
{
  glActiveTexture(GL_TEXTURE0);
  glEnable(GL_TEXTURE_2D);
  glBindTexture(GL_TEXTURE_2D, GetGLHandle());
  if(!texData)
    texData = new float[width*height*4];
  glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_FLOAT, texData);
  return texData;
}
예제 #3
0
	inline static BaseType Adjust(ValueType value)
	{
		return GetGLHandle(value);
	}