0
나는 지금 책을 읽었습니다. 그것 OpenGl에 관하여. 악마로 텍스처를로드하는 예제가 있습니다. 1 : 1 책의 코드를 구현했습니다. 그러나 iluFlipImage 함수는 그래픽 문제를 일으 킵니다. TOA 프레임 워크와 닷넷 프레임 워크 4.0을 사용 임은 2.1iluFlipImage로 그래픽 문제 발생
은 이성을 상실하지
을이성을 상실
public void LoadTexture(string textureName, string path)
{
int devIlId;
Il.ilGenImages(1, out devIlId);
Gl.glBindTexture(Gl.GL_TEXTURE_2D, devIlId);
if (!Il.ilLoadImage(path))
{
System.Diagnostics.Debug.Assert(false,
"Could not open file, [" + path + "].");
}
Ilu.iluFlipImage();
var width = Il.ilGetInteger(Il.IL_IMAGE_WIDTH);
var height = Il.ilGetInteger(Il.IL_IMAGE_HEIGHT);
var textureId = Ilut.ilutGLBindTexImage();
System.Diagnostics.Debug.Assert(textureId != 0);
Il.ilDeleteImages(1, ref devIlId);
_textureStorage.Add(textureName, new Texture(textureId, path, width, height));
}