Jump to content

  • Log In with Google      Sign In   
  • Create Account


nobodynews

Member Since 30 Dec 2000
Online Last Active Today, 09:48 AM
****-

Posts I've Made

In Topic: Do GL and DX 'go through' the Windows GDI?

27 July 2014 - 07:52 PM

http://en.wikipedia.org/wiki/Graphics_Device_Interface#Windows_Vista

 

In Windows Vista, all Windows applications including GDI and GDI+ applications run in the new compositing engine, Desktop Window Manager which is built atop the Windows Display Driver Model.

 

http://en.wikipedia.org/wiki/DirectX

 

Direct3D 9Ex, Direct3D 10, and Direct3D 11 are only available for Windows Vista and newer because each of these new versions was built to depend upon the new Windows Display Driver Model that was introduced for Windows Vista

 

So, for at least Windows Vista and newer operating systems, GDI and DirectX are built on top of the Windows Display Driver Model, DirectX more directly. I'm not sure what Windows did before Vista, but I'm almost 100% certain DirectX bypassed GDI.


In Topic: How are the trigonometric functions computed?

23 July 2014 - 09:21 PM

Or you could go really old-school and try and figure out Ptolemy's Table of Chords. I only got to the first paragraph of the Special Angles section before I decided I have better things to do.


In Topic: C++ smart pointer usage

17 July 2014 - 11:29 PM

I'm not sure what you did that 'broke all of [your] functions that had that vector being passed in', but you should be able to just pass in the std::vector of std::unique_ptrs as a reference. I tested it to be sure (and utilized typedefs; I'd suggest doing the same if you'd like fewer nested brackets):

#include <iostream>
#include <memory>
#include <vector>

class Planet
{
public:
    int X;
    int Y;
};

typedef std::unique_ptr<Planet> Planet_ptr;
typedef std::vector<Planet_ptr> Planet_vctr;

void Function1(Planet_vctr &alteredVector)
{
    Planet_ptr p(new Planet);

    alteredVector.push_back( move(p) );
}

void Function2(const Planet_vctr &constVector)
{
    if (constVector.size())
    {
        std::cout << "Not Empty!\n";
    }
    else
    {
        std::cout << "Empty!\n";
    }
}


int main() {
    Planet_vctr aVector;
    Function2(aVector);
    Function1(aVector);
    Function2(aVector);
}

Without delving into how you're using the pointers, I wouldn't be able to offer a suggestion on whether to use unique_ptr or shared_ptr. I found this explanation from Stack Overflow fairly coherent that might help you.


In Topic: remapping the keyboard (esp {} () )

09 June 2014 - 04:39 PM

if you dont like to answer me dont answer not a problem, byt do not spamm me with useles and not interesting pseudo- philosophy

If you don't like the answers you get not a problem, but do not spam the boards with useless and not interesting pseudo-philosophy yourself. You could just as easily ignore answers that you don't like, but instead you're wasting your time arguing with people about how they shouldn't respond as they see fit because you want to ask questions as you see fit. IMO that's kind of hypocritical of you.

In Topic: Why do large engines use their own string class

05 June 2014 - 10:12 AM

The big stuff I can see in their string class that doesn't exist in the std::string class is their class is reference counted and it has a lot of helper functions that don't exist in std::string, like comparisons that don't care about case. So they apparently felt the way std::string dealt with copying strings was too costly and they also wanted to perform a lot of actions that weren't built into std::string.

PARTNERS