Jump to content
  • Advertisement

Jeremy Blouir

  • Content Count

  • Joined

  • Last visited

Posts posted by Jeremy Blouir

  1. Perfect answers, thanks alot guys for the insight. Knowing that SDL uses OpenGL under the hood(notably depending on the environment context I am sure) is all I really need to know, as SDL is going to inherit whatever performance cost their is with OpenGL anyway theoretically. I believe then it's best if I just get started cracking on with OpenGL as I suspect I am going to need shaders and other features in the future. As I have the source for SDL I shall study it and see how it works. Thanks!

  2. Hi GameDev! I just joined today. I have been doing some research around OpenGL and 2D games. What I can't figure out is how it would be beneficial to use OpenGL instead of just SDL2's accelerated rendering. I have found that both Terraria and Awesomenaughts use OpenGL. I can understand why they would have used OpenGL before SDL2 but now it seems that SDL2s advanced texture rendering is sufficient.

    So if this is not the case then they must be using OpenGL for shaders or particle effects. Particle effects I guess I can understand but shaders I do not. Shaders work with vertices and vectors and seem to inherently require 3Dimensional space.

    For example, if I am to make a game with lighting, it seems to me that I can achieve this with alpha blending/color modulation and maybe some raytracing and use SDL2 to render this on screen. I can't see how it wound be possible to do this with OpenGL as light calculations must involve vectors and bouncing off walls in 3d space. It would mean that I would somehow have to translate my 2d tilespace into 3d meshes with vertices and then load shader programs that would understand the nature of my flatspace. Which sseems odd and maybe slower to use an entire mesh per tile or sprite.

    I don't mind learning OpenGL, I just want to make sure it's worth it! Maybe I made the mistake of learning SDL2's advanced rendering first, as its just so simple to use.

    Any information from the eexperienced would be greatly appreciated. Thanks for reading and am excited to have joined GameDev!
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!