Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - AcidGame

Pages: [1] 2 3 ... 16
1
Coding / Re: Programming Q&A
« on: April 12, 2009, 02:17:52 am »
Assuming that $connector is a PDO object... Try this instead:
Code: [Select]
//Everything is good, update the database
$query = "UPDATE news SET title = ".$newstitle.", post = ".$newspost.", date = ".$date." WHERE id = ".$id." LIMIT 1 ";
$result = $connector->exec($query);

if ($result==1)
{
header("location:index.php");
}
else
{
$error = "Error, could not insert into database!".$result.$id."";
header("location: index.php?action=error&message=".$error."");
}

2
Coding / Re: Black Alpha Channel (OpenGL)
« on: March 04, 2009, 01:40:14 pm »
Well, that works too... Nice catch, Xfixium!

3
Coding / Re: Black Alpha Channel (OpenGL)
« on: March 04, 2009, 12:50:23 am »
I think there are a few things that could be going wrong...
  • FreeImage_GetBits does not contain alpha information.
  • FreeImage_GetBits does not contain alpha information in the format that OpenGL expects.*
  • The image was not saved with an actual alpha channel.

Unfortunately I cannot really suggest a solution to your problem because I am not an expert with the FreeImage library. I would recommend researching the format of the bits in the buffer pointed to by FreeImage_GetBits and using the information below to figure out if it is a problem with your program, the FreeImage library, or the image itself.

*Using GL_RGBA and GL_UNSIGNED_BYTE for glTexImage2D means that every unsigned byte in the buffer you pass to glTexImage2D will contain two bits for red/green/blue/alpha, in that order.

4
Coding / Re: OpenGL running slow as !@#$%
« on: February 15, 2009, 07:48:38 am »
I don't know your project so perhaps I am way off. You seem to be calling CTileSheet::createTile to display your sprites. Why, exactly, are you also loading the exact same texture each time you want to draw a sprite?

My suggestion is you move the texture loading code somewhere else, where it will only be called once:
Code: [Select]
glBindTexture(GL_TEXTURE_2D, sheet.texture);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB, sheet.bitmapInfoHeader.biWidth, sheet.bitmapInfoHeader.biHeight, 0, GL_RGB, GL_UNSIGNED_BYTE, sheet.sprite);

And then change your function to simply be this:
Code: [Select]
void HVSTGFX::CTileSheet::createTile(int tileID, float x, float y)
{

float widthAdd = (tiles[tileID].pixWidth/2)*WIDTHSCALE;
float heightAdd = (tiles[tileID].pixHeight/2)*HEIGHTSCALE;

glBindTexture(GL_TEXTURE_2D, sheet.texture);
glColor3f(1.0f,1.0f,1.0f );
glBegin(GL_QUADS);
glTexCoord2f(tiles[tileID].glX, tiles[tileID].glY);                                                  glVertex3f(x, y, 0.0f);
glTexCoord2f(tiles[tileID].glX + tiles[tileID].glWidth, tiles[tileID].glY);                          glVertex3f(x + widthAdd, y, 0.0f);
glTexCoord2f(tiles[tileID].glX + tiles[tileID].glWidth, tiles[tileID].glY + tiles[tileID].glHeight); glVertex3f(x + widthAdd, y + heightAdd, 0.0f);
glTexCoord2f(tiles[tileID].glX, tiles[tileID].glY + tiles[tileID].glHeight);                         glVertex3f(x, y + heightAdd, 0.0f);
glEnd();


}

If you are still having problems, consider Display Lists.

5
I'm being completely serious here: I think the song really needs more cowbell.  Other than that, it's Fuggin awesome.
This.

6
Entertainment / Re: Heroes Villains
« on: September 23, 2008, 06:27:05 pm »
Nobody cares if you think it is dumb. Go away.

7
You only have to tell it once. Change your settings.

8
Other Discussion / Re: Shatner Plays WOW LOL!!
« on: September 09, 2008, 12:05:20 am »
Dude :( Where have you been... bumping old threads... and now this? :( These are pretty old... but pretty funny, nonetheless.

http://www.worldofwarcraft.com/news/rss-11-2007.xml

Actually I had never seen them and then I saw the William Shatner one on TV a while ago for the first time and thought it was hilarious. Sorry I don't watch TV or go on the internet 24/7 I the last few months I was finishing and graduating college so I haven't really been in the loop. Sorry to annoy.  :P
Just saying :P Didn't mean to offend or anything.

9
Other Discussion / Re: Shatner Plays WOW LOL!!
« on: September 08, 2008, 11:30:31 pm »
Dude :( Where have you been... bumping old threads... and now this? :( These are pretty old... but pretty funny, nonetheless.

http://www.worldofwarcraft.com/news/rss-11-2007.xml

10
Other Discussion / Re: Sex Stuff *mature content*
« on: September 08, 2008, 09:09:12 pm »
fantasise about, a bit like porn.
What? You're fantasizing about other people? Am I not good enough for you?!
 ::)

::)

Fantasising about someone who lots of other people fantasise about too?
Like a boy watching a porn clip, he's not the only one to jerk off to it, therefore it isnt special, it is simply just a turn on.
I'm of the opinion that fantasies are fine but there is a limit. I knew someone who would actually say (about a female model, while in a relationship) that the female model would be his future wife.

Yeah. That's too far.

11
Other Discussion / Re: Sex Stuff *mature content*
« on: September 08, 2008, 08:38:23 pm »
fantasise about, a bit like porn.
What? You're fantasizing about other people? Am I not good enough for you?!
 ::)

12
Other Discussion / Re: Sex Stuff *mature content*
« on: September 08, 2008, 07:29:37 pm »
If you're with somebody and have a healthy enjoyable sex life, do you still think it is acceptable for either partner to still pleasure themselves?
If it's a healthy and enjoyable sex life... why should masturbation be a problem at all?

I dislike when a guy / girl thinks that their partner is masturbating because they aren't good enough (that sounds so self-centered to me that it isn't even funny...). Now, I've never had sex, but I can't see how someone could fail so miserably at sex that their partner would prefer masturbation.

Masturbation is a way to cheaply and quickly pleasure yourself. That is all.

13
Other Discussion / Re: What Sex Is Your Brain?
« on: September 08, 2008, 05:54:54 pm »
The ultimatum one is weird, am I the only one who thought it logical to, when sharing £50 between two people, simply split it 50/50 (£25 for me, £25 for them).
Yeh thats what I did as well :S.

That's what I did too.
Ditto.
Same here...

14
Coding / Re: Programming Q&A
« on: September 06, 2008, 02:21:39 pm »
Darklight: My personal preference for C# is .NET 2.0. It contains all the nice and well-needed updates (generic classes, etc...) and is the last version to be supported on the old Windows operating systems (Windows 2000/ME/98).

The newer versions appear to be mainly targeted at Vista (with most of the additional features being for Vista compatibility). There doesn't appear to be any major functionality that you would lose by using .NET 2.0, and you can potentially support the older versions of Windows if you have to.

It all depends on what you need.

16
Other Discussion / Re: What programming language to YOU use?
« on: September 04, 2008, 05:57:03 pm »
How hard is it to learn these languages? None of you are particularly old and some of you know tons (Infini).
I'm not sure about Infinitus or any of the others, but I started at a very young age (at 8 years of age). The one thing found in all languages is programming logic. If you comprehend and can make use of programming logic, then almost every language will be very easy to pick-up because they are all essentially the exact same thing.

As for learning the first language; a lot of hard work and dedication is required if you want to learn quickly. A lot of what Minalien described applies here. You need to jump right in and start screwing around with things.

17
Other Discussion / Re: ATTN: wannabe communists of zfgc
« on: September 04, 2008, 05:48:38 pm »
Actually, there are 3 female smurfs.

18
Other Discussion / Re: What programming language to YOU use?
« on: September 04, 2008, 04:39:39 pm »
Er, well I've had experiance in more or less any language you care to mention. Which ones I use depends on the project I'm working on, and how lazy I want to be.
I didn't think about it that way... I guess the same thing applies to me :P

19
Other Discussion / Re: What programming language to YOU use?
« on: September 04, 2008, 06:19:13 am »
I mainly use C++, and C# these days. There are many others that I know but do not use day-to-day.

20
Other Discussion / Re: Giving Blood
« on: September 01, 2008, 06:55:54 pm »
If you can't give blood then I don't think you should feel guilty about it...  :-\ I believe (don't take this for fact...) that they used to give money to people who gave blood to try to encourage more people to do it. I do not believe they do that anymore.

I'm not quite sure why I've never really thought about giving blood before... I'm not sure of my blood type or anything... I don't know... hmm.

Pages: [1] 2 3 ... 16

Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.262 seconds with 35 queries.