简体   繁体   中英

How to draw a full screen quad in OpenGL 3.2?

I've been having a problem trying to get OpenGL 3.2 to work and after spending a few hours trying to figure out what was wrong I realized that it does not support glBegin. I use that command probably about 50-100 times in my engine to draw full screen quads and GUI elements. So what is a simple way to just draw a rectangle with OpenGL 3.2? Do I actually have to create a vertex buffer, fragment shader, and vertex shader to do something so simple?!

Do I actually have to create a vertex buffer, fragment shader, and vertex shader to do something so simple?!

Yep, no freebies in Core profile.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM