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

Pages: [1]
1
General / Re: OpenGL 4.2
« on: July 31, 2012, 06:04:41 pm »
Thanks for the info guys, how would I go with OpenGL 3.2 karusu?

2
General / Re: OpenGL 4.2
« on: July 31, 2012, 04:10:55 pm »
Yea I want to use it because it is the latest. I've updated my drivers few months ago and checked just now if I am up to date and I am.

If OpenGL is not fully supported by today's graphics card then what version should I use because I've read that for example glBegin(...) ... glEnd() is slower than using those 1 call functions with supplying the array as parameter.

3
General / OpenGL 4.2
« on: July 31, 2012, 12:50:50 pm »
Hello all,

What should I do for my program(game) to use OpenGL 4.2? I've been searching on google for some time now and I can't figure it out. I am trying to follow these tutorials: http://www.opengl-tutorial.org/ but instead of using GLFW I am going to use SFML because I am more familiar with it and it seems easier and more powerful. I found some info about gl3.h file so I included it but I get linker errors about some missing .lib file which I cannot find at all. If anyone has got any information what so ever then please reply with something because I don't want to use deprecated OpenGL 1.1 functions.

@Edit: I also tried using glew because I read that I can use newest OpenGL with it but it crashes if using non-1.1-version functions when launching the application with it.

regards, i514x

4
General / Re: Mouse position problem
« on: July 27, 2012, 12:02:33 pm »
Then I have no idea sry, am new to all of this too.

5
General / Re: Please help me understand sf::Event
« on: July 27, 2012, 11:34:55 am »
Dude, if a variable is created within the loop (in the brackets) after the next iteration, it is destroyed.

Do:
{ int Variable = 5; }
std::cout << Variable;
Will give you error because Variable will not exist.

6
General discussions / Re: SFML for PS3?
« on: July 27, 2012, 11:30:11 am »
I guess I will have to stick with Windows/Linux/Mac :|

7
General / Re: Mouse position problem
« on: July 27, 2012, 11:00:20 am »
Maybe this helps
#include <SFML/Graphics.hpp>

int main()
{
    sf::RenderWindow window(sf::VideoMode(800, 600), "Hidden Cursor");
    window.setMouseCursorVisible(false); // Hide cursor
   
    sf::View fixed = window.getView(); // Create a fixed view
   
    // Load image and create sprite
    sf::Texture texture;
    texture.loadFromFile("cursor.png");
    sf::Sprite sprite(texture);
   
    while(window.isOpen())
    {
        sf::Event event;
        while(window.pollEvent(event))
        {
            if(event.type == sf::Event::Closed)
            {
                window.close();
            }
        }
       
        sprite.setPosition(static_cast<sf::Vector2f>(sf::Mouse::getPosition(window))); // Set position
       
        window.clear();
        window.setView(fixed);
        window.draw(sprite);
        window.display();
    }

    return EXIT_SUCCESS;
}
Source: https://github.com/SFML/SFML/wiki/TutorialChangeCursor

8
General discussions / Re: SFML for PS3?
« on: July 27, 2012, 10:58:57 am »
Indies? Dafaq r u on about dude ;]

9
General discussions / SFML for PS3?
« on: July 27, 2012, 07:55:08 am »
As the title says, will there ever be such an extension for this library and is there something like free SDK for PS3 for students who want to experiment?

10
Feature requests / Re: Example Source code
« on: July 24, 2012, 09:33:15 am »
Sry I didn't want to get +1 count by just a useless post, but since you're alright with it then great ;]

11
General / Re: Problem with OpenGL
« on: July 23, 2012, 07:47:14 pm »
Ok thanks mate the title is now normal, but I still get the black window. In short, I think glTranslatef doesn't work properly.

12
Feature requests / Re: Example Source code
« on: July 23, 2012, 07:37:06 pm »
But i think its for 1.6.

@down: nvm dude I thought the link u gave me was for 1.6 version.

13
Feature requests / Example Source code
« on: July 23, 2012, 06:57:17 pm »
It's not a feature but it would be useful if Source Code for examples in SFML 2.0 package would be available. I searched every folder and all I could find was the .exe files.

14
General / Re: Problem with OpenGL
« on: July 23, 2012, 06:41:38 pm »
Ok sry dude

#pragma comment(lib, "sfml-window.lib")
#pragma comment(lib, "sfml-system.lib")
#pragma comment(lib, "sfml-graphics.lib")
#pragma comment(lib, "OpenGL32.lib")

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

int main()
{
    // create the window
    sf::Window window(sf::VideoMode(800, 600), "OpenGL", sf::Style::Default, sf::ContextSettings(32));
    window.setVerticalSyncEnabled(true);

    // load resources, initialize the OpenGL states, ...

    // run the main loop
    bool running = true;
    while (running)
    {
        // handle events
        sf::Event event;
        while (window.pollEvent(event))
        {
            if (event.type == sf::Event::Closed)
            {
                // end the program
                running = false;
            }
            else if (event.type == sf::Event::Resized)
            {
                // adjust the viewport when the window is resized
                glViewport(0, 0, event.size.width, event.size.height);
            }
        }

        // clear the buffers
        glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);

        // draw...
                glLoadIdentity();                       // Reset The View
                glTranslatef(-1.5f,0.0f,-6.0f);                 // Move Left 1.5 Units And Into The Screen 6.0
                glBegin(GL_TRIANGLES);                      // Drawing Using Triangles
                        glVertex3f( 0.0f, 1.0f, 0.0f);              // Top
                        glVertex3f(-1.0f,-1.0f, 0.0f);              // Bottom Left
                        glVertex3f( 1.0f,-1.0f, 0.0f);              // Bottom Right
                glEnd();                            // Finished Drawing The Triangle
                glBegin(GL_QUADS);                      // Draw A Quad
                        glVertex3f(-1.0f, 1.0f, 0.0f);              // Top Left
                        glVertex3f( 1.0f, 1.0f, 0.0f);              // Top Right
                        glVertex3f( 1.0f,-1.0f, 0.0f);              // Bottom Right
                        glVertex3f(-1.0f,-1.0f, 0.0f);              // Bottom Left
                glEnd();                            // Done Drawing The Quad

        // end the current frame (internally swaps the front and back buffers)
        window.display();
    }

    // release resources...

    return 0;
}
It's basically the same as here: http://www.sfml-dev.org/tutorials/2.0/window-opengl.php + shape drawing code from here: http://nehe.gamedev.net/tutorial/your_first_polygon/13002/


Also in the Window title some strange symbols appear before "OpenGL" text

15
General / Problem with OpenGL
« on: July 23, 2012, 06:08:33 pm »
Hi all,

For a long time I've been trying to write myself a little game with no success. I finally found this library and I've downloaded 1.6 version, everything was great but my program was crashing with some App stack error when closing so I've downloaded 2.0 and I run into some problems. I used the tutorial on OpenGL for 2.0 and I put code for drawing a triangle and a square from NeHe tutorials but I get a black screen, when I comment glTranslatef the shapes show up one on top of the other so I googled glTranslatef not working and I found this topic http://www.opengl.org/discussion_boards/showthread.php/129644-glTranslatef-not-working except I am not using glut. Any ideas how can I fix this?

regards, i514x

Pages: [1]
anything