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 - Christopher Jozwiak

Pages: 1 2 3 [4]
46
Window / Image wont draw...
« on: December 23, 2011, 11:35:54 pm »
No errors, I have my clear set too 0,255,255 and my image is black. Here's the code.

Code: [Select]
// SFMLWindow.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>

int main()
{

sf::RenderWindow Screen(sf::VideoMode(1024, 768, 32), "SFML-Window");

while(Screen.IsOpened())
{
sf::Image image;
if(!image.LoadFromFile("sprite.png"))
return EXIT_FAILURE;

sf::Sprite sprite(image);
Screen.Draw(sprite);
Screen.Clear(sf::Color(0,255,255));
Screen.Display();


sf::Event Event;
while (Screen.GetEvent(Event))
{
if (Event.Type == sf::Event::Closed)
Screen.Close();
}

}


return EXIT_SUCCESS;
}


47
Window / Simple open-window tutorial problem...
« on: December 23, 2011, 06:10:05 pm »
Fixed it, found some other resources (tutorials) and I had my stuff setup wrong. Ill try figuring stuff out before i post something like this again :P

48
Window / Simple open-window tutorial problem...
« on: December 22, 2011, 11:08:25 pm »
I got the window to finally open by adding all the correct things but now, the window opens and flashes abunch of colors and wont let me exit. I added a exit button (ESC key) But I have to force stop it. Any idea's?

Pages: 1 2 3 [4]