Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 26 Jan 2007
Offline Last Active Mar 11 2013 03:54 AM

Posts I've Made

In Topic: Pointers invalid between C++ and C#.

26 January 2013 - 01:35 PM

Oh shit, there my education went out the window. You think you are learnig something, then just: "MINDBLOWN. You dont know anyting. Study harder, douchbag.", or something like that.


Well, seems like it will be back to the drawing board. But, as it is an editor, i guess I can have it not som optimized, i guess... (shiver through my body).


But dudes, thanks for the quick reply. Very helpful.

In Topic: Loading and caching resources

23 November 2012 - 06:32 AM

I don't know how you store your texture pointers, but with an string identifier, i guessing map<string, TexturPtr>. This will need to be extended to support additional data to use as the identifier.

Here u can implement a functor to create your own comparison function. Its easy to create, you can variate between different types, and is manageble. The problem that occurs is that that you will need to implement a key-struct for each type and combination. But as you currently need to create a load function for each resource type, this I guess will be a minor problem.

struct TextureKey
   string name;   //texture name
   int sizeX, sizeY; //texture size
   bool operator<(const TextureKey &a, const TextureKey &b)
	  return std::strcmp(a.name, b.name) < 0 &amp;&amp; a.sizeX == b.sizeX &amp;&amp; a.sizeY == b.sizeY;


map<TextureKey, TexturePtr> mTexturePtrs;

(Have not tried the above code, but it looks right :) )

In Topic: Reading float 32 texture values

07 May 2007 - 10:10 PM

Thnx alot jelly, it did the trick :).
Greate work with the moderating job btw, keep up the good work.

In Topic: Shadowmap problems!!

26 April 2007 - 10:17 PM

First, I have to thank you for the replies, it surly will be helpful.

Just to answer your question MJP, the 500 in the shader is meant to be my current ZFar. (Forgot to change that bit before posting, was just a experiment :D).

And Lifepower, your way to create the shadow map is used in many different papers and tutorials, but it does, as you say, result in a totally white shadowmap. I can't really connect this in my head to understand how this work, and it dosn't match the general ide of a shadowmap where you can see the depth difference in a greyscale texture. So when I saw the difference by deviding the depth with the ligths ZFar, i thought I was on the right track. If you could explain this totally white shadw map and how this work, I would be very greatful.

Another thing though. Asked a friend about this, and he said I should check the size of my Z-depth buffer to match the texture. Because I use the whole window for rendering, does he mean that I should match the size of the texture to my scren size??

And if so, my texture will not be in the 2^x size, wich I think it need to be, or is it just me thinking in the wrong direction??

Thanks again for the replies, and sorry for the expanding with extra questions :D.

In Topic: Smoothing vertecies on heightmap

15 April 2007 - 11:01 PM

Darn, you're right guys.

Ofcourse that is my problem. Fuck, been working on ths thing for over 3 months, and got deadline in 4 weeks, and at the moment my keyboard are recovering from water damage. Well, will be looking into this as soon as my keyboard has recovered, and i thank you for stating the obvious.

Thanks a lot again.