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

Pages: 1 2 3 [4] 5 6 7
46
General / Re: Nuget SFML and static linking
« on: May 12, 2018, 02:32:40 pm »
Thanks for your quick answer.
I've doublechecked the preprocessor flag and it's there, in all configurations.



 :-\

47
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?

48
Graphics / Re: setView() performance penalty
« on: April 26, 2018, 08:47:55 pm »
Fair enough Laurent.
Since this project is multiplatform and works even o Raspberry-PI I wouldn’t like to rush the choices and degrade the performance before making tests. No matter how I despise RPI I’m being forced to buy one :)

50
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?

52
General / Re: Performance drop in the current master
« on: April 14, 2018, 05:25:49 am »
22f1b85515242c44d7e5a1be1e3960bdf6648b52 is the first bad commit
commit 22f1b85515242c44d7e5a1be1e3960bdf6648b52
Author: binary1248
Date:   Thu Dec 21 20:54:58 2017 +0100

    Added support for interfacing with joysticks via DirectInput when it is available.

53
General / Re: Performance drop in the current master
« on: April 13, 2018, 12:54:16 pm »
True, I’ve thought about applying a sorting algo to the commits after I wrote my post. I’ve never used git bisect, will look into that.

54
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


2.5.0 WIP


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

55
I've found a way to do it in case anyone is looking for the same solution

SetWindowLongPtr(window2.getSystemHandle(), GWL_EXSTYLE,
    GetWindowLongPtr(window2.getSystemHandle(), GWL_EXSTYLE)
    | WS_EX_TOOLWINDOW);


56
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.

57
Feature requests / Re: Anisotropic Filtering
« on: March 30, 2018, 06:00:45 pm »
Ok, thanks for your input.

58
Feature requests / Re: Anisotropic Filtering
« on: March 30, 2018, 05:53:26 pm »
So we have the following functions:
getMaxAnisotropyLevel() sf::Window context
setGlobalAnisotropyLevel(int level) sf::Window context
setAnisotropyLevel(int level) sf::Texture context

59
Feature requests / Re: Anisotropic Filtering
« on: March 30, 2018, 05:50:31 pm »
What if I made both global and local?

60
Feature requests / Re: Anisotropic Filtering
« on: March 30, 2018, 05:01:09 pm »
Would you also please address my main question from the first post? Do we need the AF specified for each mipmapped texture separately, or should the global AF level function modify the setSmooth function for all mipmapped textures so it sets AF with the globally set level instead of Bilinear?

Pages: 1 2 3 [4] 5 6 7