Sorry, it is too many to fix them quickly now, so here is the list. Float to int conversions are quite slow. If you can't avoid them and are fine with rounding instead of truncation, you can use ftoi_r from utMath.h for better performance.
Code:
Warning 1 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 120
Warning 2 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 121
Warning 3 warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 85
Warning 4 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 145
Warning 5 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 154
Warning 6 warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\checkbox.cpp 135
Warning 7 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 120
Warning 8 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 121
Warning 9 warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 85
Warning 10 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 145
Warning 11 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 154
Warning 12 warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\extension.cpp 334
Warning 13 warning C4267: 'initializing' : conversion from 'size_t' to 'stbtt_int32', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\stb_truetype.h 1769
Warning 14 warning C4244: '=' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\fontfileresource.cpp 162
Warning 15 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 120
Warning 16 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 121
Warning 17 warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 85
Warning 18 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 145
Warning 19 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 154
Warning 20 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 120
Warning 21 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 121
Warning 22 warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 85
Warning 23 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 145
Warning 24 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 154
Warning 25 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 120
Warning 26 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 121
Warning 27 warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 85
Warning 28 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 145
Warning 29 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 154
Warning 30 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 84
Warning 31 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 109
Warning 32 warning C4244: 'argument' : conversion from 'int' to 'float', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 150
Warning 33 warning C4267: 'argument' : conversion from 'size_t' to 'Horde3DGUI::ElementHandle', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 308
Warning 34 warning C4267: 'return' : conversion from 'size_t' to 'Horde3DGUI::ElementHandle', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 309
Warning 35 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 383
Warning 36 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 383
Warning 37 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 385
Warning 38 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 385
Warning 39 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 390
Warning 40 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 390
Warning 41 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 391
Warning 42 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 391
Warning 43 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 406
Warning 44 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 406
Warning 45 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 408
Warning 46 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 408
Warning 47 warning C4018: '>' : signed/unsigned mismatch c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 454
Warning 48 warning C4267: 'argument' : conversion from 'size_t' to 'uint32', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 488
Warning 49 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 509
Warning 50 warning C4244: 'argument' : conversion from 'float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 509
Warning 51 warning C4244: '=' : conversion from 'double' to 'float', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 534
Warning 52 warning C4244: '=' : conversion from 'double' to 'float', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 535
Warning 53 warning C4244: '=' : conversion from 'double' to 'float', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 539
Warning 54 warning C4244: '=' : conversion from 'double' to 'float', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 540
Warning 55 warning C4244: '=' : conversion from 'double' to 'float', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 544
Warning 56 warning C4244: '=' : conversion from 'double' to 'float', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 545
Warning 57 warning C4244: '=' : conversion from 'double' to 'float', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 549
Warning 58 warning C4244: '=' : conversion from 'double' to 'float', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\gui.cpp 550
Warning 59 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 120
Warning 60 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 121
Warning 61 warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 85
Warning 62 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 145
Warning 63 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 154
Warning 64 warning C4800: 'int' : forcing value to bool 'true' or 'false' (performance warning) c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guielement.cpp 166
Warning 65 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 120
Warning 66 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 121
Warning 67 warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 85
Warning 68 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 145
Warning 69 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 154
Warning 70 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 120
Warning 71 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 121
Warning 72 warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 85
Warning 73 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 145
Warning 74 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 154
Warning 75 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 120
Warning 76 warning C4244: '=' : conversion from 'const float' to 'int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\screenposition.h 121
Warning 77 warning C4267: '=' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 85
Warning 78 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 145
Warning 79 warning C4267: 'initializing' : conversion from 'size_t' to 'unsigned int', possible loss of data c:\users\nicolas\desktop\mgottschlag-horde3dgui-4a4e495\extensions\gui\source\guiskinresource.h 154
Warning 80 warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data c:\Users\Nicolas\Desktop\mgottschlag-Horde3DGUI-4a4e495\Extensions\GUI\Sample\app.cpp 355
Warning 81 warning C4244: 'argument' : conversion from 'double' to 'float', possible loss of data c:\Users\Nicolas\Desktop\mgottschlag-Horde3DGUI-4a4e495\Extensions\GUI\Sample\app.cpp 355
Thanks for your feedback, that's always welcome.
phoenix64 wrote:
- Creating unique names for dynamically created resources (also added to the outside API for manually creating resources on the user side) like "internal_resource_124521".
We have something like that for resource cloning: if you specify an empty name string, a unique name is generated. Something similar could make sense for addResource.
phoenix64 wrote:
- Texture mipmaps - can they somehow automatically produced? I didn't see any solution when I created the font texture, while I would expect it to automatically generate smaller mipmaps (that OpenGL variable is set somewhere for mipmap textures), I had to manually create all mipmaps for mipmapping to work properly. Probably my mistake, please someone help me there.
At the moment we are either loading them directly from dds or have GL generate them (GL_GENERATE_MIPMAP). But it makes definitely sense to have our own mip generation function in the future.
phoenix64 wrote:
- Extensions currently are not what they should be - they usually have to be compiled into the engine as horde3ds internals are usually hidden to the outer world. This is a good thing, but it greatly limits external plugins. I currently don't see any real workaround, to me exporting the internals and adding a version check to be used by plugins is the only thing that could work.
We had this discussion before and my standpoint is that extensions are not meant as plugins (more like OGL or phpbb extensions, not like Photoshop plugins) and for a development library I don't see any advantage from dynamically linking add-ins. Extensions as DLLs would be slower (less global optimizations and function inlining), have memory allocation issues (freeing memory allocated in another DLL does not work) and would be unsafer (users can exchange extensions for cheating). They would only be marginally easier to use but cause major headaches under Windows with how to expose all classes (you can't pass most STL containers across DLLs). And they would compromise the encapsulation and abstraction that we have now (the strict separation between internal and external interface). Did I miss anything?
phoenix64 wrote:
Next on my TODO list are now finally edit boxes, modal widgets, list boxes, GUI layout resources (like scene graph resources).
Looking forward to that. Keep up the great work!