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 - dabbertorres

Pages: 1 ... 21 22 [23] 24 25 ... 34
331
General / Re: Problem with cursor and screen artifacts
« on: April 12, 2015, 07:56:36 pm »
First and foremost: Create a complete and minimal example that demonstrates the problem. (Code that someone can copy, paste, and compile without changes to test)

Second: I don't see "some black circle" around the cursor in your video.

332
System / Re: Xbox 360 controller left and right triggers
« on: April 09, 2015, 09:22:34 am »
iirc, they are Axes.

333
Graphics / Re: Random graphics glitch
« on: April 07, 2015, 08:23:20 pm »
There are no proprietary Intel graphics drivers for Linux, just fyi. Intel published their graphics driver code as open source.

Mesa IS the Intel 3D graphics driver on Linux.

What is your kernel version (run: "uname -v")? Some googling for "intel_do_flush_locked failed: Invalid argument" found this kernel bug report. Looks like a patch made it into kernel 3.18.4 from here.

334
Window / Re: Qt and SFML Window
« on: April 07, 2015, 06:03:01 am »
I don't have experience with Qt, but, do you have control of the main function? If so, I'd put the window code in it. All Open_Window should do is create the window. So it's going to need access to a sf::Window variable (by pointer, reference, or the sf::Window variable being a member of this Widget).

Something like:
int main(int argc, char** argv)
{
    // stuff
   
    while(window.isOpen())
    {
        // stuff
    }

    // stuff
}

void Widget::Open_Window()
{
    window.create({800, 600}, "My Window");
}
 

That way, the window will only be ran/updated/etc when it's open, while still letting everything else run normally. And the window should be recreated on every button press.

If you don't have control of main... I guess you could look into multi-threading, but I don't really recommend that.

335
Window / Re: Qt and SFML Window
« on: April 06, 2015, 10:51:18 pm »
We can only guess since you aren't providing any code so we can see what exactly you're doing.

336
I don't see you ever giving a value to PlayerSpeed. It's value is probably going to be quite large, moving your circle by a large amount, out of the window.

337
DotNet / Re: (Help) User draw/paint pixels by pixels?
« on: March 30, 2015, 11:18:11 pm »
while MouseDown, update every second (or half a second while mouse down)

??

No wonder you're only getting some pixels. What if the user moves the mouse really fast? You would miss a lot of pixels.

For drawing a line, I would:
store the start position on MouseDown.
then
store the end position on MouseUp.

Then calculate the pixels in between:
using Bresenham's Line Algorithm,
or
use a sf::RectangleShape of width 1, using it's functions getPointCount() and getPoint() to get all the points.

Personally (assuming you're going to want to save these creations), I would have an sf::Image, and use it's setPixel() function for drawing.
Then update the sf::Texture from that.

338
General / Re: Save to Image not working?
« on: March 22, 2015, 02:17:44 am »
If you want a sf::RenderTexture to display the stuff you have drawn to it, you need to at least call display.

339
General / Re: Save to Image not working?
« on: March 22, 2015, 01:29:45 am »
You're forgetting sf::RenderTexture::clear() and sf::RenderTexture::display().

They're very similar to a sf::RenderWindow.

340
General / Re: cant run SFML on Code::Blocks
« on: March 10, 2015, 03:12:04 am »
Looks like you need to get rid of the "-s" on all the libraries for the linker command.

Notice the sfml libraries filenames don't have it.

341
General / Re: cant run SFML on Code::Blocks
« on: March 10, 2015, 01:29:42 am »
What are the filenames of the libraries in C:\SFML-2.2\lib?

342
General / Re: cant run SFML on Code::Blocks
« on: March 09, 2015, 09:24:34 pm »
What's the command you're using to compile?

If I remember the naming scheme for Windows correctly, I think the libraries all have a "-2" on the end of the lib name.

So, for ex:
sfml-window-2

343
General / Re: How to react to a collision (wall-sliding)?
« on: February 24, 2015, 07:55:02 am »
Well I'd just set it to 0. Or let it bounce back. It can just calculate the collision again, right?

344
General / Re: How to react to a collision (wall-sliding)?
« on: February 24, 2015, 04:30:25 am »
The idea of the SAT is to create a list of axes to test on. Generally, an axis per side of each shape.

"an axis" refers to one of the generated axes.

You should generally pick the axis with the smallest projected overlap, because that is the shortest distance which you have to move the two shapes to "solve" the collision.

345
General / Re: How to react to a collision (wall-sliding)?
« on: February 24, 2015, 01:46:15 am »
If you read further, it goes into that.

To calculate an overlap, you project both shapes onto an axis. Then, it's a simple subtraction problem.
https://github.com/dabbertorres/Swift2/blob/master/src/Collision/Projection.hpp#L42

He says "really large number" since, to calculate a min, you need a starting point. So, picking a "really large number" guarantees that your calculated overlaps will be smaller than it. (Well, *should* be).

Pages: 1 ... 21 22 [23] 24 25 ... 34