aboutsummaryrefslogtreecommitdiffstats
path: root/src/ui.cpp
diff options
context:
space:
mode:
authorClyne Sullivan <tullivan99@gmail.com>2016-03-04 08:45:53 -0500
committerClyne Sullivan <tullivan99@gmail.com>2016-03-04 08:45:53 -0500
commit5fadac5d0f37f574ca160107d832d11b421ad559 (patch)
treeff9667adf7c3b8d882083a99b7176260afd25349 /src/ui.cpp
parentfe5ea7fe415857f49d6630f2b0f50e1246c38eee (diff)
entity following
Diffstat (limited to 'src/ui.cpp')
-rw-r--r--src/ui.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ui.cpp b/src/ui.cpp
index c755a59..7333fc4 100644
--- a/src/ui.cpp
+++ b/src/ui.cpp
@@ -190,7 +190,7 @@ namespace ui {
void setFontSize(unsigned int size){
unsigned int i,j;
- char *buf;
+ unsigned char *buf;
fontSize=size;
FT_Set_Pixel_Sizes(ftf,0,fontSize);
@@ -230,7 +230,7 @@ namespace ui {
* making it white-on-black.
*/
- buf = new char[ftf->glyph->bitmap.width * ftf->glyph->bitmap.rows * 4];
+ buf = new unsigned char[ftf->glyph->bitmap.width * ftf->glyph->bitmap.rows * 4];
for(j=0;j<ftf->glyph->bitmap.width*ftf->glyph->bitmap.rows;j++){
buf[j*4 ]=255;//fontColor[0];
@@ -1084,7 +1084,8 @@ namespace ui {
}
void takeScreenshot(GLubyte* pixels){
- GLubyte bgr[SCREEN_WIDTH*SCREEN_HEIGHT*3];
+ std::vector<GLubyte> bgr (SCREEN_WIDTH * SCREEN_HEIGHT * 3, 0);
+
for(uint x = 0; x < SCREEN_WIDTH*SCREEN_HEIGHT*3; x+=3){
bgr[x] = pixels[x+2];
bgr[x+1] = pixels[x+1];