I am in the process of trying to structure my tiling engine in such a way as there is a base class which holds all of my window and opengl initiation functions and variables. Well, it was all going ok structurely wise(no compile errors, but i messed up on initiation so that a window doesnt appear) until i was getting to my pixelformat function, which for now, is pretty much a direct copy of GameTutorials one:

Now that is funny, as since i pretty much did a copy paste from one of my other programs, which worked, one would expect this to work. I have checked my dependencies, and I have included all GL related libraries except for GLUT, as well as included the proper header files. What could be going on? if it helps, my compiler is Visual C++ 5.0 prof. edition.

thanks,

EvBladerunnervE

EDIT:: Sorry for the ugly code, i tryed formatting it as it was filling up two screens worth for me but didnt get it all the way right.

11-21-2003

Codeplug

This will be best solved if you can zip and attach a project that will compile with these errors.

gg

11-21-2003

frenchfry164

That's one thing I hate about DX. It changes so much that sometimes you got to modify tutorial code just to get it to work. Try looking up in the documentation the parameters of the function for the version of DX you are using. I actually found out that a few functions weren't even documented correctly, and they left parameter out.

11-21-2003

neandrake

Quote:

Originally posted by frenchfry164 That's one thing I hate about DX. It changes so much that sometimes you got to modify tutorial code just to get it to work. Try looking up in the documentation the parameters of the function for the version of DX you are using. I actually found out that a few functions weren't even documented correctly, and they left parameter out.

he's using OpenGL :eek:

Check for any calls to the function, or the prototype of the function. That's about as much as I can offer.

11-21-2003

Silvercord

wtf, you BROKE OpenGL, sunnova...
Here's my gl renderer creation code, which isn't copied from anywhere but for all intents and purposes might as well have been

It's gotta be yoru freaking compiler. What in the hell are you doing with vc 5 btw?
Oh, and for the record, I'm still not talking to you, so don't bother IMing me. I'm still ........ED about the MIT thing because I never meant MIT, I meant *W* IT, which is near MIT, but you were being a little dingle $$$$ before I could explain the error (so don't bother pm ing me, because i'll give you the same response as last time).
this is business stuff so ill help

EDIT: go into your GL header files that you are *actually using*, THEN MAKE ABSOLUTELY SURE YOU HAVE A FUNCTION CALLED SETPIXELFORMAT THAT TAKES 3 PARAMETERS...you might *think* you have the latest GL stuff, but perhaps it's possible that you somehow have headers from an older GL implementaqtion (sorta unlikely because GL doesn't change as often as DX< but on the other hand you have a $$$$astically old version of visual studio. it might've came with its own GL stuff because it at least comes with windows gl functions. Im still looking through that small tidbit of code trying to find the problem).

11-21-2003

EvBladeRunnervE

My Setpixelformat does use 3 parameters. There is the thing, SetPixelFormat works perfectly in all of my other GL apps that I had made previously(and they still compile fine), everything is the same, including libraries and windows as well as gl header files. I will post code when i can actually get onto the internet with my development computer.

To Silver:
Silvercord, sorry about that, WIT makes sense, but when you said MIT twice in a row, i couldnt believe it was a typo, so I apologize. Good job man :cool:. But when I say "BS", then you say "if you dont believe me then i am going to block you"(was there a message in between that? my home internet was running at 9600bps do to local telco maintenance, so i had horrible packet loss that night), what do you expect me to do? That is like Me saying I have invented a new form of space partitioning that is 1000% more efficient than BSP, you would of said the same thing.

11-21-2003

Silvercord

i never said MIT twice. I just looked at my history, I only made one typo. i was initially offended because I thought you were referring to WIT when you said those sarcastic $$$$$$$ remarks, and WIT isn't hard to get into. but then I realized why you said it, but i'm still blocking you because you are the most annoying person ever, and you can't ever get anything done even when i try to help you (so again, the pms will be ignored)

You can read this thread to see what major:http://cboard.cprogramming.com/showt...threadid=46916
I was bragging not because it's a hard school, but because they readily accepted me into the engineering program when they don't usually accept this early. and now i have to stop because this is off topic, but this is the only time you'll hear from me because im not letting u contact me any other way.

11-21-2003

EvBladeRunnervE

attached is my project

11-21-2003

Silvercord

That's your own SetPixelFormat function that YOU made, that isn't the one that is used by windows. Take it out of the class. Took me about two seconds to find when I saw that the one trying to be called returned bool and not BOOL (which is actualy an unsigned 32bit int I think, as put in windef.h)

next time, don't do that

11-21-2003

EvBladeRunnervE

ah, this is what happens to people who stupidly name functions after actual system library functions, and are too blind to see a glaring mistake(actually, its more like mentally undercasing read words, and therefore thinking my function was setpixelformat, instead of the same name).

The question is, even though it is fixed, is there anyway around this problem, as in, could I have a function in my class named the same as another function(in this case, SetPixelFormat) without it hurting me(yes I know it would be in general pretty ugly, but still).

11-21-2003

JaWiB

Quote:

The question is, even though it is fixed, is there anyway around this problem, as in, could I have a function in my class named the same as another function(in this case, SetPixelFormat) without it hurting me(yes I know it would be in general pretty ugly, but still).

I thought that was the whole idea of namespaces :P

Although I don't know if you are using C or C++, since I haven't looked at your code...