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

Pages: [1]
1
Window / Re: Nothing being displayed, but images work fine.
« on: June 23, 2012, 02:11:57 am »
They didn't have language specification back with allegro forums or anything, just the lone code tags~ (along with start=1 for line numbers but...) I said that the examples do work for me. It's just this that won't. a is a valid texture
Quote
Loading of images work fine
I was only trying to give the minimal amount of code I could in reference to the problem.

2
Window / Nothing being displayed, but images work fine.
« on: June 23, 2012, 01:47:34 am »
Okay, so I'm making a little engine wrapper type deal that relates to the java slick game library. Loading of images work fine, and everything else and using sfeMovie, the audio plays but no video plays, and no sprites or anything are actually displayed onto the screen when window.display() is called. The way the engine works, a class is derived from the hGame class, containing pure virtual functions (abstract class with the rendering and updating functions to be overwritten.)

Here, the game system (after being given an instance of a derived hGame class in the main function) carries out the loop of the game using the redefined functions. "Window" is a wrapper around RenderWindow (hWindow class)

void hGameSystem::Run(hGame* g)
{
    g->init();

    hInput input;
    hGameSystem sys = (*this);
    sf::Clock Clock;
    Clock.restart();

    while (Running)
    {
        input.GlobalGetInput(Window);

        g->update(sys,input);
        g->render(sys,Window); //Here's the problem I suppose?

        sf::Time Time = Clock.getElapsedTime();

        if (Time.asMilliseconds() < (1000/FPSLimit))
        {
            Sleep((1000/FPSLimit)-Time.asMilliseconds());
        }

        Clock.restart();
    }
    g->cleanup();
}
 

The redefined render function
window->Clear();

    sf::Sprite b(a);
    window->rw->draw(b);

    window->Display();
 

Is there something else I'm not understanding? SFML 2.0, by the way. And there's nothing wrong with the SFML installation itself, as if I run the same video file or any sprite through a barebones main like the sfeMovie example, it works fine.

Edited for language specification? o.o

Pages: [1]