3 ms·
anyone have a recommendation for an introduction to using open gl for 2d stuff?
by the_cat_kittles 12y ago
anyone have a recommendation for an introduction to using open gl for 2d stuff?
- Arelius 12y agoIt's pretty much exactly the same thing except you multiply everything by a matrix that looks something like this instead of the standard projection matrix: 2/screen_width, 0, 0, 0.5, 0, -2/screen_height, 0, 0.5, 0, 0, 1, 0, 0, 0, 0, 1 Then assuming that you are drawing back-to-front and don't want to do depth-rejection you can just disable depth testing: glDisable(GL_DEPTH_TEST);
- tdsamardzhiev 12y agoI think you are better off using higher-level 2D library. For example, SDL will do the same, while reducing the amount of boilerplate code.