Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Article: 3d Series - Chapter 1 - Projection
#11
Smile No, I'm sure OGL want work for QB, its a "DLL" lib, QB uses "QLB", "LIB", and "BI" altho OGL is loaded with "BI",.. In C++ you load it with a ".h" ?? oh well.. Its to advance 4 QB...

BTW, I'm really looking forward to this tut, I mean I've downloaded Dev C++ just to practice it, then I'll learn how to port to FB,.. but a FB tut would really b sweet!! Big Grin Big Grin Big Grin
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#12
The main reason you can't use OpenGL in QB is because OpenGL requires drivers which are written for Windows. It's also 32-bit (where as QB runs as 16-bit).

.DLL's are dynamic link libraries - the code inside them is not directly compiled into your program, but references to the functions inside the DLL are. The operating system then has to load the DLL file (and hence code) into memory for you so your program can use it.

.BI files are headers, which -declare- functions (note: this is not the same as writing the code for them, which would be -defining- a function).

.QLB are static libraries - these contain code which get compiled into your final .EXE.

.a are also static libraries - gcc/g++/gas/etc. use them.

.lib are usually used by anything Microsoft.

.h files are similar to .BI files - they are intended to -declare- functions and define constants and macros.


Sorry to go on... you just seemed a little confused about the file types, so I thought I should patch them up a bit. Smile Hope it helped and wasn't patronising!

-shiftLynx
img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img]
Reply
#13
A few notes....

.h stands for a Header file. This is a library in C++, or a collection of functions, not just the declares are included.

.cpp is your basic C++ file....Guess what it stands for? C Plus Plus lol :lol:

Hey I use Dev too!
i]"But...it was so beautifully done"[/i]
Reply
#14
:lol: I knew ".h" ment header, as I did ".BI",... just a odd difference between the two,.

Yeah, heh heh, You got the latest? it just came out a few days ago.. :wink: PM me so we don't fall of topic.. Smile
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#15
Quote:.h stands for a Header file. This is a library in C++, or a collection of functions, not just the declares are included.

A .h is not a library. It is an 'include file' and should contain no function definitions. They declare functions, which are defined in static libraries, or dynamic libraries (if the functions use __cdecl(dllexport)).

Header files are used to supply your program with a list of what functions are included in the library and what arguments those functions take. They can also contain typedefs, structs, class prototypes etc.

Including function definitions inside header files is very bad practice.

Consider this: you are writing a library that provides a set of cryptographic functions. You are saying that you write all of the cryptographic code into a .h file and supply that. This means your code is effectively open source, whether you like it or not.

The correct way would be to declare all of the functions in something like crypto.h, then write the code for all of the functions into crypto.c or crypto.cpp. Compiling this into a static library produces something similar to: crypto.a. When people now want to use your library, they must include the header file (crypto.h) and link your static library (crypto.a).


-shiftLynx
img]http://www.cdsoft.co.uk/misc/shiftlynx.png[/img]
Reply
#16
Oh ok. But When I said something was bad practice at Pete's, Nek and Z!re got all...ummm....like they had a vendeta against me. They said that programmers should not be telling other programmers what is bad practice or not. I believe Nek said that each person programming style was like their fingerprint.

BTW, I said GOTOs were a bad practice. :roll:

But I don't mind making a .h a library. Big Grin Also I don't code C++ much any more. I don't know how to mak a decent game on it. (you know graphics and stuff like that).
i]"But...it was so beautifully done"[/i]
Reply
#17
Smile You need SDL and OGL for C++ to make a desent looking game C++, Seems to simplify 3D more than anything else I've looked at, and the results are jaw dropping,..

Just look at Dr_D's OGL Demo,.. took me three tries to complete it and the whole thing was loaded with cool BMP gfx!! Its upload is in the FB Projects, :wink: Course his source was bit more complex than the spinning triangle sent with FB, oh well.. :roll:
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#18
Big Grin


:o ! Ummm...Rattra, I think someone changed your avatar on you.... :???:
i]"But...it was so beautifully done"[/i]
Reply
#19
:lol: Oh, I did,.. I swaped 'em for fun, I used this awhile back in my Emails, just diff with diff sayings under the horse :wink: ....

Hmm,. to get with the subject, I wounder.. why was most of the source in the first 3D tut all saved as "bas" on another site,. wouldn't it have been better to have all the source in the tut, or have a printble version maybe?? hmm, oh well. Smile
Kevin (x.t.r.GRAPHICS)

[Image: 11895-r.png]
Reply
#20
Ya that would have been nice. I don't know why they would have done that.

When I'm done SpaceMerc + The Rubik (Yes that's the name I made for it) I'll look into FB and those libraries. I can't wait.

Umm...about your avatar? Did you draw that one? I like to scetch and I'm going to give some more constructive crtitism on it (yes I did draw horses). So anyway:
First of all the body is too long. A horse's rib cage could NEVER fit into a outline like that.
Also the head is a little small and not the right shape. It should be about as big as the neck appx. You should see more of a jaw line which would be sort of a circle like.
The horse it BALD! It needs a mane.
1 more thing, the legs are a bit wide.

I hope that didn't sound too harsh...just some tips to help you draw a better horse. Big Grin
i]"But...it was so beautifully done"[/i]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)