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

Pages: [1]
1
Graphics / Re: sf::vertexarray to make circles
« on: November 16, 2014, 09:41:53 am »
It's good that you got the vertex array working to make the circle as you wanted but, since you're only using it for "debugging" (assuming something like showing position feedback visually), you may way to look at what eXpl0it3r was talking about. CircleShapes can be much quicker and easier to set up than vertex arrays and they can easily draw rings (circle outlines with no fill).

Yup right, thats what my debug draw does, it just shows the collision boxes of all the objects.
I know sf::CircleShape method already, but I dont want to do it that way thats why I specifically for how to do them with vertex arrays.

2
Graphics / Re: sf::vertexarray to make circles
« on: November 15, 2014, 12:27:56 pm »
Cool I got the circle made up using the above method
Thanks  :D

3
Graphics / Re: sf::vertexarray to make circles
« on: November 15, 2014, 12:00:07 pm »
What about reading the whole question before replying ?
I said I want to create circle using vertex array, not using sf::CircleShape

4
Graphics / sf::vertexarray to make circles
« on: November 15, 2014, 11:45:54 am »
I want to make circle using vertex arrays, how can I do that ?

I only want to be able to see the outline of the circle, I dont want a circle filled with a color, cuz I want to use it for debug drawing.
Help !!

5
Graphics / Re: sf::Transform.Translate not moving the object
« on: November 10, 2014, 06:59:39 am »
position matrix is sf::Transform, I guess that explains everything !!

6
Graphics / sf::Transform.Translate not moving the object
« on: November 10, 2014, 02:55:10 am »
I have created my own function for translate as

void Transform::Translate(sf::Vector2f deltaPosition)
        {
                Position.x+=deltaPosition.x;
                Position.y+=deltaPosition.y;
                positionMatrix.translate(deltaPosition);
        }

but it doesnt work at time
From my physics class if I call this as
gravity = sf::vector2f(10,0)
transform->Translate(gravity)
it works
but if I call it as
position = gravity/mass*dt*dt;
transform->Translate(position);
it doesnt works
Any idea where I might be wrong ?
I have checked the values for delta position and I am getting proper values in there
but still the object is not moving

7
General / Re: Unhandled exception on window creation
« on: November 03, 2012, 07:29:31 am »
yah i already saw the debugger
it crashes at the line for window creation

8
General / Unhandled exception on window creation
« on: November 02, 2012, 09:06:52 pm »
#include <SFML\Graphics.hpp>
#include <SFML\System.hpp>
#include <SFML\Window.hpp>
#include <iostream>

using namespace std;

int main()
{
        int x=0,y=0;

        sf::VideoMode myMode(640,480,32);
        sf::RenderWindow myWindow(myMode,"board test");

        sf::Texture myTexture;
        if(!myTexture.loadFromFile("C:\\Users\\Voldy\\Documents\\Blue Tile.png"))
        {
                cout << " Could not load image" << endl ;
                return 0;
        }
        sf::Sprite mySprite(myTexture);
        sf::Event event;

        while (myWindow.isOpen())
        {
                while (myWindow.pollEvent(event))
                {
                        if(event.type == sf::Event::Closed || event.key.code == sf::Keyboard::Escape)
                        {
                                myWindow.close();
                        }
                        sf::IntRect myRect(x,y,32,32);
                        mySprite.setTextureRect(myRect);
                        myWindow.clear();
                        myWindow.draw(mySprite);
                        myWindow.display();
                }
        }


}

This is the code i am trying to run everything works fine
but when I try to run it i get an error saying "Unhandled exception at 0x75a6f7cc in board render tes.exe: 0xC0000005: Access violation reading location 0x65742064.".
previously i was able to run the projects of sfml
no such error occurred.
now also i use the old projects and just write the code in them and works perfectly fine but if i make any new project i get this error.
please help me to solve this error

9
General / Re: the application was unable to start correctly
« on: September 08, 2012, 08:08:02 pm »
now i have changed everything for SFML 2

now i am getting these errors
1>main.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
1>main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)
1>C:\Users\Voldy\Documents\Visual Studio 2010\Projects\sfml\Debug\sfml.exe : fatal error LNK1120: 2 unresolved externals

10
General / the application was unable to start correctly
« on: September 08, 2012, 06:42:07 pm »
#include <SFML/System.hpp>
#include <iostream>

using namespace sf;
using namespace std;

int main()
{
        float f=0.5;
    Clock Clock;
    while (Clock.GetElapsedTime() < 5.f)
    {
        std::cout << Clock.GetElapsedTime() << std::endl;
        Sleep(f);
    }

    return 0;
}

this is the code I am using and i am getting a runtime error
"The application was unable to start correctly (0x0150002),Click Ok to close the application."

I have copied all the dll's properly. As well as included sfml-windows-d.lib, sfml-system-d.lib.
system is "/SUBSYSTEM:CONSOLE"
installed all the redistribute packages required.
Now can some please help me with the problem.
I am using Visual studio 2010 ultimate
and windows 7 64 bit architecture.
And also i am using version 1.6 of sfml

Pages: [1]