First of all, im not really sure how to explain this very well as I am finding it very very strange.
I am trying to draw a grid into a form and have the colours of the grid change if they are...
Type: Posts; User: h3ro
First of all, im not really sure how to explain this very well as I am finding it very very strange.
I am trying to draw a grid into a form and have the colours of the grid change if they are...
How do you deference a pointer stored in a boost::variant variable?
typedef boost::variant< bool*, int*, unsigned int*, float*> parameterList;
Thanks,
That fixed it. I thought rand() might be bassed on the time/tick of the computer and that was why multiple threads executing at the same time would generate the same number. Thanks for pointing out...
What do you mean?
float Math::RandFloat()
{
return (float)rand() / (float)RAND_MAX;
}
Yeah, as far as I know. I commented out as much as possible ending up with the following code, which still produces the error/bug.
bool RenderSingleBucket(unsigned int threadId)
{
float r =...
I did not, but adding it did not make a difference unfortunately.
Hallo,
I am trying to make my program take advantage of all the threads on my pc but im running into a strange problem. In the function used by the threads I do (float)rand() / (float)RAND_MAX and...
The reason im using arrays is because thats the data structure the gpu allows me to copy into it. A linked list would be perfect for my needs, but there is no way of copy it to the gpu as far as I...
That would work, but it means that I would have to copy the array very frequently, and the array could potentially be huge (100k instances) so its not an optimal solution. Thanks for the suggestion,...
That would mean that my structure would have to be a class and have more data in it, or am I missing something?
The problem here is that I cant make the structure a class and I cant add any more...
Laserlight: C# does not pass structures as references and I cant use unsafe code.
Sipher: Im not sure if I understand, could you give a quick example or elaborate a bit further?
Yes, the program is written in C#
Edit:
Im so sorry, I though I was in the c# part of the forum when I posted this but that must have been in a different tab. Could you please move it?
Hallo,
I am having an array of structures that I want to be able to abstract behind a helper class. I want to be able to create a way of referencing the instance of the structure inside of the...
Hallo,
Im looking for the correct syntax for creating an attribute in c# with just a get accessor.
Something along the line of this:
public int ID { get;}
Is that possible or do I have to...
Hallo,
Is it possible to cast from an object to an other type where the type is unknown at compile time?
Something like this
int orgValue = 10;
object obj = orgValue;
int final =...
Hallo,
I am in the process of wrapping up a project for Mac and PC and I need to make an installer for it. I made the PC version of the installer using NSIS, but after burning it to a CD the...
Thanks to both of you for your reply. Im starting to see that this is probably not something c# is encouraging you to do.
I got a solution working, but its very nasty and I was wondering if...
Hallo,
I am trying to build a generic debug class for printing information about different objects to the screen, and also change them if wanted, but I am having some problems with adding the...
It is a pre-existing program that uses memcpy() on some of its struct and I need to modify the struct, and adding a std::vector would be the easiest for me, but I could not get it to work :)
Well, as you probably know you cant always make all the decisions yourself.
The program was already using memcpy to copy the data around and I didnt really want to rewrite it (its a biiiig program)
I was playing around with using memcpy to copy a structure that contains a vector, but I could not get it to work. Im guessing its not possible as the memcpy probably just copies the pointer inside...
Hey,
Is there anywhere I can go to get an objective overview over how fast different languages are compared to each other? Im not looking for what langues are the fastest for certien operations,...
Always wanted to use python, guess this is the time. Thanks :)
Which version on python is the one with best support, Or should I just get the latest one?
And, what is a good IDE for it? If you...
Hey.
I am looking to extract some data from a few websites for the purpose of some statistics work. I know I could do that by looking that the websites in question and then copy past the...
Hey,
I have a picturebox that I draw a few lines on top of. But right now it does not look very nice as sometimes the the lines are not rendered(the background picture is) and the lines flicker a...