google / flatui Goto Github PK
View Code? Open in Web Editor NEWEfficient Immediate Mode UI for Games
Home Page: http://google.github.io/flatui
License: Apache License 2.0
Efficient Immediate Mode UI for Games
Home Page: http://google.github.io/flatui
License: Apache License 2.0
Running cmake -G'Unix Makefiles' .
inside the flatui main folder in Ubuntu 14.04 causes the following error:
The source directory
/home/yourname/flatui/dependencies/mathfu
does not contain a CMakeLists.txt file.
All the needed libraries are installed. I've also tried to checkout the entire project again bu I had the very same issue.
Is being able to use FlatUI but not FPLBase a use case that FlatUI would like to support ?
Any chance to get cdep support ? It would make dev 's life so much easier (^_^)
Yo all, just wanted to try this out, since it looks like ImGui and I wanted to compare, but I can't even build it:
I used CMake GUI to build the project, deselected 2 DirectX checkbuttons, because it didn't find the DX SDK (Windows 10 have it already?). Well, generating .sln worked nicely then, but it missed the generation of these header files it seems.
A few files in cmake/harfbuzz/CMakeLists.txt
such as ${harfbuzz_dir}/src/hb-ot-shape-complex-use.cc
are missing from the commit the submodule is pointing to.
When I try to compile FlatUI on Linux I have an issue:
myuser@user:~/dev/sample-jni/flatui$ ndk-build APP_ABI=all
Android NDK: android-10 is unsupported. Using minimum supported version android-14.
[generic] Generate : jni/libs/src/../../../gen/include/flatui/flatui_generated.h
[generic] Generate : /usr/local/google/home/dmabin/dev/sample-jni/flatui/jni/libs/freetype/../../../dependencies/flatbuffers/../fplbase/jni/../gen/include/common_generated.h
[generic] Generate : /usr/local/google/home/dmabin/dev/sample-jni/flatui/jni/libs/freetype/../../../dependencies/flatbuffers/../fplbase/jni/../gen/include/materials_generated.h
[generic] Generate : /usr/local/google/home/dmabin/dev/sample-jni/flatui/jni/libs/freetype/../../../dependencies/flatbuffers/../fplbase/jni/../gen/include/mesh_generated.h
[generic] Generate : /usr/local/google/home/dmabin/dev/sample-jni/flatui/jni/libs/freetype/../../../dependencies/flatbuffers/../fplbase/jni/../gen/include/shader_generated.h
[generic] Generate : /usr/local/google/home/dmabin/dev/sample-jni/flatui/jni/libs/freetype/../../../dependencies/flatbuffers/../fplbase/jni/../gen/include/texture_atlas_generated.h
[arm64-v8a] Compile++ : flatui <= flatui.cpp
[arm64-v8a] Compile++ : flatui <= flatui_common.cpp
[arm64-v8a] Compile++ : flatui <= flatui_serialization.cpp
[arm64-v8a] Compile++ : flatui <= font_buffer.cpp
[arm64-v8a] Compile++ : flatui <= font_manager.cpp
[arm64-v8a] Compile++ : flatui <= font_systemfont.cpp
[arm64-v8a] Compile++ : flatui <= font_util.cpp
[arm64-v8a] Compile++ : flatui <= glyph_cache.cpp
[arm64-v8a] Compile++ : flatui <= hb_complex_font.cpp
[arm64-v8a] Compile++ : flatui <= hyphenator.cpp
[arm64-v8a] Compile++ : flatui <= micro_edit.cpp
[arm64-v8a] Compile++ : flatui <= script_table.cpp
[arm64-v8a] Compile++ : flatui <= version.cpp
[arm64-v8a] StaticLibrary : libflatui.a
[arm64-v8a] Compile++ : fplbase <= asset_manager.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= gpu_debug_gl.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= input.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= material.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= mesh_common.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= mesh_gl.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= precompiled.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= preprocessor.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= render_target_common.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= render_target_gl.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= renderer_common.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= renderer_gl.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= renderer_hmd_gl.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= shader_common.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= shader_gl.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= texture_common.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= texture_gl.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= type_conversions_gl.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= utilities.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= version.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile : fplbase <= gl3stub.c
[arm64-v8a] Compile++ : fplbase <= async_loader.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= environment_sdl.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= input_sdl.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] Compile++ : fplbase <= renderer_android.cpp
warning: unknown warning option '-Wno-literal-suffix'; did you mean '-Wno-literal-range'? [-Wunknown-warning-option]
1 warning generated.
[arm64-v8a] StaticLibrary : libfplbase.a
[arm64-v8a] Compile++ : fplutil <= android_utils.cpp
error: invalid argument '-std=c99' not allowed with 'C++/ObjC++'
make: *** [obj/local/arm64-v8a/objs/fplutil/src/android_utils.o] Error 1
I'm using the latest ndk r14
D:\study\github\test\flatui>ndk-build
Android NDK: WARNING:D:/study/github/test/flatui/jni/libs/freetype/../../../dependencies/flatbuffers/../flatbuffers/android/jni/Android.mk:FlatBufferTest: non-system libraries in linker flags: -latomic
Android NDK: This is likely to result in incorrect builds. Try using LOCAL_STATIC_LIBRARIES
Android NDK: or LOCAL_SHARED_LIBRARIES instead to list the library dependencies of the
Android NDK: current module
D:/study/github/test/flatui/dependencies/flatbuffers\android\jni\build_flatc.bat cmake D:/study/github/test/flatui/dependencies/flatbuffers
Searching for Visual Studio 20
Searching for Visual Studio 19
Searching for Visual Studio 18
Searching for Visual Studio 17
Searching for Visual Studio 16
Searching for Visual Studio 15
Searching for Visual Studio 14
Generating solution for Visual Studio 14.
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
CMake Error at CMakeLists.txt:3 (project):
Failed to run MSBuild command:
MSBuild.exe
to get the value of VCTargetsPath:
系统找不到指定的文件。
-- Configuring incomplete, errors occurred!
See also "D:/study/github/test/flatui/dependencies/flatbuffers/CMakeFiles/CMakeOutput.log".
make: *** [build_flatc] Error 1
why build android need VS?
I'm using the toolchain 4.9 and have that compilation issue:
dmabin-macbookpro:jni dmabin$ ndk-build APP_ABI=all
[arm64-v8a] Install : libSDL2_empty.so => libs/arm64-v8a/libSDL2_empty.so
install -p /Users/dmabin/Documents/dev/CppIAP/flatui/repo/libs/arm64-v8a/libSDL2_empty.so /Users/dmabin/Documents/dev/CppIAP/flatui/repo/libs/arm64-v8a/libSDL2.so
[arm64-v8a] StaticLibrary : libSDL2.a
[x86_64] Install : libSDL2_empty.so => libs/x86_64/libSDL2_empty.so
install -p /Users/dmabin/Documents/dev/CppIAP/flatui/repo/libs/x86_64/libSDL2_empty.so /Users/dmabin/Documents/dev/CppIAP/flatui/repo/libs/x86_64/libSDL2.so
[x86_64] StaticLibrary : libSDL2.a
[mips64] Compile : webp <= tree.c
/var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s: Assembler messages:
/var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:381: **Error: opcode not supported on this processor: mips64r6 (mips64r6) ulw $31,0($17)'** /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:783: Error: opcode not supported on this processor: mips64r6 (mips64r6)
ulw $5,0($24)'
/var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:1176: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $4,0($25)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:1469: Error: opcode not supported on this processor: mips64r6 (mips64r6)
ulw $6,0($10)'
/var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2130: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $3,0($5)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2202: Error: opcode not supported on this processor: mips64r6 (mips64r6)
ulw $14,0($10)'
/var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2272: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $31,0($14)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2343: Error: opcode not supported on this processor: mips64r6 (mips64r6)
ulw $5,0($24)'
/var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2601: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $6,0($3)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2673: Error: opcode not supported on this processor: mips64r6 (mips64r6)
ulw $24,0($25)'
/var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2744: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $6,0($8)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2817: Error: opcode not supported on this processor: mips64r6 (mips64r6)
ulw $23,0($5)'
/var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:2920: Error: opcode not supported on this processor: mips64r6 (mips64r6)ulw $31,0($23)' /var/folders/fp/ttp_xh810tsbn342c_9_9btr009c3c/T//cc0797CW.s:3722: Error: opcode not supported on this processor: mips64r6 (mips64r6)
ulw $2,0($24)'
make: *** [/Users/dmabin/Documents/dev/CppIAP/flatui/repo/obj/local/mips64/objs/webp/src/dec/tree.o] Error 1
From a quick glance I see that text shaping has the following defaults with HarfBuzz:
hb_buffer_set_direction(harfbuzz_buf_, HB_DIRECTION_LTR);
hb_buffer_set_script(harfbuzz_buf_, HB_SCRIPT_LATIN);
hb_buffer_set_language(harfbuzz_buf_, hb_language_from_string(text, length));
There's a TODO to make these configurable but are there any plans for more robust i18n support such as BiDi, script detection etc?
flatui/include/flatui/font_buffer.h
Line 598 in 2e363fa
Use --sandbox_debug to see verbose messages from the sandbox
In file included from external/flatui/include/flatui/font_manager.h:23:0,
from ./lullaby/systems/text/flatui/font.h:23,
from lullaby/systems/text/flatui/font.cc:17:
external/flatui/include/flatui/font_buffer.h: In constructor 'flatui::FontVertex::FontVertex(float, float, float, float, float)':
external/flatui/include/flatui/font_buffer.h:598:15: error: 'mathfu::vec3_packed {aka struct mathfu::VectorPacked<float, 3>}' has no member named 'data'
position_.data[0] = x;
^~~~
external/flatui/include/flatui/font_buffer.h:599:15: error: 'mathfu::vec3_packed {aka struct mathfu::VectorPacked<float, 3>}' has no member named 'data'
position_.data[1] = y;
^~~~
external/flatui/include/flatui/font_buffer.h:600:15: error: 'mathfu::vec3_packed {aka struct mathfu::VectorPacked<float, 3>}' has no member named 'data'
position_.data[2] = z;
^~~~
external/flatui/include/flatui/font_buffer.h:601:9: error: 'mathfu::vec2_packed {aka struct mathfu::VectorPacked<float, 2>}' has no member named 'data'
uv_.data[0] = u;
^~~~
external/flatui/include/flatui/font_buffer.h:602:9: error: 'mathfu::vec2_packed {aka struct mathfu::VectorPacked<float, 2>}' has no member named 'data'
uv_.data[1] = v;
^~~~
`
Hello, Sir
I met a build issue when use CMake(version 3.6.2) in Windows, (same result for CMake CMakeLists.txt command)
D:\work\flatui>cmake -G "Visual Studio 14 2015"
-- FlatUI standalone: building tests and sample
-- FPLBase library: not building samples
CMake Error at dependencies/sdl/CMakeLists.txt:2 (message):
Prevented in-tree built. Please create a build directory outside of the
SDL source code and call cmake from there
-- Configuring incomplete, errors occurred!
See also "D:/work/flatui/CMakeFiles/CMakeOutput.log".
Seems that it is a bug in SDL CMakeLists.txt that prevents SDL from being built out-of-tree if the calling project is being built in-tree.
Here is script in SDL CMakeLists.txt
if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_BINARY_DIR})
message(FATAL_ERROR "Prevented in-tree built. Please create a build directory outside of the SDL source code and call cmake from there")
endif()
Do you guys know how to fix it?
BR, nonew
dependencies can not be download correctly
I didn't find any info on iOS support.
Since this is a C++ library, my first, most probably wrong expectation, would be that it does not present a big hurdle to port it to iOS.
Is iOS support planned?
following instructions on https://google.github.io/flatui/flatui_guide_osx.html
git clone --recursive https://github.com/google/flatui.git
cd flatui
cmake -G Xcode .
Result:
-- FlatUI standalone: building tests and samples
-- FPLBase library: not building samples
CMake Error at dependencies/sdl/CMakeLists.txt:2 (message):
Prevented in-tree built. Please create a build directory outside of the
SDL source code and call cmake from there
-- Configuring incomplete, errors occurred!
See also "/Users/xxxxx/dev/flatui/CMakeFiles/CMakeOutput.log".
attempts to follow the instructions re: SDL failure have borne no fruit
It is extremely important to include examples of GUI use for those having the first look. Good example is ImGUI https://github.com/ocornut/imgui.
Hi,
This is not an issue and maybe off-the-topic. While I am learning FlatUI, the documentation ( here: http://google.github.io/flatui) is nice and clean. I wonder how I could generate the same style documentation for my own projects.
I checked the docs folder, it's using doxygen and a python module named 'docs'. I couldn't find this package on the internet. Could anybody tell me where I can find it, or is it an internal module which is not open sourced yet ?
Thanks!
CMake Error at cmake/freetype/CMakeLists.txt:70 (add_library):
Cannot find source file:
flatui/dependencies/flatui/src/libpng_to_stbimage/pngshim.cpp
actually pngshim.cpp
is in flatui/src/libpng_to_stbimage/pngshim.cpp
so the CMakeLists.txt should be changed from
${dependencies_flatui_dir}/src/libpng_to_stbimage/pngshim.cpp
to
${CMAKE_SOURCE_DIR}/src/libpng_to_stbimage/pngshim.cpp
motive doesn't appear in dependencies, despite having cloned with --recursive and cmake fails because it cannot find it.
I have download motive from https://github.com/google/motive and placed in dependencies.
At this point cmake complete successful.
I had to remove -Werror flag because both motive don't compile.
The first because of the loc 200 and 206 in matrix_processor.cpp
That trigger the warning strict-aliasing.
Compiling sample fails because this command at line 262 of main CMakeLists.txt is wrong:
COMMAND ${CMAKE_COMMAND} -E copy
${dependencies_flatui_dir}/sample/serialization/first_menu.json ${flatui_assets_dir}/serialization
COMMAND ${CMAKE_COMMAND} -E copy
${dependencies_flatui_dir}/sample/serialization/second_menu.json ${flatui_assets_dir}/serialization)
Should be
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/sample/serialization/first_menu.json ${flatui_assets_dir}/serialization
COMMAND ${CMAKE_COMMAND} -E copy
${CMAKE_SOURCE_DIR}/sample/serialization/second_menu.json ${flatui_assets_dir}/serialization)
Once compiled I tryed to run any samples, but nothing is displayed and to kill the application I have to kill it with -9.
Any Ideas of what I am doing wrong?
commit 8746f60
a whole bunch of
[ 85%] Building CXX object obj/fplbase/CMakeFiles/fplbase.dir/src/main.cpp.o
/home/giellamo/projects/flatui/dependencies/stb/stb_image.h: In function ‘int stbi__create_png_image_raw(stbi__png*, stbi_uc*, stbi__uint32, int, stbi__uint32, stbi__uint32, int, int)’:
/home/giellamo/projects/flatui/dependencies/stb/stb_image.h:4086:17: error: this ‘for’ clause does not guard... [-Werror=misleading-indentation]
for (k=0; k < nk; ++k)
^
/home/giellamo/projects/flatui/dependencies/stb/stb_image.h:4090:13: note: in expansion of macro ‘CASE’
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.