Hello. I’m new to c++ and opengl but have experience in quite a few other languages so am trying to jump right in and do something fun.
I’m working only in 2d mode right now and what I’d like to do is write a program that generates random sword images. Currently the algorithm is not what I’m hung up on, but how I should proceed in drawing it.
The problem comes with drawing curves mainly. So if I want to say have it draw random curves on the blade of the sword I’m not sure how to get it to look smooth. As far as I can tell opengl is all polygon based so the only way to achieve a smooth circle is by drawing a lot of points. I’d like to use the generated image as an icon for loot in a game so having a ton of points on it would probably be too much for a simple 2d game.
The other idea I had is to somehow draw the image to memory and apply that as a texture to a quad. This might be what I have to do, however I’d like to be able to apply a texture with opengl to the finished sword shape instead of having to come up with a way to fill in the image myself.
Anyway, what I’m looking for is perhaps someone that can point me in the right direction for what I need to learn to accomplish my goals. Is there a way to draw a 2d sword blade dynamically using opengl or do I need to look at other methods. Or is there a way to apply a texture and perhaps bump mapping to just an area drawn?
Hope this makes sense. Thanks.