glm::i64vec2 copy constructor suddenly starts corrupting stuff

I find this really odd. Whenever I copy a glm::i64vec2 it gets corrupted.

But if i do just this line:

glm::i64vec2 copy(glm::i64vec2(1, 1));

In my main, it just works.
I have deleted all object files and rebuilt the program from scratch.. any ideas what might be wrong?

The only one I can think of is that I have included headers in different order in different places and that somehow messed this up.

What I really should use here is const reference, but still this scares the crap out of me. One of these could easily stay hidden as a bug and cause lots of headache for me.

Fine

!Fine

I just found another bug this caused. This time it happens inside a single class.

This fails, but the same works in main

bool test(glm::i64vec2 p_worldPos)
{
  return p_worldPos.x == 1;
}

void QuadTree::getObjectsHitInPriority(glm::i64vec2 const & p_worldPos, std::vector<Object*> & p_objects)
{
  test(p_worldPos);

Um, I don’t know what this means, but the following observation has been made. In my program main.cpp this fails

#include <glm/glm.hpp>
#include <iostream>

struct whatthehell
{
    bool test(glm::u64vec2 p_test)
    {
        return p_test.x == 1;
    }
};

int main(int argc, char ** argv)
{
    whatthehell hell;

    if (hell.test(glm::u64vec2(1, 1)) == false)
    {
        std::cout << "What the hell\n";
    }

    return 0;
}

read more

Full consumer launch for $99 Samsung GearVR headset coming in November

(credit: Samsung)

On Thursday, Samsung Senior Vice President Peter Koo took the stage at the second annual Oculus Connect virtual reality conference to announce the full consumer launch for its GearVR headset, slated to launch in November 2015 for $99.

The news follows last year’s launch of the early “Innovator Edition” for the headset, which received a small updated earlier this year. All GearVR headsets require a Samsung phone to act as the display and processor, as well as providing additional motion sensing data. The consumer version of the Gear VR will support “every 2015 Samsung handset,” Koo said, including the Galaxy Note 5, S6, S6 Edge, and S6 Edge+.

read more

Full consumer launch for $99 Samsung GearVR headset coming in November

(credit: Samsung)

On Thursday, Samsung Senior Vice President Peter Koo took the stage at the second annual Oculus Connect virtual reality conference to announce the full consumer launch for its GearVR headset, slated to launch in November 2015 for $99.

The news follows last year’s launch of the early “Innovator Edition” for the headset, which received a small updated earlier this year. All GearVR headsets require a Samsung phone to act as the display and processor, as well as providing additional motion sensing data. The consumer version of the Gear VR will support “every 2015 Samsung handset,” Koo said, including the Galaxy Note 5, S6, S6 Edge, and S6 Edge+.

read more

Foreign key constraints and bridging tables

I am currently working with 6 tables: users, categories, videogames, videogames_categories_bridge, users_favorites, users_dislikes. I am trying to layout the tables in the best manner possible to show video games preference for user(see below example). However, I am getting a foreign key constraint error when creating the tables. How could I achieve(if possible) the below with my current tables schema? Also, Is there a way in avoiding that both values inserted(favorite and dislike) are marked true for a game? SQLFIDDLE

Example: Show all video game preference for an userid 569723

game_id  category_id   game_name               category_name    favorite    dislike
-------  -----------   ----------------        -------------    ---------   --------
840832      1000     'counter-strike'               fps             1         NULL
779343      1000     'call of duty modern warfare'  fps             1         NULL
684244      2000     'minecraft'                  adventure        NULL       NULL
983565      2000     'assassin\'s creed syndicate'adventure        NULL       NULL
858168      3000     'need for speed - rivals'    racing           NULL       NULL
819837      4000     'mortal kombat x'           fighting          NULL       NULL
634266      5000     'street fighter v'          fighting          NULL       NULL

read more