Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 30 Dec 2000
Offline Last Active Yesterday, 09:16 PM

Posts I've Made

In Topic: multiple source files and global varaibles.......................

04 August 2014 - 09:10 AM

My problem is with my global variables which I was trained to utilize the most.

I'm curious what you mean by this. I've only heard train and globals used together when saying you should train yourself to not use them.

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

27 July 2014 - 07:52 PM



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.




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
    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";
        std::cout << "Empty!\n";

int main() {
    Planet_vctr 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.