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

Pages: [1]
1
Graphics / [SOLVED] OpenGL oddness
« on: January 26, 2022, 12:54:52 am »
The below code results in a greyscale grid of spheres rather than the ywllow spheres I expected to see. If I uncomment the lines:

 
  //sf::Text testtext;
  //testtext.setString("HELLO OPENGL");
 

Then the spheres turn yellow. but something is still off about the depth testing. The spheres on the left side of the window look correct but the ones on the right side are being rendered in the wrong order.

Anyone see what mistake(s) I am making?

#include <SFML/Graphics.hpp>
#include <math.h>

#include <GL/gl.h>
#include <GL/glu.h>
#include <GL/glut.h>

int main(int argc, char **argv) {
  sf::RenderWindow window( sf::VideoMode(800,600,32), "SFML + OpenGL" );
  glutInit(&argc, argv);
  glutInitDisplayMode(GLUT_DEPTH | GLUT_DOUBLE | GLUT_RGBA);
  glEnable(GL_DEPTH_TEST);
  GLfloat lightpos[] = { 55.0, 55.0, -55.0 };
  GLfloat lightcolor[] = { 1.0, 1.0, 0.0 };
  GLfloat ambcolor[] = { 0.0, 0.0, 1.0 };
  glEnable(GL_LIGHTING);
  glLightModelfv(GL_LIGHT_MODEL_AMBIENT,ambcolor);
  glEnable(GL_LIGHT0);
  glLightfv(GL_LIGHT0,GL_POSITION,lightpos);
  glLightfv(GL_LIGHT0,GL_AMBIENT,lightcolor);
  glLightfv(GL_LIGHT0,GL_DIFFUSE,lightcolor);
  glLightfv(GL_LIGHT0,GL_SPECULAR,lightcolor);

  //sf::Text testtext;
  //testtext.setString("HELLO OPENGL");

  while( window.isOpen() )
  {
    sf::Event event;
    while( window.pollEvent( event ) )
    {
      if( event.type==sf::Event::Closed )
        window.close();
    }
    window.setActive();

    glClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT );
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective(50.0, 1.0, 1.0, 70.0);
    glMatrixMode(GL_MODELVIEW);
    glLoadIdentity();
    gluLookAt( 0.0, 1.0, 5.0,
               0.0, 1.0, 4.0,
               0.0, 1.0, 0.0);

    //draw the spheres
    glColor3f(0.4f, 0.4f, 0.4f);
    int h = 10;
    for( int i = -h ; i <= h ; i++ )
    {
      for( int j = -h ; j <= h ; j++ )
      {
        glPushMatrix();
        glTranslatef(i*.4,.2,j*.4);
        glutSolidSphere(.1,30,30);
        glPopMatrix();
      }
    }

    window.display();
  }
  return 1;
}

 

2
General / [solved] All rust examples fail to run
« on: May 16, 2017, 08:08:50 pm »
I am very new to rust so I may just be doing this wrong but here is my setup:

Up to date 64 bit archlinux
rustc 1.17.0 (56124baa9 2017-04-24)
csfml 2.4-1
on commit 2e94805761c8293a4942a87cb6a3944fed0302b9 of rust-sfml
I try to run an example and I see the following:
Code: [Select]
$ cargo run --example mouse
    Finished dev [unoptimized + debuginfo] target(s) in 0.0 secs
     Running `/home/ed/program/rust/rust-sfml/target/debug/examples/mouse`
X Error of failed request:  BadValue (integer parameter out of range for operation)
  Major opcode of failed request:  154 (GLX)
  Minor opcode of failed request:  3 (X_GLXCreateContext)
  Value in failed request:  0x0
  Serial number of failed request:  38
  Current serial number in output stream:  39

Suggestions?

3
I am using a modified version of the opengl.cpp example file.  I am now able (due to some previous help from Laurent) to bind an sfml texture directly to an OpenGL object.  I am trying to bind a very simple RenderTexture to a OpenGL cube using getTexture().  Eventually I intend to draw sprites to the texture but for now all I am doing is clearing it with red.  The result is that the cube is invisible.  Can someone please tell me what I am doing wrong?

////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create the main window
    sf::RenderWindow window(sf::VideoMode(800, 600), "SFML OpenGL", sf::Style::Default, sf::ContextSettings(32));
    window.setVerticalSyncEnabled(true);

    sf::RenderTexture texture;
    texture.create(500, 500);
    texture.clear(sf::Color::Red);
    sf::Texture::bind( & texture.getTexture() );

    // Enable Z-buffer read and write
    glEnable(GL_TEXTURE_2D);
    glEnable(GL_DEPTH_TEST);
    glDepthMask(GL_TRUE);
    glClearDepth(1.f);

    // Setup a perspective projection
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective(90.f, 1.f, 1.f, 500.f);

    // Create a clock for measuring the time elapsed
    sf::Clock clock;

    // Start game loop
    while (window.isOpen())
    {
        // Process events
        sf::Event event;
        while (window.pollEvent(event))
        {
            // Close window : exit
            if (event.type == sf::Event::Closed)
                window.close();

            // Escape key : exit
            if ((event.type == sf::Event::KeyPressed) && (event.key.code == sf::Keyboard::Escape))
                window.close();

            // Adjust the viewport when the window is resized
            if (event.type == sf::Event::Resized)
                glViewport(0, 0, event.size.width, event.size.height);
        }

        // Activate the window before using OpenGL commands.
        // This is useless here because we have only one window which is
        // always the active one, but don't forget it if you use multiple windows
        window.setActive();

        // Clear the depth buffer
        glClear(GL_DEPTH_BUFFER_BIT);
        window.clear(sf::Color::Black);
        texture.clear(sf::Color::Red);

        //sf::Texture * t1;
        //t1.loadFromFile( "./resources/1.png" );
        //t1 = texture.getTexture();
        sf::Texture::bind( & texture.getTexture() );

        float x = 0;
        float y = 0;

        // Apply some transformations
        glMatrixMode(GL_MODELVIEW);
        glLoadIdentity();
        glTranslatef(x, y, -100.f);
        glRotatef(clock.getElapsedTime().asSeconds() * 50.f, 1.f, 0.f, 0.f);
        glRotatef(clock.getElapsedTime().asSeconds() * 30.f, 0.f, 1.f, 0.f);
        glRotatef(clock.getElapsedTime().asSeconds() * 90.f, 0.f, 0.f, 1.f);

        // Draw a cube
        float size = 20.f;
        glBegin(GL_QUADS);

            glTexCoord2f(0, 0); glVertex3f(-size, -size, -size);
            glTexCoord2f(0, 1); glVertex3f(-size,  size, -size);
            glTexCoord2f(1, 1); glVertex3f( size,  size, -size);
            glTexCoord2f(1, 0); glVertex3f( size, -size, -size);

            glTexCoord2f(0, 0); glVertex3f(-size, -size, size);
            glTexCoord2f(0, 1); glVertex3f(-size,  size, size);
            glTexCoord2f(1, 1); glVertex3f( size,  size, size);
            glTexCoord2f(1, 0); glVertex3f( size, -size, size);

            glTexCoord2f(0, 0); glVertex3f(-size, -size, -size);
            glTexCoord2f(0, 1); glVertex3f(-size,  size, -size);
            glTexCoord2f(1, 1); glVertex3f(-size,  size,  size);
            glTexCoord2f(1, 0); glVertex3f(-size, -size,  size);

            glTexCoord2f(0, 0); glVertex3f(size, -size, -size);
            glTexCoord2f(0, 1); glVertex3f(size,  size, -size);
            glTexCoord2f(1, 1); glVertex3f(size,  size,  size);
            glTexCoord2f(1, 0); glVertex3f(size, -size,  size);

            glTexCoord2f(0, 1); glVertex3f(-size, -size,  size);
            glTexCoord2f(0, 0); glVertex3f(-size, -size, -size);
            glTexCoord2f(1, 0); glVertex3f( size, -size, -size);
            glTexCoord2f(1, 1); glVertex3f( size, -size,  size);

            glTexCoord2f(0, 1); glVertex3f(-size, size,  size);
            glTexCoord2f(0, 0); glVertex3f(-size, size, -size);
            glTexCoord2f(1, 0); glVertex3f( size, size, -size);
            glTexCoord2f(1, 1); glVertex3f( size, size,  size);

        glEnd();

        // Finally, display the rendered frame on screen
        window.display();
    }

    return EXIT_SUCCESS;
}
 

4
Graphics / [SOLVED] Binding sfml texture to OpenGL object in SFML 2
« on: June 24, 2013, 02:11:12 am »
I tried to edit the opengl.cpp example file to bind an sfml texture to the spinning cube rather than using a GLUint.  The file even says "We could directly use a sf::Texture as an OpenGL texture (with its Bind() member function)" but I have not been able to do so.  The result is a spinning white cube.  Can someone tell me what I am missing please?

////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>


////////////////////////////////////////////////////////////
/// Entry point of application
///
/// \return Application exit code
///
////////////////////////////////////////////////////////////
int main()
{
    // Create the main window
    sf::RenderWindow window(sf::VideoMode(800, 600), "SFML OpenGL", sf::Style::Default, sf::ContextSettings(32));
    window.setVerticalSyncEnabled(true);

    // Load an OpenGL texture.
    // We could directly use a sf::Texture as an OpenGL texture (with its Bind() member function),
    // but here we want more control on it (generate mipmaps, ...) so we create a new one from an image
    //GLuint texture = 0;
    //{
    //    sf::Image image;
    //    if (!image.loadFromFile("resources/texture.jpg"))
    //        return EXIT_FAILURE;
    //    glGenTextures(1, &texture);
    //    glBindTexture(GL_TEXTURE_2D, texture);
    //    gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, image.getSize().x, image.getSize().y, GL_RGBA, GL_UNSIGNED_BYTE, image.getPixelsPtr());
    //    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
    //    glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR_MIPMAP_LINEAR);
    //}

    sf::Texture t1;
    t1.loadFromFile( "./resources/1.png" );
    sf::Texture::bind( &t1 );

    // Enable Z-buffer read and write
    glEnable(GL_DEPTH_TEST);
    glDepthMask(GL_TRUE);
    glClearDepth(1.f);

    // Setup a perspective projection
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective(90.f, 1.f, 1.f, 500.f);

    // Create a clock for measuring the time elapsed
    sf::Clock clock;

    // Start game loop
    while (window.isOpen())
    {
        // Process events
        sf::Event event;
        while (window.pollEvent(event))
        {
            // Close window : exit
            if (event.type == sf::Event::Closed)
                window.close();

            // Escape key : exit
            if ((event.type == sf::Event::KeyPressed) && (event.key.code == sf::Keyboard::Escape))
                window.close();

            // Adjust the viewport when the window is resized
            if (event.type == sf::Event::Resized)
                glViewport(0, 0, event.size.width, event.size.height);
        }

        // Activate the window before using OpenGL commands.
        // This is useless here because we have only one window which is
        // always the active one, but don't forget it if you use multiple windows
        window.setActive();

        // Clear the depth buffer
        glClear(GL_DEPTH_BUFFER_BIT);
        window.clear(sf::Color::Black);

        float x = 0;
        float y = 0;

        // Apply some transformations
        glMatrixMode(GL_MODELVIEW);
        glLoadIdentity();
        glTranslatef(x, y, -100.f);
        glRotatef(clock.getElapsedTime().asSeconds() * 50.f, 1.f, 0.f, 0.f);
        glRotatef(clock.getElapsedTime().asSeconds() * 30.f, 0.f, 1.f, 0.f);
        glRotatef(clock.getElapsedTime().asSeconds() * 90.f, 0.f, 0.f, 1.f);

        // Draw a cube
        float size = 20.f;
        glBegin(GL_QUADS);

            glTexCoord2f(0, 0); glVertex3f(-size, -size, -size);
            glTexCoord2f(0, 1); glVertex3f(-size,  size, -size);
            glTexCoord2f(1, 1); glVertex3f( size,  size, -size);
            glTexCoord2f(1, 0); glVertex3f( size, -size, -size);

            glTexCoord2f(0, 0); glVertex3f(-size, -size, size);
            glTexCoord2f(0, 1); glVertex3f(-size,  size, size);
            glTexCoord2f(1, 1); glVertex3f( size,  size, size);
            glTexCoord2f(1, 0); glVertex3f( size, -size, size);

            glTexCoord2f(0, 0); glVertex3f(-size, -size, -size);
            glTexCoord2f(0, 1); glVertex3f(-size,  size, -size);
            glTexCoord2f(1, 1); glVertex3f(-size,  size,  size);
            glTexCoord2f(1, 0); glVertex3f(-size, -size,  size);

            glTexCoord2f(0, 0); glVertex3f(size, -size, -size);
            glTexCoord2f(0, 1); glVertex3f(size,  size, -size);
            glTexCoord2f(1, 1); glVertex3f(size,  size,  size);
            glTexCoord2f(1, 0); glVertex3f(size, -size,  size);

            glTexCoord2f(0, 1); glVertex3f(-size, -size,  size);
            glTexCoord2f(0, 0); glVertex3f(-size, -size, -size);
            glTexCoord2f(1, 0); glVertex3f( size, -size, -size);
            glTexCoord2f(1, 1); glVertex3f( size, -size,  size);

            glTexCoord2f(0, 1); glVertex3f(-size, size,  size);
            glTexCoord2f(0, 0); glVertex3f(-size, size, -size);
            glTexCoord2f(1, 0); glVertex3f( size, size, -size);
            glTexCoord2f(1, 1); glVertex3f( size, size,  size);

        glEnd();

        // Finally, display the rendered frame on screen
        window.display();
    }

    return EXIT_SUCCESS;
}
 

5
Graphics / [Solved]textured cube
« on: January 29, 2012, 05:43:31 am »
I am trying to create a cube based on the "Using OpenGL" tutorial. I am using sfml 2.0. The problem is the cube shows up as plain white no matter if I bind the texture or not. I am not an expert on OpenGL so I am geussing that I am making a silly mistake. I found another post at http://www.sfml-dev.org/forum/viewtopic.php?t=2041&sid=1397d9c455d32225fdcdc4bed5542c29 that says I need to set the texture coordinates for each quad which I think I am doing correctly. Any suggestions would be greatly appreciated!

Code: [Select]

#include <SFML/Window.hpp>
#include <SFML/Graphics.hpp>
#include <SFML/OpenGL.hpp>
#include <iostream>

using namespace std;
int main()
{
    sf::Window App(sf::VideoMode(800, 600, 32), "SFML OpenGL");
    sf::Clock Clock;
    glClearDepth(1.f);
    glClearColor(0.f, 0.f, 0.f, 0.f);
    sf::Texture Texture;
    if( Texture.LoadFromFile( "test.png" ) )
    {
      cout << "image loaded!" << endl;
    }
    else
    {
      cout << "image not found!" << endl;
    }
    glEnable(GL_DEPTH_TEST);
    glDepthMask(GL_TRUE);
    glMatrixMode(GL_PROJECTION);
    glLoadIdentity();
    gluPerspective(90.f, 1.f, 1.f, 500.f);
    double seconds = 0;
    while (App.IsOpened())
    {
        sf::Event Event;
        while (App.PollEvent(Event))
        {
            if (Event.Type == sf::Event::Closed)
                App.Close();
            if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Keyboard::Escape))
                App.Close();
            if (Event.Type == sf::Event::Resized)
                glViewport(0, 0, Event.Size.Width, Event.Size.Height);
        }
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
        glMatrixMode(GL_MODELVIEW);
        glLoadIdentity();
        glTranslatef(0.f, 0.f, -200.f);
        seconds = Clock.GetElapsedTime() / 1000.0;
        glRotatef( seconds * 50 , 1.f, 0.f, 0.f);
        glRotatef( seconds * 30 , 0.f, 1.f, 0.f);
        glRotatef( seconds * 90 , 0.f, 0.f, 1.f);
        //Uncommenting the next line does not affect the cube at all
        //Texture.Bind();

        glBegin(GL_QUADS);
        glTexCoord2f(0, 0); glVertex3f(-50.f, -50.f, -50.f);
        glTexCoord2f(0, 1); glVertex3f(-50.f,  50.f, -50.f);
        glTexCoord2f(1, 1); glVertex3f( 50.f,  50.f, -50.f);
        glTexCoord2f(1, 0); glVertex3f( 50.f, -50.f, -50.f);

        glTexCoord2f(0, 0); glVertex3f(-50.f, -50.f, 50.f);
        glTexCoord2f(0, 1); glVertex3f(-50.f,  50.f, 50.f);
        glTexCoord2f(1, 1); glVertex3f( 50.f,  50.f, 50.f);
        glTexCoord2f(1, 0); glVertex3f( 50.f, -50.f, 50.f);

        glTexCoord2f(0, 0); glVertex3f(-50.f, -50.f, -50.f);
        glTexCoord2f(0, 1); glVertex3f(-50.f,  50.f, -50.f);
        glTexCoord2f(1, 1); glVertex3f(-50.f,  50.f,  50.f);
        glTexCoord2f(1, 0); glVertex3f(-50.f, -50.f,  50.f);

        glTexCoord2f(0, 0); glVertex3f(50.f, -50.f, -50.f);
        glTexCoord2f(0, 1); glVertex3f(50.f,  50.f, -50.f);
        glTexCoord2f(1, 1); glVertex3f(50.f,  50.f,  50.f);
        glTexCoord2f(1, 0); glVertex3f(50.f, -50.f,  50.f);

        glTexCoord2f(0, 1); glVertex3f(-50.f, -50.f,  50.f);
        glTexCoord2f(0, 0); glVertex3f(-50.f, -50.f, -50.f);
        glTexCoord2f(1, 0); glVertex3f( 50.f, -50.f, -50.f);
        glTexCoord2f(1, 1); glVertex3f( 50.f, -50.f,  50.f);

        glTexCoord2f(0, 1); glVertex3f(-50.f, 50.f,  50.f);
        glTexCoord2f(0, 0); glVertex3f(-50.f, 50.f, -50.f);
        glTexCoord2f(1, 0); glVertex3f( 50.f, 50.f, -50.f);
        glTexCoord2f(1, 1); glVertex3f( 50.f, 50.f,  50.f);
        glEnd();

        App.Display();
    }
    return EXIT_SUCCESS;
}

6
General / [SOLVED]vector of class owning a render window
« on: December 22, 2011, 07:01:14 am »
I am trying to create a vector of a class which owns a render window and I think I am running into a problem because the render window is non copyable. I am able to pass a reference of the render window to the constructor but when I try to push the object I create onto the vector I run into trouble.

My code looks like this:
Code: [Select]

#include <SFML/Graphics.hpp>
#include <vector>

using namespace std;
class GameObject {
  public:
    GameObject::GameObject( sf::RenderWindow &render_window ) : render_window( render_window )
    {
    };

  private:
    sf::RenderWindow& render_window;
};

int main()
{
  vector<GameObject> test;
  sf::RenderWindow app;
  GameObject go (app);
  test.push_back(go);
}

but when I try to compile I get the output:
Code: [Select]

g++ -o game example.cpp -lsfml-graphics -lsfml-window -lsfml-system
example.cpp:8:5: error: extra qualification âGameObject::â on member âGameObjectâ [-fpermissive]
example.cpp: In member function âGameObject& GameObject::operator=(const GameObject&)â:
example.cpp:6:7:   instantiated from âvoid std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, const _Tp&) [with _Tp = GameObject, _Alloc = std::allocator<GameObject>, std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<GameObject*, std::vector<GameObject> >, typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer = GameObject*]â
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/stl_vector.h:834:4:   instantiated from âvoid std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = GameObject, _Alloc = std::allocator<GameObject>, std::vector<_Tp, _Alloc>::value_type = GameObject]â
example.cpp:22:20:   instantiated from here
example.cpp:6:7: error: non-static reference member âsf::RenderWindow& GameObject::render_windowâ, canât use default assignment operator
In file included from /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/vector:70:0,
                 from /usr/include/SFML/Window/VideoMode.hpp:32,
                 from /usr/include/SFML/Window.hpp:39,
                 from /usr/include/SFML/Graphics.hpp:32,
                 from example.cpp:1:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/vector.tcc: In member function âvoid std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, const _Tp&) [with _Tp = GameObject, _Alloc = std::allocator<GameObject>, std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<GameObject*, std::vector<GameObject> >, typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer = GameObject*]â:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/vector.tcc:317:4: note: synthesized method âGameObject& GameObject::operator=(const GameObject&)â first required here


I tried adding a copy constructor:
Code: [Select]

#include <SFML/Graphics.hpp>
#include <vector>

using namespace std;
class GameObject {
  public:
    GameObject::GameObject( sf::RenderWindow &render_window ) : render_window( render_window )
    {
    };
    GameObject( const GameObject& game_object ) : render_window( game_object.render_window )
    {
    };

  private:
    sf::RenderWindow& render_window;
};

int main()
{
  vector<GameObject> test;
  sf::RenderWindow app;
  GameObject go (app);
  test.push_back(go);
}


but then I get the very similar output:
Code: [Select]

g++ -o game example2.cpp -lsfml-graphics -lsfml-window -lsfml-system
example2.cpp:7:5: error: extra qualification âGameObject::â on member âGameObjectâ [-fpermissive]
example2.cpp: In member function âGameObject& GameObject::operator=(const GameObject&)â:
example2.cpp:5:7:   instantiated from âvoid std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, const _Tp&) [with _Tp = GameObject, _Alloc = std::allocator<GameObject>, std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<GameObject*, std::vector<GameObject> >, typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer = GameObject*]â
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/stl_vector.h:834:4:   instantiated from âvoid std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = GameObject, _Alloc = std::allocator<GameObject>, std::vector<_Tp, _Alloc>::value_type = GameObject]â
example2.cpp:23:20:   instantiated from here
example2.cpp:5:7: error: non-static reference member âsf::RenderWindow& GameObject::render_windowâ, canât use default assignment operator
In file included from /usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/vector:70:0,
                 from /usr/include/SFML/Window/VideoMode.hpp:32,
                 from /usr/include/SFML/Window.hpp:39,
                 from /usr/include/SFML/Graphics.hpp:32,
                 from example2.cpp:1:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/vector.tcc: In member function âvoid std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, const _Tp&) [with _Tp = GameObject, _Alloc = std::allocator<GameObject>, std::vector<_Tp, _Alloc>::iterator = __gnu_cxx::__normal_iterator<GameObject*, std::vector<GameObject> >, typename std::_Vector_base<_Tp, _Alloc>::_Tp_alloc_type::pointer = GameObject*]â:
/usr/lib/gcc/x86_64-unknown-linux-gnu/4.6.2/../../../../include/c++/4.6.2/bits/vector.tcc:317:4: note: synthesized method âGameObject& GameObject::operator=(const GameObject&)â first required here


I am sure I am missing something obvious as I am new to this but any responses will be greatly appreciated!

Pages: [1]
anything