View Full Version : How to render background image in GL3?

07-10-2009, 06:47 AM
GL 3.1's spec says:

Quadrilateral and polygon primitives - vertex array drawing modes
POLYGON, QUADS, and QUAD STRIP, related descriptions of rasterization
of non-triangle polygons, and all associated state.

(have been deprecated)

I want to render a background image use texture (think about a 2D game with a colorful background). Do I have to draw 2 triangle to fill the window?

I've considered the POINT_SPRITE extension. It is now a core feature in GL3. It allow me to draw a big "point" and I can render my texture on it. However, points have to be square but window is rectangle, and more serious, in NV's implementation, POINT_SPRITE is disabled by default, and it doesn't allow me to call "glEnable(GL_POINT_SPRITE);" in a forward compatible context.

07-10-2009, 07:15 AM
OK, I know, I can use TRIANGLE_FAN instead.

Sorry to disturb you all.

07-10-2009, 07:16 AM
Pity about quads. :(