Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 27 Mar 2006
Offline Last Active Jul 17 2016 12:47 PM

Posts I've Made

In Topic: Software Viewport

02 July 2016 - 05:04 PM

Ok I got it work, apparently I didn't even have to touch anything just change the starting memory. 

In Topic: Software Viewport

02 July 2016 - 04:52 PM

if you're not touching the stride then why not just adjust the height of the coordinate space accordingly and draw lower down?


I would like to be able to change the stride of the world region, sorry I didn't mention that. Maybe I'll put some UI on the sides as well, so I'd like to be able to specify a region that doesn't necessarily have the same stride as the screen. I'm currently trying to get it to work, and I seem to be getting there, but it's too cumbersome as I have to keep track of the memory pointer by hand. 

In Topic: Overloading new

06 June 2016 - 09:58 PM

I see, so it's just basically to avoid these kind of collisions. I"ve never noticed a problem with it (except for right now heh), but all my code is pretty much written by me, I guess it's more of an issue if lots external libraries are used. It's good to know in any case, I'll try to limit the scope from now on.

In Topic: Overloading new

06 June 2016 - 08:57 PM

Yes, that was it. JP to the rescue again ). I wasn't aware that I shouldn't use using in headers? All my files have that, you're saying I should write out the scope to every single std reference? I just threw the allocator in a namespace for now though.

In Topic: Overloading new

06 June 2016 - 08:42 PM

Sorry, I still can't get it to work. So I copied over the allocator from that link but I don't know heads or tails when it comes to templates so I just tired to plug it in directly. I'm not sure if I should have modified it first since the one in the link was made for a map, this is what I have now:

template <class T>
struct allocator { .... } // full definition as copied from above link

//the element that will be in the vector
struct ptrdesc
	void* ptr;
	size_t size;

typedef vector<ptrdesc, allocator<ptrdesc>>  vector_malloc; //is this right?

class ResourceManager

 static vector_malloc m_allocatedPointers;

And what I get is " 'allocator' ambiguous symbol " as an error, what am I doing wrong? 


ed: this is how he shows how to use it:

std::map<std::string, int, std::less<std::string>, JVC::allocator<std::pair<const std::string, int> > > stuff;