OpenGL纹理坐标混乱

时间:2012-03-28 17:28:37

标签: opengl graphics

从我读到的,纹理T坐标(Y轴)翻转(顶部是1.0,机器人是0.0),虽然我不太明白为什么我当前的映射代码工作,因为我映射我的这样的坐标:

float coords[] = 
{
    0,0,
    wratio,0,
    wratio,hratio,
    0,hratio
};

相反:

float coords[] = 
{
    0,0,
    wratio,0,
    wratio,1.0 - hratio,
    0,1.0 - hratio
};

最令人困惑的是,两个版本都有效(!????!)

......这里发生了什么?

0 个答案:

没有答案
相关问题