Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status? #27

Closed
AregevDev opened this issue Sep 6, 2019 · 24 comments
Closed

Status? #27

AregevDev opened this issue Sep 6, 2019 · 24 comments

Comments

@AregevDev
Copy link

AregevDev commented Sep 6, 2019

Hi, I really appreciate this fork of nanogui.
I prefer using SDL for my OpenGL development and this library is absolutely beautiful and suit my needs.

Is this fork still active? There is a commit from yesterday after a few years of inactivity...

Also, I tried to build it today from source, on Windows. It generally has many problems:

  • Need to manually build SDL2 from source and specify the include and library directories. I suggest adding a submodule to the GitHub mirror of SDL2 and find a way to build SDL2TTF and SDL2_Image since they don't use CMake...

  • Headers include SDL.h instead of SDL2/SDL.h

  • Many compile errors with unresolved references, specifically SDL_FRect / FPoint. Not sure what they are.

  • GLCanvas widget is missing. One the project builds again, it's worth implementing... It might be more complex though...

Please keep the hard work! Much appreciated. I will happily contribute to this project.

Best regards
Alon

@dalerank
Copy link
Owner

dalerank commented Sep 6, 2019

In develop, hope I have time now to support it
I used cmake that create solution for vs
Now it using nanort render, instead of opengl render, because SDL compatibility need
Will fix readme with build instructions

@dalerank
Copy link
Owner

dalerank commented Sep 6, 2019

clone repo
$mkdir build
$cd build & cmake ..
open solution in vs
sory just may test in on windows 10 only yet

@AregevDev
Copy link
Author

Thanks for replying, Which SDL version should I use when building?
Does it support SDL 2.0.9?

@dalerank
Copy link
Owner

dalerank commented Sep 7, 2019

Yep, just downloaded stable from libsdl.org, seems it need again update install instructions for win

@AregevDev
Copy link
Author

AregevDev commented Sep 7, 2019

I am getting build errors when building the generated solution
https://pastebin.com/D2X2YTPH
Mind taking a look?

I am using SDL 2.0.9

@dalerank
Copy link
Owner

dalerank commented Sep 7, 2019

what '$build cmake ..' say?

@AregevDev
Copy link
Author

PS E:\source\nanogui-sdl\build> $build cmake ..
At line:1 char:8
+ $build cmake ..
+        ~~~~~
Unexpected token 'cmake' in expression or statement.
    + CategoryInfo          : ParserError: (:) [], ParentContainsErrorRecordException
    + FullyQualifiedErrorId : UnexpectedToken

@dalerank
Copy link
Owner

dalerank commented Sep 7, 2019

ouch.... $build cmake .. means run 'cmake ..' from folder build

@AregevDev
Copy link
Author

AregevDev commented Sep 7, 2019

That's what I do, it configured alright, but it fails to build

I use this configure command to detect the libraries:

cmake -DSDL2_LIBRARY="../../libs/x64-windows-static/lib" -DSDL2_INCLUDE_DIR="../../libs/x64-windows-static/include" -DSDL2TTF_LIBRARY="../../libs/x64-windows-static/lib" -DSDL2TTF_INCLUDE_DIR="../../libs/x64-windows-static/include" -DSDL2_IMAGE_LIBRARY="../../libs/x64-windows-static/lib" -DSDL2_IMAGE_INCLUDE_DIR="../../libs/x64-windows-static/include" ..

@dalerank
Copy link
Owner

dalerank commented Sep 7, 2019

will try you cmd line
possible you need removed content from build folder and run your command again, because cmake may cached some variables? on my pc output was,

$build cmake ..
SDL2_INCLUDE_DIR is D:/SDL2/include
SDL2_LIBRARY_PATH is D:/SDL2/lib/x86/SDL2.lib
SDL2IMAGE_LIBRARY is D:/SDL2/lib/x86/SDL2_image.lib
SDL2TTF_LIBRARY is D:/SDL2/lib/x86/SDL2_ttf.lib
-- Configuring done
-- Generating done
-- Build files have been written to: D:/nanogui-sdl/build

@dalerank
Copy link
Owner

dalerank commented Sep 7, 2019

d:\nanogui-sdl\build>cmake -DSDL2_LIBRARY="D:/sdl2/xb86/sdl2.lib" -DSDL2_INCLUDE_DIR="d:/sdl2/include" -DSDL2TTF_LIBRARY="d:/sdl2/lib/x86/sdl2_ttf.lib" -DSDL2TTF_INCLUDE_DIR="d:/sdl2/include" -DSDL2_IMAGE_LIBRARY="d:/sdl2/lib/x86/sdl2_image.lib" SDL2_IMAGE_INCLUDE_DIR="d:/sdl2/include" ..
-- Building for: Visual Studio 14 2015
-- Selecting Windows SDK version  to target Windows 10.0.18362.
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
SDL2_INCLUDE_DIR is D:/SDL2/include
SDL2_LIBRARY_PATH is D:/SDL2/lib/x86/SDL2.lib
-- Looking for pthread.h
-- Looking for pthread.h - not found
-- Found Threads: TRUE
-- Found SDL2: D:/sdl2/xb86/sdl2.lib
-- Found SDL2_image: D:/SDL2/lib/x86/SDL2_image.lib
SDL2IMAGE_LIBRARY is D:/SDL2/lib/x86/SDL2_image.lib
SDL2TTF_LIBRARY is d:/sdl2/lib/x86/sdl2_ttf.lib
-- Found SDL2TTF: d:/sdl2/lib/x86/sdl2_ttf.lib
opengl32
-- Configuring done
-- Generating done
-- Build files have been written to: D:/nanogui-sdl/build

@AregevDev
Copy link
Author

AregevDev commented Sep 7, 2019

What's you output when you build:
IE cmake --build .?

I deleted my build folder's contents, reconfigured again, it comes up with the same build errors

@dalerank
Copy link
Owner

dalerank commented Sep 7, 2019

d:\nanogui-sdl\build>cmake -DSDL2_LIBRARY="D:/sdl2/lib/x86/sdl2.lib" -DSDL2_INCLUDE_DIR="d:/sdl2/include" -DSDL2TTF_LIBRARY="d:/sdl2/lib/x86/sdl2_ttf.lib" -DSDL2TTF_INCLUDE_DIR="d:/sdl2/include" -DSDL2_IMAGE_LIBRARY="d:/sdl2/lib/x86/sdl2_image.lib" SDL2_IMAGE_INCLUDE_DIR="d:/sdl2/include" ..
-- Selecting Windows SDK version  to target Windows 10.0.18362.
SDL2_INCLUDE_DIR is D:/SDL2/include
SDL2_LIBRARY_PATH is D:/SDL2/lib/x86/SDL2.lib
-- Found SDL2: D:/sdl2/lib/x86/sdl2.lib
SDL2IMAGE_LIBRARY is D:/SDL2/lib/x86/SDL2_image.lib
SDL2TTF_LIBRARY is d:/sdl2/lib/x86/sdl2_ttf.lib
opengl32
-- Configuring done
-- Generating done
-- Build files have been written to: D:/nanogui-sdl/build

d:\nanogui-sdl\build>cmake --build .
Microsoft (R) Build Engine версии 14.0.27530.0

  example1.vcxproj -> D:\nanogui-sdl\build\Debug\example1.exe
  example1.vcxproj -> D:/nanogui-sdl/build/Debug/example1.pdb (Full PDB)
  Building Custom Rule D:/nanogui-sdl/CMakeLists.txt

d:\nanogui-sdl\build>

@AregevDev
Copy link
Author

Which SDL version do you use, that's so strange for me...

@AregevDev
Copy link
Author

Does nanogui-sdl depend on something, other than SDL, SDL image and SDL ttf?

@dalerank
Copy link
Owner

dalerank commented Sep 7, 2019

No other depends

@AregevDev
Copy link
Author

Which SDL version do you use, that's so strange for me...

And the version?

@dalerank
Copy link
Owner

dalerank commented Sep 7, 2019

Last stable from libsdl.org 2.0.10

@AregevDev
Copy link
Author

I rebuilt 2.0.10 this time, same errors.
They are about undefined references
SDL_FRect SDL_FPoint SDL_RenderFillRectF
Do you know where they are from?

@dalerank
Copy link
Owner

dalerank commented Sep 7, 2019

It sdl2 structs

@AregevDev
Copy link
Author

Are you sure?
image
Does not seem like that

@dalerank
Copy link
Owner

dalerank commented Sep 7, 2019

sure, official sdl repo http://hg.libsdl.org/SDL/file/bc90ce38f1e2/include/SDL_rect.h look at line 88

created travis-ci for test building on windows
it downloads stable sdl2 stuff from libsdl.org and unpack it
after that build
no errors

https://travis-ci.org/dalerank/nanogui-sdl/builds/582167397

@dalerank
Copy link
Owner

try now

@dalerank
Copy link
Owner

fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants