In a GUI system, what would be a good way to represent pop-up items such as menus and dialog boxes?
- Viewing Profile: Topics: AaronWizardstar
Community Stats
- Group Members
- Active Posts 24
- Profile Views 775
- Member Title Member
- Age Age Unknown
- Birthday Birthday Unknown
-
Gender
Not Telling
User Tools
Topics I've Started
Managing pop-up GUI items
12 May 2013 - 05:49 PM
How much of Boost do you use?
28 April 2013 - 09:56 AM
Indexing pixels in monochrome FreeType glyph
14 February 2013 - 12:51 AM
I need to render some monochrome (not greyscale, not antialiased) FreeType fonts, with the ultimate goal of implementing distance field fonts. I don't know how to properly access a monochrome glyph's pixels though.
For a greyscale glyph I can get the pixel at (x, y) with glyph.bitmap.buffer[(glyph->bitmap.width * y) + x]. I can't figure out what the equivalent offset is for a monochrome glyph though beyond it having something to do with the glyph's bitmap.pitch value.
Handling transparency for sprites with holes in them
30 January 2013 - 05:03 PM
grafix.png 31.45K
17 downloads
Sprite batching and other sprite rendering techniques
25 January 2013 - 09:05 PM
I'm considering how to efficiently render 2D sprites. I'm trying to keep things forward compatible for OpenGL 3+, but I'm limited to OpenGL 2.
I'd have a mixture of static and dynamic sprites.
- Some sprites would be completely static; e.g. map tiles
- Moving sprites would have dynamic transforms
- Animated sprites would have dynamic texture coordinates; I'm using a texture atlas
- A sprite may be both moving and animated (of course)
- A sprite may be able to move but only does so infrequently; e.g. doors that swing only when opened
- The lifetime of a sprite may be dynamic; some sprites may exist for the whole duration of the game, others may be added and later removed from the scene mid-game
A strategy I've used is having a global VBO representing a single unit-sized quad. This unit quad is rendered multiple times for each sprite, where I provide my shader a transformation matrix as well as offset and scale uniforms for the texture coordinates.
I've read that batching sprites, where I get the world-space coordinates and final texture co-ordinates of all sprites and jam them into a single VBO, is normally the way to go performance-wise. The simplest(?) batching method that I understand is using a GL_STREAM_DRAW VBO that gets the vertex data of all sprites with a glBufferData call each frame, possibly using an additional GL_STATIC_DRAW VBO with all the sprites that I know are static and persistent.
Would sprite batching be significantly more performant than my unit-quad VBO approach? If so, is the method of sprite batching I described an efficient implementation of batching given my requirements for sprite behaviour?
- Home
- » Viewing Profile: Topics: AaronWizardstar

Find content