sphair / clanlib Goto Github PK
View Code? Open in Web Editor NEWClanLib is a cross platform C++ toolkit library.
License: Other
ClanLib is a cross platform C++ toolkit library.
License: Other
Was trying to get super methane brothers to compile from the dead again.
https://sourceforge.net/projects/methane/
However it needs ClanLib 2.2 , as clanlib.org as down currently there probably no hope this game building from source again. Options are to patch methane brothers to use more recent version of clanlib.
Couldn't find an email address to send this too.
Web server is showing Ubuntu Apache "It Works!" page. Misconfigured?
See here: https://imgur.com/3hD02xO
Where can one get old versions of clanlib
like 1.x or 2.x? Thanks.
In https://github.com/sphair/ClanLib/blob/master/Sources/GL/GL3/gl3_shader_object_provider.cpp
The following code is suspect. Nothing deletes array_sources and array_source_lengths (excluding the caught exception)
In addition, Visual Studio code analysis says "Buffer overrun while writing to array_source_length" in the for loop, but it all looks good to me
GLchar ** array_sources = nullptr;
GLint *array_source_lengths = nullptr;
try
{
array_sources = new GLchar*[sources.size()];
array_source_lengths = new GLint[sources.size()];
for (std::vector<std::string>::size_type i = 0; i < sources.size(); i++)
{
array_source_lengths[i] = sources[i].length();
array_sources[i] = (GLchar*)sources[i].c_str();
}
glShaderSource(handle, sources.size(), (const GLchar**)array_sources, array_source_lengths);
}
catch (...)
{
delete[] array_source_lengths;
delete[] array_sources;
throw;
}
Hello, Can I move without any change ClanLib's RSA class and dependencies to my project, Does it support ClanLib's license or can i use it only as static lib?
Using clan::Path to draw a rounded box does not work with OpenGL on an Intel GPU
The issue is caused with the clan::Path internals incorrectly uploading the graphics. The completion status of texture upload that's using previous cached transfer buffers is not checked. Thus we are modifying the buffer before the previous buffer was uploaded
It works using the Direct3D target. It works on all targets with Nvidia GPU's
The fix is to not cache transfer buffers, and instead recreate them.
See patch
patch.txt
Is anyone else having problems with clanSound on Linux? It doesn't play any audio on my Linux Mint.
Tested with Examples/Sound/Sound.
There is an issue with clan::GameTime.
If you sum 30 seconds of samples from GameTime::get_time_elapsed_ms(), this does not equal GameTime::get_current_time_ms()
Demonstrated by:
game_time.update();
static int total = 0;
total += game_time.get_time_elapsed_ms();
printf("%d\n", (int) ( game_time.get_current_time_ms() - total));
There is a fault with the usage of time_elapsed_ms_microsecond_adjustment.
This can be trivially fixed by having a "updated_current_time_ms" variable and the elapsed time is the delta from before it was set.
Unfortunately I currently don't have time to fix it.
i can't compile the MapMode example. it fails with
g++ -I Sources -I ./
pkg-config --cflags clanApp-4.1 clanDisplay-4.1 clanCore-4.1 clanGL-4.1 clanUI-4.1
-pthread -c Sources/options.cpp -o Sources/options.o
g++ -I Sources -I ./pkg-config --cflags clanApp-4.1 clanDisplay-4.1 clanCore-4.1 clanGL-4.1 clanUI-4.1
-pthread -c Sources/app.cpp -o Sources/app.o
g++ -I Sources -I ./pkg-config --cflags clanApp-4.1 clanDisplay-4.1 clanCore-4.1 clanGL-4.1 clanUI-4.1
-pthread -c ../../ThemeAero/Sources/theme.cpp -o ../../ThemeAero/Sources/theme.o
../../ThemeAero/Sources/theme.cpp: In static member function ‘static std::shared_ptrclan::ListBoxView Theme::create_listbox()’:
../../ThemeAero/Sources/theme.cpp:237:55: error: cannot bind non-const lvalue reference of type ‘std::shared_ptrclan::ScrollBarView&’ to an rvalue of type ‘std::shared_ptrclan::ScrollBarView’
237 | initialize_scrollbar(listbox->scrollbar_x_view(), true);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../ThemeAero/Sources/theme.cpp:52:72: note: initializing argument 1 of ‘static void Theme::initialize_scrollbar(std::shared_ptrclan::ScrollBarView&, bool)’
52 | void Theme::initialize_scrollbar(std::shared_ptrclan::ScrollBarView &scrollbar, bool isHorizontal)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
../../ThemeAero/Sources/theme.cpp:238:55: error: cannot bind non-const lvalue reference of type ‘std::shared_ptrclan::ScrollBarView&’ to an rvalue of type ‘std::shared_ptrclan::ScrollBarView’
238 | initialize_scrollbar(listbox->scrollbar_y_view(), false);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~
../../ThemeAero/Sources/theme.cpp:52:72: note: initializing argument 1 of ‘static void Theme::initialize_scrollbar(std::shared_ptrclan::ScrollBarView&, bool)’
52 | void Theme::initialize_scrollbar(std::shared_ptrclan::ScrollBarView &scrollbar, bool isHorizontal)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
make: *** [../../Makefile.conf:23: ../../ThemeAero/Sources/theme.o] Error 1`
g++ 11.2.0 is used
The code below creates window, which is not always on top
`
// Set the window description
clan::DisplayWindowDescription desc_window;
desc_window.set_title("Motion Learning");
desc_window.set_topmost();
desc_window.set_popup_window();
desc_window.set_allow_resize(false);
desc_window.set_layered(true);
desc_window.show_caption(false);
desc_window.set_size(clan::Size(1792, 828), false);
// Open the windows
window = clan::DisplayWindow(desc_window);
`
It would be nice if one could compile this library as a dynamic library.
The payment for the dedicated server hosting the ClanLib web pages will not be renewed in February 2018 (due to inactivity).
Links to "clanlib.org" in the source should be modified to point to : https://github.com/sphair/ClanLib
Hello everyone! I am working on implementing a tool to assess the complexity of CPU architecture porting. It primarily focuses on RISC-V architecture porting. In fact, the tool may have an average estimate of various architecture porting efforts.My focus is on the overall workload and difficulty of transplantation in the past and future,even if a project has already been ported.As part of my dataset, I have collected the clanlib project. I would like to gather community opinions to support my assessment. I appreciate your help and response! Based on scanning tools, the porting complexity is determined to be simple, with a small amount of code related to the CPU architecture in the project. Is this assessment accurate?Do you have any opinions on personnel allocation and consumption time? I look forward to your help and response.
For my compile the Reference/html/Core.html isn't well formated. All Text on this site is in a < pre > box. my doxygen version was 1.8.17. I can't explain why.
Clanlib 4.1.0 fails to build on aarch64.
Error log:
[ 183s] System/detect_cpu_ext.cpp: In function 'detect_cpu_extension':
[ 183s] System/detect_cpu_ext.cpp:81:4: error: impossible constraint in 'asm'
[ 183s] 81 | __cpuid((int*)cpuinfo, 0x1);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:86:4: error: impossible constraint in 'asm'
[ 183s] 86 | __cpuid((int*)cpuinfo, 0x80000000);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:90:4: error: impossible constraint in 'asm'
[ 183s] 90 | __cpuid((int*)cpuinfo, 0x80000001);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:95:4: error: impossible constraint in 'asm'
[ 183s] 95 | __cpuid((int*)cpuinfo, 0x80000000);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:99:4: error: impossible constraint in 'asm'
[ 183s] 99 | __cpuid((int*)cpuinfo, 0x80000001);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:104:4: error: impossible constraint in 'asm'
[ 183s] 104 | __cpuid((int*)cpuinfo, 0x80000000);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:108:4: error: impossible constraint in 'asm'
[ 183s] 108 | __cpuid((int*)cpuinfo, 0x80000001);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:113:4: error: impossible constraint in 'asm'
[ 183s] 113 | __cpuid((int*)cpuinfo, 0x1);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:118:4: error: impossible constraint in 'asm'
[ 183s] 118 | __cpuid((int*)cpuinfo, 0x1);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:123:4: error: impossible constraint in 'asm'
[ 183s] 123 | __cpuid((int*)cpuinfo, 0x1);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:128:4: error: impossible constraint in 'asm'
[ 183s] 128 | __cpuid((int*)cpuinfo, 0x1);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:134:4: error: impossible constraint in 'asm'
[ 183s] 134 | __cpuid((int*)cpuinfo, 0x80000000);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:138:4: error: impossible constraint in 'asm'
[ 183s] 138 | __cpuid((int*)cpuinfo, 0x80000001);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:143:4: error: impossible constraint in 'asm'
[ 183s] 143 | __cpuid((int*)cpuinfo, 0x1);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:148:4: error: impossible constraint in 'asm'
[ 183s] 148 | __cpuid((int*)cpuinfo, 0x1);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:153:4: error: impossible constraint in 'asm'
[ 183s] 153 | __cpuid((int*)cpuinfo, 0x80000000);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:157:4: error: impossible constraint in 'asm'
[ 183s] 157 | __cpuid((int*)cpuinfo, 0x80000001);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:162:4: error: impossible constraint in 'asm'
[ 183s] 162 | __cpuid((int*)cpuinfo, 0x1);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:167:4: error: impossible constraint in 'asm'
[ 183s] 167 | __cpuid((int*)cpuinfo, 0x1);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:172:4: error: impossible constraint in 'asm'
[ 183s] 172 | __cpuid((int*)cpuinfo, 0x1);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:177:4: error: impossible constraint in 'asm'
[ 183s] 177 | __cpuid((int*)cpuinfo, 0x80000000);
[ 183s] | ^
[ 183s] System/detect_cpu_ext.cpp:181:4: error: impossible constraint in 'asm'
[ 183s] 181 | __cpuid((int*)cpuinfo, 0x80000001);
[ 183s] | ^
IODevice
is written in С 32bits style with int
to use for indicate the amounts instead size_t, to return -1
as error. It still works but not safety on a 64-bit architecture.
I would like to hear the developers' opinion - will accepted the commit that change int
to size_t
and -1
to SIZE_MAX
?
In the clanlib's architecture is widely practiced that behind the class there is an implementation. This speeds up the compilation of the library itself at the expense of the optimality of the final code. Is it generally justified for libraries?
This seems counter-intuitive
auto result = clan::PathHelp::get_basepath("c:\ABC\DEF", PathHelp::path_type_file);
result --> "\ABC". The c: is chopped off.
According to this code:
#include <ClanLib/core.h>
We should move Sources/API
dir to include/ClanLib
dir. With this change we can build project that depend on ClanLib out of the box without doing anything. This will make compilation significantly easier.
Without it we should configure it with configure.exe
before (if we don't then we'll fail to build)
I can make a PR with it. I just need to know what I need to change additionally, since it seems that just moving the folder is not enough. (we should change the build scripts)
The name in Setup/Unix/pkgconfig/clanXML.pc.in is false. on line 8 is written: Name: clanUI
. What is not true..
The library understands separate styles for the top, right, bottom and left lines of the border, different types of fill (groove, ridge, etc.), but the drawing is implemented primitively - the same as top border and only solid.
The existing code of Sources\UI\Style\style_background_renderer.cpp:
void StyleBackgroundRenderer::render_border()
{
int num_layers = style.array_size("background-image");
if (!get_layer_clip(num_layers - 1).is_keyword("border-box"))
return;
StyleGetValue style_top = style.computed_value("border-top-style");
if (style_top.is_keyword("solid"))
{
Colorf color = style.computed_value("border-top-color").color();
if (color.a > 0.0f)
{
auto border_points = get_border_points();
auto padding_points = get_padding_points(border_points);
Path border_path = get_border_stroke_path(border_points, padding_points);
border_path.fill(canvas, Brush(color));
}
}
}
It is necessary to implement:
thin
, medium
, thick
, dotted
, dashed
, double
, groove
, ridge
, inset
, outset
).Maybe someone has already done this in his code and just need to copy-paste?
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.