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

Pages: [1]
1
General / Compiling SFML with MinGW
« on: August 14, 2017, 02:07:13 am »
I am sorry but I am not sure if this is a problem specific to MinGW, CMake, or SFML but I thought I might try and ask here. I get errors while building SFML using MinGW.

1. ExtractSFML-2.4.2-sources.zip
2. Create build folder
3. cmake -G "MinGW Makefiles" ..
4. mingw-32-make

Quote
PS C:\libs\SFML-2.4.2\build> mingw32-make
Scanning dependencies of target sfml-system
[  1%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Clock.cpp.obj
[  2%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Err.cpp.obj
[  3%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Lock.cpp.obj
[  3%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Mutex.cpp.obj
[  4%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Sleep.cpp.obj
[  5%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/String.cpp.obj
[  6%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Thread.cpp.obj
[  7%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/ThreadLocal.cpp.obj
[  8%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Time.cpp.obj
[  9%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/FileInputStream.cpp.obj
[ 10%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/MemoryInputStream.cpp.obj
[ 11%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ClockImpl.cpp.obj
[ 12%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/MutexImpl.cpp.obj
[ 13%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/SleepImpl.cpp.obj
[ 14%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ThreadImpl.cpp.obj
[ 15%] Building CXX object src/SFML/System/CMakeFiles/sfml-system.dir/Win32/ThreadLocalImpl.cpp.obj
[ 16%] Linking CXX shared library ..\..\..\lib\sfml-system-2.dll
[ 16%] Built target sfml-system
Scanning dependencies of target sfml-main
[ 17%] Building CXX object src/SFML/Main/CMakeFiles/sfml-main.dir/MainWin32.cpp.obj
[ 18%] Linking CXX static library ..\..\..\lib\libsfml-main.a
[ 18%] Built target sfml-main
Scanning dependencies of target sfml-window
[ 19%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Context.cpp.obj
[ 20%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/GlContext.cpp.obj
[ 21%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/GlResource.cpp.obj
[ 22%] Building CXX object src/SFML/Window/CMakeFiles/sfml-window.dir/Joystick.cpp.obj
In file included from c:\mingw\include\windows.h:48:0,
                 from C:/libs/SFML-2.4.2/src/SFML/Window/Win32/JoystickImpl.hpp:42,
                 from C:/libs/SFML-2.4.2/src/SFML/Window/JoystickImpl.hpp:83,
                 from C:/libs/SFML-2.4.2/src/SFML/Window/JoystickManager.hpp:32,
                 from C:\libs\SFML-2.4.2\src\SFML\Window\Joystick.cpp:29:
c:\mingw\include\winuser.h:3920:47: error: 'PTITLEBARINFO' has not been declared
 WINUSERAPI BOOL WINAPI GetTitleBarInfo (HWND, PTITLEBARINFO);
                                               ^~~~~~~~~~~~~
src\SFML\Window\CMakeFiles\sfml-window.dir\build.make:137: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir
/Joystick.cpp.obj' failed
mingw32-make[2]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/Joystick.cpp.obj] Error 1
CMakeFiles\Makefile2:227: recipe for target 'src/SFML/Window/CMakeFiles/sfml-window.dir/all' failed
mingw32-make[1]: *** [src/SFML/Window/CMakeFiles/sfml-window.dir/all] Error 2
Makefile:128: recipe for target 'all' failed
mingw32-make: *** [all] Error 2

I have made a Hello World c++ example and that compiled fine, but obviously the problem is inside winuser.h. I don't think this is a SFML bug, I think it is more likely that I setup my MinGW environment incorrectly. I have installed gcc, g++ and mingw32-make on my system, is there another component that needs to be installed? Any help would be appreciated :)

2
General / Outdated openGL?
« on: August 13, 2014, 06:04:30 pm »
Today I tried to test my game on my friends computer but we ran into a few errors.

his gfx card : gtx 650 ti boost



my shader...
uniform sampler2D texture;

uniform float distanceToMaxNoise = 1000.0;
uniform float startNoiseDistance = 5000.0;

uniform vec2 position = vec2(0,0);
uniform float random = 1.0;

highp float randFloat(vec2 co)
{
    highp float a = 12.9898;
    highp float b = 78.233;
    highp float c = 43758.5453;
    highp float dt= dot(co.xy ,vec2(a,b));
    highp float sn= mod(dt,3.14);
    return fract(sin(sn) * c);
}

void main()
{
        vec2 texCoord = gl_TexCoord[0].xy;
        vec2 randomVec = vec2(random);
        vec2 texCoordRandom = texCoord + randomVec;
    vec4 pixel = texture2D(texture, gl_TexCoord[0].xy);

        highp float randomNoise = randFloat(texCoordRandom);
        highp float randomLine = randFloat(texCoord.yy + randomVec);

        float distance = clamp(length(position) - startNoiseDistance, 0.0, distanceToMaxNoise);
        float noise = clamp(distance / distanceToMaxNoise, 0.0, 1.0);

        pixel = mix(pixel, vec4(randomNoise, randomNoise, randomNoise, 1.0), noise);

        if(randomLine < 0.02)
        {
                pixel = mix(pixel, vec4(0.0, 0.0, 0.0, 1.0), noise);
        }

        gl_FragColor = pixel;
}

from what i can tell #version 120 is from 2006 so does that mean his GFX card is outdated? If this happens on his computer i think its likely that other computers will experience the same problem. Is there something I can do that will automatically address the problem by prompting the user to update their drivers or something?

3
General / Error using view of a renderTexture
« on: August 08, 2014, 04:02:29 am »
Basically my game has a world in space and the ship should be able to move around in all direction (like asteroids), to keep the view focused on the player i set the center of the view being used on the renderTexture to the position of the player. after the center gets moved a certain distance lets say (-14000, 5000) or (300, 9000) the screen goes black and when i print out the coordinates of view.getCenter() it prints out (-1.#IND, -1.#IND)

In my finished product i would probably be limiting the distance the player could travel anyways, But i wanted to know if I'm using view.setCenter(); in a way that was not meant to be. 

Keep in mind drawing all my sprites to a renderTexture then drawing that to the window.

Please tell me if my description in not clear.

4
SFML projects / Asteroids (My first experience with SFML)
« on: July 04, 2014, 05:49:18 am »
I've been learning C++ for about two years now but I really didn't like learning all the in and outs of DirectX so I decided to give SFML a go. In short I love SFML and if your on the edge of deciding what graphics library to use, here's an example of what you can create within a few days. Enjoy my attempt at recreating a retro game i never really played before :P

https://www.dropbox.com/sh/k8mcqxy2gukiuay/AADa3mw9AAzkrSFcWpNAsqKSa

Pages: [1]
anything