[주의] 멍청한 실수임
vbo를 랜더링 하기 전에 다음 함수들을 호출해주자
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
vbo->Render();
나는 바보다
'개발 > SFML' 카테고리의 다른 글
[SFML-랜더링] 무한 루프 스크롤 만들기 (0) | 2014.07.13 |
---|
class foo extend Actor {
...
@Override
public void draw(Batch batch, float parentAlpha) {
batch.end();
mPolygonSpriteBatch.setTransformMatrix(batch.getTransformMatrix());
mPolygonSpriteBatch.begin();
sprite.draw(mPolygonSpriteBatch);
mPolygonSpriteBatch.end();
batch.begin();
}
...
}
It is very simple, I suddenly know while I saw the core libgdx source code.
we need transformation matrix to applying it.
and the transformation matrix is automatically generated when we call the mutators
(to rotate, shift, scaling)
for Actors. and it passed by tree like manner.
so, what we have to do is just pick the transformation matrix of Actor (by batch parameter)
and applying it to the batch object whatever we want.
that's all