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.


Topics - ansh93

Pages: [1]
1
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 !!

2
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

3
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

4
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]
anything