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

Pages: 1 [2]
16
General / What minGW version can i use for compiling 1.6 code?
« on: March 16, 2013, 01:45:11 am »
Trying to learn some SFML for the upcoming release in 2.0, so i've been reading in and setting up the 1.6 files on my laptop to play around with. Only problem is i'm getting this error:

Quote
'undefined reference to '_Unwind_Resume'

which means my compiler and the compiler used to compile 1.6 differ. What version(i use code::blocks) should i grab in order to run SFML code? Thanks!

17
General discussions / Using SFML in our 3d graphics engine
« on: February 27, 2013, 07:33:42 pm »
Me and 6-7 others are designing and writing a 3d graphics engine, and we plan on using SFML for handling the window and input. While reading about the 2.0 release i read this:
Quote
Will/does SFML support 3D?

No, and Laurent (SFML's developer) has decided to keep the library as a way to handle 2D graphics with ease and hardware acceleration, so in short there won't be support for 3D in the future either. However you can use Irrlicht with SFML as a window creator. You could also use raw OpenGL to implement 3D and have it alongside your 2D rendering in SFML without problems.

This worries me a bit, what does this mean by no 3d handling support? Is this for SFML's internal graphics, as in it shouldn't be a problem since we are writing completely in OpenGL 3.3. Or is this directly related to SFML's ability to render 3d objects to the screen? Thanks for any help!

18
Graphics / DisplayingSprites using classes(tutorial help)
« on: April 12, 2012, 09:41:37 pm »
I've been learning sfml lately and im trying to create just really simple games and applications to help learn. I saw on the sprite tutorial that puting the image and sprite into a class is much better programming and habit s. Here is the code:

UPDATED:
Code: [Select]
#ifndef TANK_H
#define TANK_H
#include <SFML/Graphics.hpp>

class Tank
{
    public:
        Tank(const Tank& Copy);
        bool LoadFile(const std::string ImageFile);
    protected:
    private:
        static sf::Image Image;
        sf::Sprite Tank1;
};

#endif // TANK_H


Code: [Select]
#include "Tank.h"
#include <iostream>
#include <SFML/Graphics.hpp>
Tank::Tank(const Tank& Copy):
Image(Copy.Image),
Tank1(Copy.Tank1)
{
    Tank1.SetImage(Image);
}

bool Tank::LoadFile(const std::string ImageFile)
{
    if(!Image.LoadFromFile(ImageFile))
    {
        return 1;
    }
    return 0;
}



But how would i go about loading an image and sprite into the class? I want to make a Tank object that holds the image i could display in the main loop, here is my guess:
main.cpp
Code: [Select]
#include <iostream>
#include "Tank.h"
#include <SFML/Graphics.hpp>


int main()
{
   sf::RenderWindow Window(sf::VideoMode(800,600,32), "TANKWARS");
   Tank Playerone(/* ??? */); //im still confused on how to declare this!
   if(!Playerone.LoadFile("Tank.tga"))
   {
       return EXIT_FAILURE;
   }
}


19
General / Displaying Integers?
« on: March 15, 2012, 08:09:41 pm »
I've wanted to get out of the console in C++ for awhile now, and im trying to learn SFML. The problem is that the tutorials on this site are extremely limited and teach very litte. If i wanted to say, convert a normal console application that asks users to enter 2 numbers on the screen and displays the sum, how would i go about doing that? Also, if someone to link me an actual tutorial series for SFML i would be very grateful!

20
General discussions / What project do i create?
« on: March 07, 2012, 01:42:12 am »
Im lost, if i want to create a simple window in SFML, do i use a console project? or a SFML project? or what?! I use code blocks currently and have had a hellish day trying to install SFML to work properly, im constantly getting errors with the SFML project wizard in code blocks and the only answer ive been able to get was to stop using the wizard... So what project do i use? Will console work? Heres the extremely simple code i cant get to work(using a console project atm).
Code: [Select]
#include <SFML/Graphics.hpp>
#include <SFML/Window.hpp>

int main(int argc, char** argv)
{
    bool running = true;
   sf::Window App(sf::VideoMode(1200, 600, 32), "SFML WINDOW");
   while(running)
   {
       App.Display();
   }
   return EXIT_SUCCESS;
}

21
Audio / Cannot find -lsfml-audio.dll
« on: March 06, 2012, 08:30:47 pm »
Cant seem to get SFML to work, im using Codeblocks compiler for C++.
I created a new SFML project using the wizard and was provided the following code(simple window).
Code: [Select]
#include <SFML/Graphics.hpp>

int main()
{
    // Create the main window
    sf::RenderWindow App(sf::VideoMode(800, 600), "SFML window");

    // Load a sprite to display
    sf::Image Image;
    if (!Image.LoadFromFile("cb.bmp"))
        return EXIT_FAILURE;
    sf::Sprite Sprite(Image);

// Start the game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();
        }

        // Clear screen
        App.Clear();

        // Draw the sprite
        App.Draw(Sprite);

        // Update the window
        App.Display();
    }

    return EXIT_SUCCESS;
}
but upon running i get the error:
Code: [Select]
||=== Tester, Debug ===|
ld.exe||cannot find -lsfml-audio.dll|
||=== Build finished: 1 errors, 0 warnings ===|

Im not sure why though, because i clearly see the audio.dll file in the folder, and have the correct links. Any suggestions?

Pages: 1 [2]
anything