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

Pages: [1]
1
Feature requests / Re: Quake Style Console Here is a Project
« on: June 01, 2017, 12:14:46 am »
Thanks, I see now that SFML wants to tweak where it is at and the feature set is fine where it is at. I can understand and appreciate that.

2
Feature requests / Quake Style Console Here is a Project
« on: May 31, 2017, 08:12:17 am »
This looks like a really cool project that could be integrated with SFML for a quake style console window to change variables of a program on the fly without having a massive gui interface.

Here is the project link. They have interfaces for glut and FLTK, perhaps if they could work with the team here to add an interface to SFML?

https://github.com/arpg/CVars

3
General / Re: SFML Static Linking 2017
« on: May 30, 2017, 08:23:38 am »
Yes, thanks.

4
General / Working Static Linking Order
« on: May 29, 2017, 04:45:44 pm »
Here is a screenshot of the libs in the order they are needed to get the first tutorial working with static linking.

I started over and here are the libs in the linker settings in codeblocks. They are ordered correctly now to get a static link of the test project here:
https://www.sfml-dev.org/tutorials/2.4/start-cb.php



5
General / Re: SFML Static Linking 2017
« on: May 29, 2017, 03:18:03 pm »
I can't get SFML to compile statically. It is giving me linking errors. From reading the forums for the type of errors I was getting, it was referred to as being an ordering issue of the libraries.

My screenshot is how I everything organized to do a test full static compile. I tried to match what was in the help for the recommended order.

If one of the developers could do a similar screenshot of their setup I could try to match that.
Thanks

6
General / SFML Static Linking 2017
« on: May 29, 2017, 06:46:30 am »
Update: fixed here

I tried to get SFML's test program to compile statically. I wanted to make a template using everything to see that I got everything in the right order. As you can see from the attached picture, I tried to put everything in the order listed in the help for https://www.sfml-dev.org/tutorials/2.4/start-cb.php

Thanks for any help.


7
General / Re: Collision detection sfml 2.0
« on: March 18, 2013, 05:23:12 am »
Maybe my small example could give you some insights. ;)
But keep in mind that it's not finished at all.

Thanks, that is a great example to study!

8
General / SFML with OpenGL
« on: September 23, 2009, 05:08:20 am »
I'll figure it out, thanks anyways.

9
General / SFML with OpenGL
« on: September 22, 2009, 12:36:51 am »
I do not see the cube at all. Only the sprite and text.

With the comment, I see the cube, but it doesn't erase the previous draws of the cube, so it leaves a trail of previous cube renders.

Thanks for replying, sorting this out will really help.

10
General / SFML OpenGL, 3D and 2D help needed
« on: September 21, 2009, 10:28:30 pm »
I am trying to run 3D and also 2D OpenGL with SFML.
I tried modifying some of the tutorials, and got close. But I can't get the previous 3D screen to clear. As you see in the code, I commented out what I thought would work, and as is-- at least you can see what the problem is.

Thanks for any help!

Code: [Select]

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


int main()
{
    // Create main window
    sf::RenderWindow App(sf::VideoMode(1024, 768, 32), "SFML OpenGL", sf::Style::Fullscreen);
    App.PreserveOpenGLStates(true);

    // Create a sprite for the background
    sf::Image BackgroundImage;
    if (!BackgroundImage.LoadFromFile("data/ks9CubeArt.png"))
        return EXIT_FAILURE;
    sf::Sprite Background(BackgroundImage);

    // Load an OpenGL texture.
    // We could directly use a sf::Image 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
    GLuint Texture = 0;
    {
        sf::Image Image;
        if (!Image.LoadFromFile("data/ks9CubeArt.png"))
            return EXIT_FAILURE;
        glGenTextures(1, &Texture);
        glBindTexture(GL_TEXTURE_2D, Texture);
        gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, Image.GetWidth(), Image.GetHeight(), 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);
    }

    // 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);

    // Bind our texture
    glEnable(GL_TEXTURE_2D);
    glBindTexture(GL_TEXTURE_2D, Texture);
    glColor4f(1.f, 1.f, 1.f, 1.f);

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

    // Draw some text on top of our OpenGL object
    sf::String Text("ks9.us - Let's play!");
    Text.SetColor(sf::Color(0,255,0));

    // Start game loop
    while (App.IsOpened())
    {
        // Process events
        sf::Event Event;
        while (App.GetEvent(Event))
        {
            // Close window : exit
            if (Event.Type == sf::Event::Closed)
                App.Close();

            // Escape key : exit
            if ((Event.Type == sf::Event::KeyPressed) && (Event.Key.Code == sf::Key::Escape))
                App.Close();

            // Adjust the viewport when the window is resized
            if (Event.Type == sf::Event::Resized)
                glViewport(0, 0, Event.Size.Width, Event.Size.Height);
         }



        /* When I use (GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT)************
         * the cube does not show up as I would think it should.             *
         *                                                                   *
         * How can I get rid of the ghosting from the previous               *
         * cube renders, thanks! *********************************************
         */
        //glClear(GL_COLOR_BUFFER_BIT or GL_DEPTH_BUFFER_BIT);
        glClear(GL_DEPTH_BUFFER_BIT);

                // Draw background
        App.Draw(Background);

        // Apply some transformations
        glMatrixMode(GL_MODELVIEW);
        glLoadIdentity();

        glTranslatef(0.f, 0.f, -150.f);
        glRotatef(Clock.GetElapsedTime() * 50, 1.f, 0.f, 0.f);
        glRotatef(Clock.GetElapsedTime() * 30, 0.f, 1.f, 0.f);
        glRotatef(Clock.GetElapsedTime() * 90, 0.f, 0.f, 1.f);

        // Draw a cube
        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.Draw(Text);

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

    // Don't forget to destroy our texture
    glDeleteTextures(1, &Texture);

    return EXIT_SUCCESS;
}


Code::Blocks Project download of source and running exe file in 7 zip format. CBProject

11
SFML website / images from the tutorial download missing
« on: August 06, 2009, 06:13:48 am »
First, I am really enjoying sfml and going through the tutorials and site overall.

Just wanted to mention that the zip file for the tutorials does not contain any images used in the tutorials.

The link for this download is near the bottom of this page:
http://www.sfml-dev.org/tutorials/1.5/

Thanks for a great project!

Pages: [1]