Writing to frame buffer

为君一笑 提交于 2019-11-28 06:36:37

You are not increasing location ! So 255 is only on the first pixel, and all the others are 0. Try this instead :

        location = (x+vinfo.xoffset) * (vinfo.bits_per_pixel/8) + (y+vinfo.yoffset) * finfo.line_length;
        for(count = 1 ;count < 100 ;count++)
        {
                *(fbp + location) = 255;    /* Some blue */
                *(fbp + location + 1) = 0; /* A little green */
                *(fbp + location + 2) = 0; /* A lot of red */
                *(fbp + location + 3) = 0; /* No transparency */
                location += 4;   
        }

However, may be the right thing to do for testing is to use directfb It comes with some framebuffer performance test

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!