Search Results

Search found 4 results on 1 pages for 'user1095108'.

Page 1/1 | 1 

  • Avoid double compression of resources

    - by user1095108
    I am using .pngs for my textures and am using a virtual file system in a .zip file for my game project. This means my textures are compressed and decompressed twice. What are the solutions to this double compression problem? One solution I've heard about is to use .tgas for textures, but it seems ages ago, since I've heard that. Another solution is to implement decompression on the GPU and, since that is fast, forget about the overhead.

    Read the article

  • FPS camera specification

    - by user1095108
    I remember I once composed a FPS viewing transformation, as a composition of 3 rotations, each with an angle as a parameter. The first angle specified the left/right rotation around the y-axis, the second angle the up/down rotation around the x-axis, and the third around the z-axis. The viewing transformation was therefore specified by 3 angles. Naturally, this transformation had a gimbal lock, depending in what order the transformation were performed. What should I look at to derive my viewing transformation without the gimbal lock? I know the "lookAt" method already, but I consider that cumbersome. EDIT: MY first guess is to do the first 2 transformations to get a viewing direction and then the axis-angle rotation on this axis.

    Read the article

  • clang does not compile but g++ does

    - by user1095108
    Can someone help me with this code: #include <type_traits> #include <vector> struct nonsense { }; template <struct nonsense const* ptr, typename R> typename std::enable_if<!std::is_void<R>::value, int>::type fo(void* const) { return 0; } template <struct nonsense const* ptr, typename R> typename std::enable_if<std::is_void<R>::value, int>::type fo(void* const) { return 1; } typedef int (*func_type)(void*); template <std::size_t O> void run_me() { static struct nonsense data; typedef std::pair<char const* const, func_type> pair_type; std::vector<pair_type> v; v.push_back(pair_type{ "a", fo<&data, int> }); v.push_back(pair_type{ "b", fo<&data, void> }); } int main(int, char*[]) { run_me<2>(); return 0; } clang-3.3 does not compile this code, but g++-4.8.1 does, which of the two compiler is right? Is something wrong with the code, as I suspect? The error reads: a.cpp:32:15: error: no matching constructor for initialization of 'pair_type' (aka 'pair<const char *const, func_type>') v.push_back(pair_type{ "a", fo<&data, int> }); ^ ~~~~~~~~~~~~~~~~~~~~~~~ a.cpp:33:15: error: no matching constructor for initialization of 'pair_type' (aka 'pair<const char *const, func_type>') v.push_back(pair_type{ "b", fo<&data, void> }); ^ ~~~~~~~~~~~~~~~~~~~~~~~~

    Read the article

  • qmake library reordering

    - by user1095108
    I put this into a qmake file: QTPLUGIN += component LIBS += -L../lib -lmodule -lcomponent -lnetworking But qmake reorders the libraries behind my back: g++ -m64 -Wl,-O1,--sort-common,--as-needed,-z,relro -o testb .obj/constants.o .obj/main.o .obj/qrc_application.o -L/usr/lib -L../lib -lmodule -lnetworking -lcomponent -lQtGui -lQtNetwork -lQtCore -lpthread Probably because component is a static plugin. But it has a static dependency on the networking library and hence the reordering causes a link error. It is a static dependency and hence is ok in my opinion. How to work around this? I'm using qt 4.8.1.

    Read the article

1