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

Pages: [1]
1
Graphics / Re: SFML prob
« on: July 16, 2012, 09:13:31 pm »
Code: [Select]
Don't be sad, it's supposed to blink and disappear :Pdont scare me maaaan :P

i compiled code, n same thing again....no errors in console, n window blinks n disappears :(

EDIT: i came accross one of simplest tuts for sfml on http://sfmlcoder.wordpress.com/2011/05/20/a-minimal-sfml-program/

n i copy/paste code tht has been used in tutorial...n it works :).....now i dont get why this works, n other dont wanna work :'(

2
Graphics / Re: SFML prob
« on: July 16, 2012, 02:10:41 pm »
console shows no error, but screen again just blinks n disappears :(

3
Graphics / Re: SFML prob
« on: July 15, 2012, 09:50:29 pm »
Code: [Select]
So there is no error message on the console?
same error as before...sorry i forgot to mention it in rpevious post :(

4
Graphics / Re: SFML prob
« on: July 15, 2012, 09:07:34 pm »
yes, my drivers are up to date...i also work with irrlicht...i have no probs with it, just wanted to give a shot with SFML..i hope i will find some solution :(

5
Graphics / Re: SFML prob
« on: July 15, 2012, 08:24:42 pm »
graphic card: Intel 82485G
SFML version 2- RC

#include <SFML/Graphics.hpp>

int main() {
        sf::RenderWindow window( sf::VideoMode( 800, 600 ), "Test Window" );
        window.draw( sf::Text( L"Hello World!" ) );
        window.display();
        return 0;
}

n when i compile this, window just blinks n disappear :(

6
Graphics / Re: SFML prob
« on: July 15, 2012, 07:03:19 pm »
OS: WinXP SP3
compiler: gcc with mingw (4.6.2)

i can compile it too, without any errors, just when i run it, screen is black, without anythin written on it (i mean on "Hello World")..n in cmd window errors mentioned above :(...i dont kno whts wrong

7
Graphics / SFML prob
« on: July 15, 2012, 05:05:15 pm »
hello guys...this is my first post here on forums :)

im workin on game project, n im tryin to make window with "Hello Word", but i get error

Code: [Select]
An internal OpenGL call failed in Texture.cpp (327) : GL_INVALID_VALUE , a numeric argument
is out of range
here is the code, it doesn't show any compiler errors.

#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>
#include <iostream>
#include <stdio.h>

int main() {
        sf::RenderWindow window(sf::VideoMode(800, 600), "Test Window", sf::Style::Titlebar, sf::ContextSettings(32));
        window.setFramerateLimit(60);
        glEnable(GL_DEPTH_TEST);
        glDepthMask(GL_TRUE);
        glMatrixMode(GL_PROJECTION);
        glLoadIdentity();
        gluPerspective(90.f, 1.f, 1.f, 500.f);
        sf::Event event;
        while (window.isOpen()) {
                while (window.pollEvent(event)) {
                        if (event.type == sf::Event::Closed)
                                window.close();
                        if ((event.type == sf::Event::KeyPressed) && (event.key.code == sf::Keyboard::Escape))
                                window.close();
                        if (event.type == sf::Event::Resized)
                                glViewport(0, 0, event.size.width, event.size.height);
                }
                window.setActive();
                glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
                float x =  sf::Mouse::getPosition(window).x * 200.f / window.getSize().x  - 100.f;
                float y = -sf::Mouse::getPosition(window).y * 200.f / window.getSize().y + 100.f;

                glMatrixMode(GL_MODELVIEW);
                glLoadIdentity();

                window.pushGLStates();
                sf::Text text(L"Hello World!");
                text.setPosition(250.f, 450.f);
                text.setColor(sf::Color(255, 255, 255, 128));
                window.draw(text);
                window.popGLStates();

                window.display();
        }
        return EXIT_SUCCESS;
}

hope someone can help me .... thanks in advance :)

Pages: [1]