Questions about glbitmap

I am working with an outdated piece of code in some materials for work that uses glBitmap () calls to draw bitmap icons. My problem is that it is pretty slow once you get up to 1000 badges at a time. It slows down to a 1-2 second refresh rate, and I would like to see if I can do it faster than that.

First, I should probably describe how the current code works. Bitmap icons are 32x32 images with one bit per pixel, pre-loaded into memory. For each icon displayed, the code performs:

glNewList glRasterPos2f glBitmap glEndList

and then glCallList () is called in the display list. I know that calling glCallList () repeatedly like this for each icon can be very slow, but some proper architecture in the code makes it quite complicated.

Are there any other ways to speed this up without redoing all this? I have quite a lot of free rule to do such things, but I should be able to justify this for guidance. Will switching from glBitmap () to using something like textured ATVs be faster? Can I insert multiple calls to glBitmap () in one display list and just call glCallList () once for all the icons?

In the past, I worked a bit on GL, but that was a long time ago. I'm pretty rusty, but I can understand most of this.

+3
2

. ( ) 60 FPS , Intel ( , GMA945).

glTexCoord, , .

, ( ), - , .

+5

: . gluOrtho (0,0, 800, 600, 1, -1). (x, y, 0). ( )

, .

glBitmap , (glGetPixels co)

+1

Source: https://habr.com/ru/post/1756659/


All Articles