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

Pages: [1]
1
Hi eXpl0it3r,

What extra information should I give about this issue?

I don't have the compiler working in that computer since it is a family PC. It's an intel core 2 duo with the default gpu (express chipset family). I sent the app to a friend and runs perfectly.

I'm really sorry for my bad english, please tell me if I do grammatical and orthographic errors.

Greetings!

2
Graphics / Problems with repeated textures in a big rectangle shape
« on: March 19, 2015, 12:47:05 am »
Hello mates,

I'm using SFML to make a basic platformer game, so I can learn some concepts of the library. I run my application I get something beautiful, just look at 1.png (in attached files). When I move the app. to another PC, it doesn't run as well as it run in my laptop (2.png)

I'm trying to see where is my error, or how can I solve this... I think, there are driver problems in the PC... But that's only a conjeture... I hope you guys can give me a hand of help here...

Here is a part of my code:

// main.cpp
#include <iostream>
#include <Box2D/Box2D.h>
#include <SFML/Graphics.hpp>
..

int main() {
......
       
        std::vector<Block> bloques;
        // Este vector de bloques va a contener plataformas y objetos
        sf::Texture grass;
        grass.loadFromFile("grass.png");
        grass.setRepeated(true);
        grass.setSmooth(true);

        bloques.push_back(Block(world, 3000.0f, 50.0f, sf::Vector2f(-200, height - 50.0f), .5f, false, 0, 0, &grass));
        //Esto es un suelo!


        sf::Texture bricks;
        bricks.loadFromFile("bricks.jpg");
        bricks.setRepeated(true);
        bricks.setSmooth(true);

        bloques.push_back(Block(world, 400.0f, 49.0f, sf::Vector2f(300, 300), .5f, false, .5f, 0, &bricks));
        bloques.push_back(Block(world, 400.0f, 49.0f, sf::Vector2f(850, 100), .5f, false, .5f, 0, &bricks));
        // Inicializamos algunas plataformas

        //Agregamos un objeto dinamico...
        sf::Texture box;
        box.loadFromFile("box.png");
        box.setSmooth(true);
        bloques.push_back(Block(world, 100.0f, 100.0f, sf::Vector2f(450, 150), .5f, true, .5f,  0.0f, &box));


        // Game loop
        while (App.isOpen())
        {

.....
                App.clear();
.....

                // Dibuja objetos
                for (int i = 0; i < int(bloques.size()); i++)
                {
                        App.draw( bloques[i].GetShape() );
                }

......
                App.display();

 ......

        }



        return 0;
}

 


And this is the block.cpp (only the constructor and getShape())
Block::Block(b2World *world, float width, float height, sf::Vector2f position, float mu, bool dynamic, float density, float e, sf::Texture *t)
{

        rectangle = sf::RectangleShape( sf::Vector2f(width, height) );
        rectangle.setPosition(position);
        rectangle.setTexture(t);
        rectangle.setTextureRect(sf::IntRect(0, 0, width, height));


        ........


}

sf::Shape & Block::GetShape()
{
        return rectangle;
}

 

The variable "rectangle" is a part of the class "Block". Thanks in advance!

Greetings!

3
Hello colleague, thanks for support.

Yes. My drivers were not up to date. I had to install all the drivers needed!

Greetings! 8)

PD: I've been using the SFML last days, I'll show what I've done, I had some issues too. I guess dirvers problems again. I'll open a new post

Thanks again

4
General / Failed to share Open Gl context problem in the first sample
« on: February 23, 2015, 02:59:14 am »
Hello everybody,

Today I just downloaded SFML and started to program some basic things. I followed very carefully the steps to get SFML into MingW+Code::Blocks but I've got this issue: when I open the sample given in the installation tutorial I get a "Failed to share Open Gl context" in the cmd window.

I asked to google but I don't find anything. No, the message appears when I run the executable, not when I close a window. Moreover, I'm just opening a window and drawing a circle.

The code is here http://www.sfml-dev.org/tutorials/2.2/start-cb.php

PD: I can draw some basic shapes as circles and rectangles also I can move them over the window with no problem, except the one I mentioned above.

Do you have any idea of what is happening? Can this issue make more problems in the future?

Maybe I need to create the project as OpenGL project or add a dll in the executable folder?

I would appreciate any help, really.

Greetings!

Pages: [1]