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 - Syntactic Fructose

Pages: 1 2 3 [4] 5 6
46
General / Re: Multithreading with sf::window
« on: May 25, 2014, 09:12:13 pm »
As I mentioned I know the performance will be horrible, I'm trying to represent the curve however and will start with 1 pixel. I have a portion of code that measures the time taken for certain calculations and records them in a file, I want to test threading starting at 1, moving onwards until the I find the lowest point in the curve.

I appreciate the pointers towards how I should be using thread, I'll look into that more

47
General discussions / Re: Question on donations
« on: May 25, 2014, 08:37:15 pm »
boost is an amazing example of projects with funds and no idea what to do with them, but it's glad to hear the SFML donations are actually being used and not sitting in an account!

48
General / Multithreading with sf::window
« on: May 25, 2014, 08:30:14 pm »
Hey all, currently I'm developing a particle simulator with SFML and Modern OpenGL, but I'm running into an issue and I need an opinion/help if I should even be doing this. I'm trying to introduce threads to hopefully simulate a parallelism curve, here's a quick drawing in paint I did that I want to reproduce:

To start off with this curve I want to launch a thread of **each** pixel and calculate it's next position on that given thread. My problem is I need to use window to grab the mouse coordinates in that thread to add force proportional to the mouses position, but passing window into the function is not an option because it is
sf::noncopyable
How can I go about doing this so I can access windows function while in each thread? Is it possible? Here is some code to demonstrate what I'm doing:

updateParticle:
void updateParticle(Particle& p,sf::Window const& window, glm::mat4& ViewMatrix, glm::mat4& ProjectionMatrix,
                                        double& delta, glm::vec3& CameraPosition, GLfloat* g_particule_position_size_data, GLubyte* g_particule_color_data,
                                        int& ParticlesCount);

during a for loop of all active particles on screen
//std::thread t[MAXTHREADS];
t[i] = std::thread(updateParticle,p,window,ViewMatrix,ProjectionMatrix, delta,CameraPosition,g_particule_position_size_data,g_particule_color_data,ParticlesCount);

of course this gives me an error, any workaround?

Note: if you want more code let me know, but the project is on my github at:https://github.com/Gmercer015/ParticleSimulator . You'll find my troubles at main.cpp

49
Are there any other parts of your program that could affect your input? I tested SFML handling multiple if statements of the same condition and my input works fine e.g.

 if (sf::Keyboard::isKeyPressed(sf::Keyboard::Z))
{
        std::cout << "A" << std::endl;          
}
       
if (sf::Keyboard::isKeyPressed(sf::Keyboard::Z))
        std::cout << "Z" << std::endl;

I think it may be your gui hanging rather than SFML, could it be
gui.handleEvent(event);
is maybe doing something you do not want it to do?

50
Window / Re: SFML OpenGL context 3.3 not working?
« on: May 23, 2014, 09:00:14 pm »
Are you by any chance on Linux?
Because the mesa driver requires a 3.1 core profile for OpenGL 3.3, which does not work with SFML.

Nope  :-\ Currently running window 8.1 with Visual studio 2012

51
Window / SFML OpenGL context 3.3 not working?
« on: May 23, 2014, 06:53:55 pm »
I'm currently trying to run a modern OpenGL program and am using SFML to handle my window, but I'm running into an error with GLSL. It gives me a warning:

Quote
WARNING: 0:29: Only GLSL version > 110 allows postfix "F" or "f" for float

Although my GLSL shaders specifically say at the top:
#version 330 core

and my SFML window context settings read:
sf::Window window(sf::VideoMode(800,600),       //declare window
                "Particle Simulation",                                  //window title
                sf::Style::Default,
                sf::ContextSettings(32, 8, 0, 3, 3)
                );     
   

I checked and my graphics card does support OpenGL 3.3 and higher, so it seems i'm doing something wrong with either SFML or reading in my shaders

what am I doing wrong?                      

52
General discussions / come make r/sfml an active subreddit!
« on: July 09, 2013, 09:17:36 pm »
hey everyone, I just want to draw attention to the r/sfml subreddit in hopes that it could turn into a useful resource for everyone. Make sure to check it out and contribute to the community! http://www.reddit.com/r/sfml

53
General discussions / Re: SFML Game Development -- A book on SFML
« on: July 08, 2013, 08:11:23 pm »
This is amazing, I love seeing how far SFML has progressed since I first heard of this. Getting the book asap



EDIT Q: If i order this on amazon am I also able to grab an e-book of it? I enjoy amazon shipping  ;D

54
General discussions / Re: More Community-driven Development
« on: June 20, 2013, 01:39:13 am »
I would love to help contribute to SFML! I just started watching the repository on github yesterday. After my haskell learning cools down a bit I would hope I can jump in and help fix some SFML bugs/contribute in any way I can.

55
General discussions / Re: Debian/Ubuntu packages for SFML
« on: June 06, 2013, 01:49:22 am »
Just checking in on any progress for .rpm packages, Thanks for your work again!

56
General discussions / Re: Debian/Ubuntu packages for SFML
« on: May 16, 2013, 11:53:04 pm »
you're awesome! this is so helpful for linux development

57
First off, new website is amazing as with the logo. Plus 2.0 is officially out and stable  ;D!

Title really explains it all, I enjoy using clang as a compiler, but I also really enjoy using SFML and openGL together. Are there plans in the future for clang support?

58
I had this idea early on in my c++ career for using sfml 1.6 with every application. Short answer, I would recommend no. As nexus pointed out it draws away from more c++ aspects and pushes you toward a subject you have yet to learn the basics of. Use the good 'ol console until you feel you have built up enough knowledge on the language to start using API's

59
General discussions / Re: A book on SFML -- looking for author(s)!
« on: April 12, 2013, 07:33:53 pm »


Will be waiting to pre-order this bad boy.

60
General discussions / Re: What physics engine to use?
« on: April 12, 2013, 07:30:27 pm »
The havoc physics engine has long been a favorite also, I would give that a look.

Pages: 1 2 3 [4] 5 6
anything