Skip to content

Commit fa5a131

Browse files
committed
update comment
1 parent 57ebd94 commit fa5a131

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/platform/utils.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,22 +43,23 @@ std::vector<uint8_t> renderToBytes(cocos2d::CCNode* node, int& width, int& heigh
4343
glBindFramebuffer(GL_FRAMEBUFFER, fbo);
4444
glFramebufferTexture2D(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, texture, 0);
4545

46+
// Unbind texture
4647
glBindTexture(GL_TEXTURE_2D, 0);
4748

4849
// Clear any data
4950
glClearColor(0.0f, 0.0f, 0.0f, 0.0f);
5051
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
5152

52-
// Flip Y axis when projecting
53+
// Flip Y when projecting
5354
kmGLMatrixMode(KM_GL_PROJECTION);
5455
kmGLPushMatrix();
5556
kmGLLoadIdentity();
5657

5758
kmMat4 ortho;
5859
kmMat4OrthographicProjection(&ortho,
59-
0.0f, winSize.width, // left, right
60-
winSize.height, 0.0f, // !!! Swap top and bottom
61-
-1.0f, 1.0f // near, far
60+
0.0f, winSize.width,
61+
winSize.height, 0.0f,
62+
-1.0f, 1.0f
6263
);
6364
kmGLMultMatrix(&ortho);
6465

0 commit comments

Comments
 (0)