소스 검색

Init memory for screenshot to zero

pull/223/head
Ray 8 년 전
부모
커밋
a08117155d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. +1
    -1
      src/rlgl.c

+ 1
- 1
src/rlgl.c 파일 보기

@ -2198,7 +2198,7 @@ void rlglUnloadMesh(Mesh *mesh)
// Read screen pixel data (color buffer)
unsigned char *rlglReadScreenPixels(int width, int height)
{
unsigned char *screenData = (unsigned char *)malloc(width*height*k">sizeof(unsigned char)*4);
unsigned char *screenData = (unsigned char *)calloc(width*height*mi">4, sizeof(unsigned char));
// NOTE: glReadPixels returns image flipped vertically -> (0,0) is the bottom left corner of the framebuffer
glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, screenData);

불러오는 중...
취소
저장