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

Pages: [1]
1
General / Transparency Background
« on: November 05, 2010, 08:43:04 pm »
Hello Community,

how can i clear the background transparency.

2
System / Window doesn't open by starting a new Thread
« on: October 20, 2010, 07:17:47 pm »
Hello Com,

when i try to start a new Thread and open a new window the window
doesn't show anything.

Here the source from the thread:

Code: [Select]

void Network(void*)
{
    unsigned int Port = 2435;
    // Ask for server address
    sf::IPAddress ServerAddress;
    do
    {
        ServerAddress = "localhost";
    }
    while (!ServerAddress.IsValid());
    std::cin.ignore(10000, '\n');

    // Create a socket for exchanging data with the server
    sf::SocketTCP Socket;

    // Connect to the server
    if (Socket.Connect(Port, ServerAddress) != sf::Socket::Done)
        return;

    // Send messages until we are disconnected
    bool Connected = true;
    /*
    while (Connected)
    {
        // Let the user write a message
        std::string Message;
        std::cout << "Say something to the server : ";
        std::getline(std::cin, Message);

        // Send it to the server
        sf::Packet Packet;
        Packet << Message;
        Connected = (Socket.Send(Packet) == sf::Socket::Done);
    }
    */

    // Close the socket
    Socket.Close();
}

And now some important main source:

    // Einstellungen laden
    int VideoX = 1024;
    int VideoY = 768;
    sf::Thread NetworkThread(&Network);
    NetworkThread.Launch();
    ifstream LoadConfig("Data\\Config.txt");
    // LoadConfig >> VideoX;
    // LoadConfig >> VideoY;
    // Fenster erstellen
    sf::RenderWindow App(sf::VideoMode(VideoX, VideoY, 32), "Window", sf::Style::Close);

3
General / Get no picture by sing opengl
« on: October 20, 2010, 03:39:54 pm »
Hello Community,

i want to use OpenGL
but when i run this modfied example.

Code: [Select]

#include <SFML/Window.hpp>

int main()
{
    // Fenster erstellen
    sf::Window App(sf::VideoMode(800, 600, 32), "OpenGL");

    glClearDepth(1.f);
    glClearColor(0.f, 0.f, 0.f, 0.f);

    // Z - Buffer
    glEnable(GL_DEPTH_TEST);
    glDepthMask(GL_TRUE);

    // Projektion
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective(90.f, 1.f, 1.f, 500.f);

    // Hauptschleife
    while (App.IsOpened())
    {
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            if (Event.Type == sf::Event::Closed)
            {
                App.Close();
            }
            if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
            {
                App.Close();
            }
            if (Event.Type == sf::Event::Resized)
            {
                glViewport(0, 0, Event.Size.Width, Event.Size.Height);
            }
        }
        App.SetActive();

        // Fenster leeren
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

        glMatrixMode(GL_MODELVIEW);
        glLoadIdentity();
        glTranslatef(0.f, 0.f, -200.f);

        glBegin(GL_POLYGON);
            glVertex3f (0, 0, 0);
            glVertex3f (25, 0, 0);
            glVertex3f (0, 0, 25);
            glVertex3f (25, 0, 25);
        glEnd();

        App.Display();
    }

    return EXIT_SUCCESS;
}

i get no picture only a black screen.

thx for help

4
Network / HTTP Error with a PHP Get String
« on: October 19, 2010, 05:06:10 pm »
Hello Community,

i try to connect to a webpage with sf::Http.

First the webpage Init.php
Code: [Select]

<?php 
$mysql_host  $_GET['Server'&#93;;
$mysql_user  $_GET['Username'&#93;;
$mysql_pass  $_GET['Password'&#93;;
$mysql_db $_GET['Database'&#93;;
@mysql_connect&#40;$mysql_host, $mysql_user, $mysql_pass&#41; OR
die &#40;"Error&#58; MySQL failed"&#41;;
@mysql_select_db&#40;$mysql_db&#41; OR
die &#40;"Error&#58; MySQL failed"&#41;;
echo &#40;"Success"&#41;;
?>



Then the code in my app
Code: [Select]

            sf::Http Http;
            FullPHPAddress = "localhost";
            FullPHPAddress = FullPHPAddress + "\\Init.php?Server=";
            FullPHPAddress = FullPHPAddress + myMySQLAddress.ToString();
            FullPHPAddress = FullPHPAddress + "&Username=";
            FullPHPAddress = FullPHPAddress + myMySQLUsername;
            FullPHPAddress = FullPHPAddress + "&Password=";
            FullPHPAddress = FullPHPAddress + myMySQLPassword;
            FullPHPAddress = FullPHPAddress + "&Database=Database";
            Http.SetHost(FullPHPAddress);
            sf::Http::Request Request;
            Request.SetMethod(sf::Http::Request::Get);
            Request.SetURI("/");
            Request.SetBody("");
            Request.SetHttpVersion(1, 0);
            Request.SetField("From", "ipod.leon@googlemail.com");
            sf::Http::Response Page = Http.SendRequest(Request);
            if (Page.GetStatus() != 200)
            {
                StartErrorIndex += 1;
                StartErrorIndex[StartErrorIndexState] = "Error: PHP failed!\n";
                SystemOK = false;
            }
            if (Page.GetBody() == "Error: MySQL failed")
            {
                StartErrorIndex += 1;
                StartErrorIndex[StartErrorIndexState] = "Error: MySQL failed!\n";
                SystemOK = false;
            }


When i call up the error index i get the PHp failed error!
please can anybody help me. Maybe is there an error in the get string.

Thanks for help!

5
General / ZipLoader
« on: October 07, 2010, 09:46:00 pm »
Hello Community,

i had download ZipLoader. Then i try to compile but i fail whit errors
like undefinded reference to unzClose ...
Somebody say i need to link zlib.a / zlib.lib but were can i get it.

sry about my englisch.

6
General / [C++] sf::RenderWindow
« on: September 24, 2010, 09:15:28 pm »
Hello Community

(I'm really sorry about my English).
I have a problem.
Here is some source code (I think then you now what i mean, i hope).
[CPP]
void Class::SetRenderWindow(sf::RenderWindow &App)
{
this->App = App;
}
// Now i call the Method
Class.SetRenderWindow(App);
[CPP]

Compiler output:

||=== **** Test, Debug ===|
||Info: resolving vtable for sf::Spriteby linking to __imp___ZTVN2sf6SpriteE |
||warning: auto-importing has been activated without --enable-auto-import specified on the command line.|
C:\Projekte\C++\********\.objs\main.o||In function `ZSt38__copy_backward_output_normal_iteratorIPPN2sf5EventES3_ET0_T_S5_S4_12__false_type':|
)]+0x26)||undefined reference to `sf::NonCopyable::operator=(sf::NonCopyable const&)'|
)]+0x26)||undefined reference to `sf::NonCopyable::operator=(sf::NonCopyable const&)'|
||=== Build finished: 2 errors, 1 warnings ===|

I use Code::Blocks and my Compilier is MinGW but i think the error is the overloaded operator =

7
General / cannot find -lsfml-audio.dll
« on: August 14, 2010, 11:56:28 am »
Hello Community,

when im compile a new SFML Project i will get an error,

lg.exe cannot find -lsfml-audio.dll

Im using Code::Blocks.

With the GCC.

Pages: [1]
anything