Writing to frame buffer

后端 未结 1 1968
感动是毒
感动是毒 2020-12-08 17:18

I\'m using an i5 core with builtin graphics accelerator GMA-HD running on an RHEL 6.0 OS. I needed to test the graphics acceleration capabilities of the graphics driver(whic

相关标签:
1条回答
  • 2020-12-08 18:25

    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

    0 讨论(0)
提交回复
热议问题