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

Pages: [1] 2
1
Graphics / setUniform("texture2", tex) on RenderTexture flipped
« on: January 05, 2021, 03:33:18 pm »
I'm not sure whether I do something wrong, or it's some undiscover SFML bug, but when I attach an additional texture to a shader bound to an image sprite it gets rendered normally, but when I do the same on a sprite with RenderTexture the additional texture bound to it appears flipped. Here is the link to the GitHub issue and the sourcecode I used.

https://github.com/SFML/SFML/issues/1733

Code: [Select]
#include <SFML/Graphics.hpp>

int main()
{
sf::RenderWindow window;
window.create( sf::VideoMode::getDesktopMode(), "Flip bug", sf::Style::Fullscreen );
window.setVerticalSyncEnabled( true );
window.setMouseCursorVisible( false );

sf::Vector2u size = window.getSize();

sf::Texture texture;
texture.loadFromFile( "a.png" );
texture.setSmooth( true );

sf::Sprite texture_sprite;
texture_sprite.setTexture( texture );
texture_sprite.setScale( (float)size.x / texture.getSize().x, (float)size.y / texture.getSize().y / 2.0 );

sf::RenderTexture render;
render.create( size.x, size.y / 2 );

sf::Sprite render_sprite;
render_sprite.setTexture( render.getTexture() );
render_sprite.setPosition( 0, size.y / 2 );

sf::Shader shader;
shader.loadFromFile( "shader.frag", sf::Shader::Fragment );
shader.setUniform( "texture2", texture );

while (window.isOpen())
{
sf::Event event;
while ( window.pollEvent( event ))
{
if (( event.type == sf::Event::Closed )
|| ( event.key.code == sf::Keyboard::Escape ))
{
window.close();
}
}

render.clear();
render.draw( texture_sprite );
render.display();

window.clear();
window.draw( texture_sprite, &shader ); // this renders normally
window.draw( render_sprite, &shader ); // this renders flipped
window.display();
}

return 0;
}

shader.frag
Code: [Select]
// This shader draws texture on the left using RB channels and
// texture2 on the right using G channel
uniform sampler2D texture;
uniform sampler2D texture2;

void main()
{
vec4 color1 = texture2D( texture, gl_TexCoord[0].xy * vec2( 2.0, 1.0 ) + vec2( 0.0, 0.0 ));
vec4 color2 = texture2D( texture2, gl_TexCoord[0].xy * vec2( 2.0, 1.0 ) + vec2( -1.0, 0.0 ));
gl_FragColor = gl_Color * ( vec4(color2.x, color1.y, color2.z, 1.0 ));
}


2
Feature requests / DRM/KMS support
« on: April 10, 2020, 02:55:35 am »
I'm curious what is your stance on adding an implementation of DRM/KMS subsystem on Linux.

3
General discussions / cmake errors in WSL Ubuntu
« on: December 22, 2019, 06:02:20 am »
I'm trying to build the latest SFML for use in MXE environment in WSL Ubuntu, but I'm getting cmake errors. Do you have any clue what is causing it?

oomek@radek-pc:/mnt/d/Documents/GitKraken/sfml/build$ x86_64-w64-mingw32.static-cmake -G "Unix Makefiles" -DBUILD_STATIC=1 -DBUILD_STATIC_LIBS=1 ..
== Using MXE wrapper: /home/oomek/mxe/usr/bin/x86_64-w64-mingw32.static-cmake
     - cmake version 3.15.4
     - warnings for unused CMAKE_POLICY_DEFAULT variables can be ignored
== Using MXE toolchain: /home/oomek/mxe/usr/x86_64-w64-mingw32.static/share/cmake/mxe-conf.cmake
== Using MXE runresult: /home/oomek/mxe/usr/share/cmake/modules/TryRunResults.cmake
== Adding "-DCMAKE_BUILD_TYPE=Release"
loading initial cache file /home/oomek/mxe/usr/share/cmake/modules/TryRunResults.cmake
CMake Error at /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CMakeDetermineSystem.cmake:185 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:45 (project)


-- The C compiler identification is GNU 5.5.0
CMake Error at /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CMakeDetermineCCompiler.cmake:212 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:45 (project)


-- The CXX compiler identification is GNU 5.5.0
CMake Error at /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CMakeDetermineCXXCompiler.cmake:210 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:45 (project)


CMake Error at /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CMakeDetermineRCCompiler.cmake:55 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/Platform/Windows-GNU.cmake:138 (enable_language)
  /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/Platform/Windows-GNU-C.cmake:2 (__windows_compiler_gnu)
  /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CMakeCInformation.cmake:48 (include)
  CMakeLists.txt:45 (project)


-- Check for working C compiler: /home/oomek/mxe/usr/x86_64-pc-linux-gnu/bin/x86_64-w64-mingw32.static-gcc
-- Check for working C compiler: /home/oomek/mxe/usr/x86_64-pc-linux-gnu/bin/x86_64-w64-mingw32.static-gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CMakeTestCCompiler.cmake:80 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:45 (project)


-- Check for working CXX compiler: /home/oomek/mxe/usr/x86_64-pc-linux-gnu/bin/x86_64-w64-mingw32.static-g++
-- Check for working CXX compiler: /home/oomek/mxe/usr/x86_64-pc-linux-gnu/bin/x86_64-w64-mingw32.static-g++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CMakeTestCXXCompiler.cmake:73 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:45 (project)


CMake Error at /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CheckIncludeFile.cmake:55 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CheckTypeSize.cmake:230 (check_include_file)
  cmake/Config.cmake:10 (check_type_size)
  CMakeLists.txt:48 (include)


-- Looking for sys/types.h
-- Looking for sys/types.h - found
CMake Error at /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CheckIncludeFile.cmake:55 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CheckTypeSize.cmake:231 (check_include_file)
  cmake/Config.cmake:10 (check_type_size)
  CMakeLists.txt:48 (include)


-- Looking for stdint.h
-- Looking for stdint.h - found
CMake Error at /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CheckIncludeFile.cmake:55 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CheckTypeSize.cmake:232 (check_include_file)
  cmake/Config.cmake:10 (check_type_size)
  CMakeLists.txt:48 (include)


-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of void*
CMake Error at /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CheckTypeSize.cmake:119 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  /home/oomek/mxe/usr/x86_64-pc-linux-gnu/share/cmake-3.15/Modules/CheckTypeSize.cmake:246 (__check_type_size_impl)
  cmake/Config.cmake:10 (check_type_size)
  CMakeLists.txt:48 (include)


CMake Error at cmake/Config.cmake:11 (if):
  if given arguments:

    "STREQUAL" "4"

  Unknown arguments specified
Call Stack (most recent call first):
  CMakeLists.txt:48 (include)


-- Configuring incomplete, errors occurred!
See also "/mnt/d/Documents/GitKraken/sfml/build/CMakeFiles/CMakeOutput.log".
See also "/mnt/d/Documents/GitKraken/sfml/build/CMakeFiles/CMakeError.log".
 

4
Feature requests / Signed Distance Field Fonts
« on: November 20, 2019, 08:59:06 pm »
Have you ever considered a possibility to add Single Distance Field Font rendering or it's more accurate cousin Multi Channel SDF Fonts to SFML?
Since it requires shaders to blend with a render target I wonder what's your opinion about that.

5
Graphics / Rendering n frames ahead
« on: November 13, 2018, 02:21:49 pm »
Is it possible in SFML to create an array of  n rendertextures and draw to them sequentially untill all are filled in one thread and in another thread draw those framebuffers sequentially to the window without blocking the first thread? The reason for that is that the rendering thread sometimes pauses for 50-100ms when reloading textures from disk. I do not care much about the latency as it's not a game. An example using pseudo code would be handy.

6
I know this might be a painful question since there are countless topics regarding mixing SFML and OpenGL that suggests wrapping SFML draw calls in pushGLStates() popGLStates(), but this is a bit more complicated matter.

The project Attract Mode I'm contributing to uses SFML framework, but also gameSWF that draws swf files on rendertextures using plain OpenGL. The SFML and gameSWF were playing nicely until SFML 2.5.0, so I'm wondering what has changed in the SFML that made the Attract Mode corrupting the rendering ( and even fonts in MSI Afterburner's OSD and crashing the VMWare sessions ) whenever the swf file is loaded.

The advices regarding usage of push/popGLStates() were based on a situation when you draw SFML stuff surrounded by OpenGL, but what if it's other way round? AM uses mainly SFML for rendering, but the Image class sometimes loads swf instead of an image, and the order of draws is based on the dynamic script written in Squirrel language. In this case OpenGL is surrounded by SFML code. Using push/popGLStates() might be a bit problematic since it would require wrapping every draw call in this and it's quite expensive as the documentation explains.

I know, no one has time for digging through some random repo, but maybe some kind soul would find some spare time to drop some ideas, or give some directions to what we should check to make AM back on it's track.

https://github.com/mickelson/attract

the files of interest are swf.cpp and fe_image.cpp

7
Graphics / How to reload a texture without adding a driver overhead?
« on: October 16, 2018, 07:26:36 pm »
I draw a set of sprites on the screen and reload textures quite often with png files which have random pixel dimensions which I cannot change. I found that calling loadFrom...() functions on the texture that is currently being drawn on the screen adds a penalty of up to 16ms delay. I found a way to eliminate that delay like in the code below, but this causes a vram leak. Is there any better way of coding it without vram leakage, or adding an additional array of textures and flipflop between them?

sf::Image img;
if ( !img.loadFromStream( s ) )
        return false;

sf::Texture *new_tex = new sf::Texture;
m_texture.swap( *new_tex );
m_texture.loadFromImage( img );

8
Graphics / Triple Buffering one more time
« on: July 15, 2018, 08:05:30 pm »
I'm involved in the developement of the app that frequently reloads batches of images from disk. That causes significant stuttering of the animations. Enabling triple buffering in the driver does not help because the Texture::loadFromStream() function causes a delay of 16-32ms first time it's called in a frame.

I've narrowed it down to the glGenTextures(1, &texture) call in Texture::create() function.
When I disable vsync there is no delay.

So my questions are:

1. Why glGenTextures() is causing the lag?
2. Is there any way to make the TripleBuffering actually do what it's intended to do, so the app has 1 frame more for image reloading?
3. Is there any way to rewrite the image loading function, so it does not recreate the texture every time Texture::loadFromStream() is called, but instead use some persistent one and just call swap() on them?


9
Graphics / [SOLVED] Cheap antialiased sprite edges
« on: July 09, 2018, 12:33:43 am »
Is there any chance to rewrite setTextureRect() function to accept FloatRect?
I have written a simple shader that adds a cheap antialiasing to the sprite edges. Before running the shader I extend the sprite size by 1 pixel on each side and pass those dimensions to the shader, but what I also need is to adjust the texture uv to shrink by 1 pixel, but in screen resolution, not texture resolution. setTextureRect() is quantised to texture resolution, so if the sprite is stretched the border size I added does not match the modified texture uvs.

Here is the AA shader

Code: [Select]
uniform sampler2D texture;
uniform vec2 size; // sprite size, not texture size

void main()
{
    vec2 coords = gl_TexCoord[0].xy;
    float aa_edge = length( max( abs( coords * size - size / 2.0 ) - ( size / 2.0 - vec2( 1.5, 1.5 )), 0.0 ));
    vec4 pixel = texture2D( texture, gl_TexCoord[0].xy );
    gl_FragColor = gl_Color * pixel;
    gl_FragColor.w = gl_Color.w * ( 1.0 - aa_edge );
}

10
General / SFML on Raspberry PI
« on: June 27, 2018, 12:29:11 pm »
What is the current SFML status of support for Raspberry PI. Is there any chance to have shaders working on It.

11
General / Nuget SFML and static linking
« on: May 12, 2018, 02:09:35 pm »
I've been trying to get VC 2015 compiling a test program this entire morning without success.

I get the following errors:
Quote
1>------ Build started: Project: SFMLTEST, Configuration: Release x64 ------
1>  main.cpp
1>main.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
1>main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)
1>D:\SFMLTESTFOLDER\SFMLTEST\x64\Release\SFMLTEST.exe : fatal error LNK1120: 2 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I've set:
SFML_STATIC in C/C++->Preprocessor->Preprocessor Definitions
Multi-Threadded in Project Master Settings->Code Generation->Runtime Library

in VC2017 the situation is even worse:
Quote
1>------ Build started: Project: SFMLTEST, Configuration: Release x64 ------
1>main.cpp
1>main.obj : error LNK2001: unresolved external symbol "public: static class sf::RenderStates const sf::RenderStates::Default" (?Default@RenderStates@sf@@2V12@B)
1>main.obj : error LNK2001: unresolved external symbol "public: __cdecl sf::CircleShape::CircleShape(float,unsigned __int64)" (??0CircleShape@sf@@QEAA@M_K@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual __cdecl sf::RenderWindow::~RenderWindow(void)" (??1RenderWindow@sf@@UEAA@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: __cdecl sf::RenderWindow::RenderWindow(class sf::VideoMode,class sf::String const &,unsigned int,struct sf::ContextSettings const &)" (??0RenderWindow@sf@@QEAA@VVideoMode@1@AEBVString@1@IAEBUContextSettings@1@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: __cdecl sf::Color::Color(unsigned char,unsigned char,unsigned char,unsigned char)" (??0Color@sf@@QEAA@EEEE@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: void __cdecl sf::Window::display(void)" (?display@Window@sf@@QEAAXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: bool __cdecl sf::Window::pollEvent(class sf::Event &)" (?pollEvent@Window@sf@@QEAA_NAEAVEvent@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: bool __cdecl sf::Window::isOpen(void)const " (?isOpen@Window@sf@@QEBA_NXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: void __cdecl sf::Window::close(void)" (?close@Window@sf@@QEAAXXZ)
1>main.obj : error LNK2001: unresolved external symbol "public: static class sf::Color const sf::Color::Green" (?Green@Color@sf@@2V12@B)
1>main.obj : error LNK2001: unresolved external symbol "public: void __cdecl sf::RenderTarget::draw(class sf::Drawable const &,class sf::RenderStates const &)" (?draw@RenderTarget@sf@@QEAAXAEBVDrawable@2@AEBVRenderStates@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: void __cdecl sf::RenderTarget::clear(class sf::Color const &)" (?clear@RenderTarget@sf@@QEAAXAEBVColor@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: void __cdecl sf::Shape::setFillColor(class sf::Color const &)" (?setFillColor@Shape@sf@@QEAAXAEBVColor@2@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: virtual __cdecl sf::Shape::~Shape(void)" (??1Shape@sf@@UEAA@XZ)
1>main.obj : error LNK2001: unresolved external symbol "public: __cdecl sf::String::String(char const *,class std::locale const &)" (??0String@sf@@QEAA@PEBDAEBVlocale@std@@@Z)
1>main.obj : error LNK2001: unresolved external symbol "public: __cdecl sf::VideoMode::VideoMode(unsigned int,unsigned int,unsigned int)" (??0VideoMode@sf@@QEAA@III@Z)
1>C:\Users\Radek\source\repos\SFMLTEST\x64\Release\SFMLTEST.exe : fatal error LNK1120: 16 unresolved externals
1>Done building project "SFMLTEST.vcxproj" -- FAILED.
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


When I set referenced libraries frm Dynamic Library (DLL) to Static I get:
Quote
1>------ Build started: Project: SFMLTEST, Configuration: Release x64 ------
1>  main.cpp
1>sfml-graphics-s.lib(RenderStates.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(CircleShape.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(RenderWindow.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(Color.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(Shape.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(Transform.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(View.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(Shader.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(GLExtensions.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(Transformable.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(VertexArray.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(Image.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(Glsl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-graphics-s.lib(ImageLoader.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-window-s.lib(Window.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-window-s.lib(VideoMode.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-window-s.lib(Context.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-window-s.lib(GlContext.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-window-s.lib(WindowImpl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-window-s.lib(VideoModeImpl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-window-s.lib(WglContext.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-window-s.lib(JoystickManager.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-window-s.lib(SensorManager.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-window-s.lib(WindowImplWin32.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-window-s.lib(WglExtensions.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-window-s.lib(Joystick.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-window-s.lib(JoystickImpl.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-system-s.lib(String.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-system-s.lib(Err.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>sfml-system-s.lib(ThreadLocal.cpp.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MD_DynamicRelease' doesn't match value 'MT_StaticRelease' in main.obj
1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glBlendFunc
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glClear
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glClearColor
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glDisable
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glEnable
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glLoadMatrixf
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol glLoadMatrixf
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glMatrixMode
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol glMatrixMode
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glPopAttrib
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glPopMatrix
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glPushAttrib
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glPushMatrix
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glViewport
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glColorPointer
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glDrawArrays
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glEnableClientState
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glPopClientAttrib
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glPushClientAttrib
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glTexCoordPointer
1>sfml-graphics-s.lib(RenderTarget.cpp.obj) : error LNK2001: unresolved external symbol glVertexPointer
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol glFlush
1>sfml-graphics-s.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol glFlush
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol glGetIntegerv
1>sfml-graphics-s.lib(Shader.cpp.obj) : error LNK2001: unresolved external symbol glGetIntegerv
1>sfml-graphics-s.lib(GLExtensions.cpp.obj) : error LNK2001: unresolved external symbol glGetIntegerv
1>sfml-graphics-s.lib(TextureSaver.cpp.obj) : error LNK2001: unresolved external symbol glGetIntegerv
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol glGetTexImage
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol glLoadIdentity
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol glTexImage2D
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol glTexParameteri
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol glBindTexture
1>sfml-graphics-s.lib(TextureSaver.cpp.obj) : error LNK2001: unresolved external symbol glBindTexture
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol glCopyTexSubImage2D
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol glDeleteTextures
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol glGenTextures
1>sfml-graphics-s.lib(Texture.cpp.obj) : error LNK2001: unresolved external symbol glTexSubImage2D
1>sfml-graphics-s.lib(GLExtensions.cpp.obj) : error LNK2001: unresolved external symbol glGetError
1>sfml-graphics-s.lib(GLExtensions.cpp.obj) : error LNK2001: unresolved external symbol glGetString
1>sfml-graphics-s.lib(ImageLoader.cpp.obj) : error LNK2001: unresolved external symbol __imp_realloc
1>sfml-graphics-s.lib(ImageLoader.cpp.obj) : error LNK2001: unresolved external symbol __imp_fopen_s
1>sfml-graphics-s.lib(ImageLoader.cpp.obj) : error LNK2001: unresolved external symbol __imp_fopen
1>sfml-graphics-s.lib(ImageLoader.cpp.obj) : error LNK2001: unresolved external symbol __imp_fread
1>sfml-graphics-s.lib(ImageLoader.cpp.obj) : error LNK2001: unresolved external symbol __imp_strncmp
1>sfml-window-s.lib(GlContext.cpp.obj) : error LNK2001: unresolved external symbol __imp_strstr
1>sfml-window-s.lib(GlContext.cpp.obj) : error LNK2001: unresolved external symbol __imp_glEnable
1>sfml-window-s.lib(GlContext.cpp.obj) : error LNK2001: unresolved external symbol __imp_glGetError
1>sfml-window-s.lib(GlContext.cpp.obj) : error LNK2001: unresolved external symbol __imp_glGetIntegerv
1>sfml-window-s.lib(GlContext.cpp.obj) : error LNK2001: unresolved external symbol __imp_glGetString
1>sfml-window-s.lib(GlContext.cpp.obj) : error LNK2001: unresolved external symbol __imp_glIsEnabled
1>sfml-window-s.lib(WglContext.cpp.obj) : error LNK2001: unresolved external symbol __imp_wglCreateContext
1>sfml-window-s.lib(WglContext.cpp.obj) : error LNK2001: unresolved external symbol __imp_wglDeleteContext
1>sfml-window-s.lib(WglContext.cpp.obj) : error LNK2001: unresolved external symbol __imp_wglGetProcAddress
1>sfml-window-s.lib(WglContext.cpp.obj) : error LNK2001: unresolved external symbol __imp_wglMakeCurrent
1>sfml-window-s.lib(WglContext.cpp.obj) : error LNK2001: unresolved external symbol __imp_wglShareLists
1>sfml-window-s.lib(JoystickImpl.cpp.obj) : error LNK2001: unresolved external symbol __imp_joyGetPosEx
1>sfml-window-s.lib(JoystickImpl.cpp.obj) : error LNK2001: unresolved external symbol __imp_joyGetDevCapsW
1>sfml-system-s.lib(SleepImpl.cpp.obj) : error LNK2001: unresolved external symbol __imp_timeGetDevCaps
1>sfml-system-s.lib(SleepImpl.cpp.obj) : error LNK2001: unresolved external symbol __imp_timeBeginPeriod
1>sfml-system-s.lib(SleepImpl.cpp.obj) : error LNK2001: unresolved external symbol __imp_timeEndPeriod
1>D:\SFMLTESTFOLDER\SFMLTEST\x64\Release\SFMLTEST.exe : fatal error LNK1120: 53 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

What am I missing?

12
Graphics / setView() performance penalty
« on: April 26, 2018, 02:53:20 pm »
Is performance penalty signifficant if setView() is called before every draw() call?
I have a list of drawable class instances and each has defined to which view it belongs. I would like to keep the drawing order that way. Does the performance change significantly If I’ll do it that way?

13
General / [Solved] Performance drop in the current master
« on: April 13, 2018, 11:45:36 am »
There is a severe drop in performance in the current master when a computer is suspended and then resumed while a SFML app is running.

I tested SFML 2.4.2 and the current 2.5.0 WIP

There is a noticeable stuttering in the 2.5.0 version when PC is resumed from sleep.

2.4.2
https://www.youtube.com/watch?v=F5MtC6uIxgQ

2.5.0 WIP
https://www.youtube.com/watch?v=k7IxEEyCb0I

Both versions cross-compiled with MXE x86_64-w64-mingw32.static toolchain

 
I could go through and compile all the commits since 2.4.2 but it could take ages. Maybe you’ve got some debugging tools that could identify the problem quicker?

https://github.com/SFML/SFML/issues/1415

14
Is it possible to hide the second window in two window app so it doesn't appear on the taskbar or alt-tab overlay, but it still visible? setVisible must be set to true.

15
Feature requests / Anisotropic Filtering
« on: March 28, 2018, 04:39:43 pm »
I’m experimenting with adding anisotropic filtering to SFML, but I’m not certain what would be the best approach. I could add a function setAnisotropicLevel(int level) to the sf::Texture class so it needs to be set for every texture with mipmap, or make it global setting and it would modify the setSmooth() function in a way that every texture with mipmap would have anisotropic filtering enabled instead of bilinear.  What do you think?

Pages: [1] 2
anything