Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - cwils132

Pages: [1]
1
Graphics / Re: Free hand drawing
« on: May 14, 2015, 01:17:36 am »
You'd be better equipped in studying what you actually mean with "draw free hand".
Look at existing tools, learn how they do things and figure out how you could approach this on your own.
No library or API will just provide you a function that's called "draw_free_hand" and then all the magic will happen. ;D

In the end all that OpenGL does, is provide access to your graphics card and all that SFML or SDL does is provide a simple API for a limited feature set. How you now actually go from "input" (e.g. a wombat tablet) to something "free hand" on your screen, that's all left to the programmer to figure out and implement.

Sorry. I have an art background so those terms still come to me a bit more readily than programming terms.

From what I can tell I'll need to set up some situation where I draw on in a 2D array on what SFML calls a texture, and then display that. I know I'd need it to be handled by an on key press event (in this case left mouse click) which I understand. Unfortunately I'm still new enough that while I can think of the concepts, I'm having a much more difficult time implementing them.

Now from here my best guess is to do something like take in the current mouse position and continually draw in points while the button is held, but that feels like it's going to cause trouble in the long run. Another problem I'm not finding an easy solution to is that points and lines and whatnot all seem to be set at 1 pixel width. It's not a problem I feel I need to be too concerned about since I'm just getting started in figuring this all out, but it does present a future issue.

So I don't really know what I was expecting for an answer. I guess just verification that I'm on the right path or being pointed towards something that might help me out. At least it's fun to mess around while I accomplish nothing for the time being.


2
Graphics / Free hand drawing
« on: May 13, 2015, 11:57:32 pm »
Forgive me if this has been asked. I've been digging around for a few hours now, however, and haven't been able to turn up a lot.

I'll try to keep it brief and elaborate more if necessary. I am trying to learn how to build my own digital painting program. So far with SFML I can open a blank window, but I can't find anything that would allow me to draw free hand. The tutorials on the website appear to only work for predefined shapes.

Is there something I'm missing in the tutorials or is SFML just not equipped to handle this function? Would I be better served going with SDL2 and OpenGL?

Thanks for any and all help.

Pages: [1]