Author |
Message |
Kuntzy

|
Posted: Sat Sep 11, 2004 4:59 pm Post subject: First OpenGL Program Involving Resourses, Textures, & Te |
|
|
This is My first program :
press the arrow keys to move the big box
press the n key to make small box appear
press b for blending
wsad for moving the small box
L for screwed up lighting (i think the light is rotating, but i don't want it to)
Description: |
Thanx to resources you only need the exe! |
|
 Download |
Filename: |
DKproductions.zip |
Filesize: |
527.14 KB |
Downloaded: |
359 Time(s) |
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Catalyst

|
Posted: Sun Sep 12, 2004 10:42 am Post subject: (No subject) |
|
|
Good Job have 25 bits
welcome to the wonderful world of opengl
|
|
|
|
|
 |
Kuntzy

|
Posted: Sun Sep 12, 2004 3:15 pm Post subject: (No subject) |
|
|
Thanx Catalyst ... one question, have you ever worked with resources, and loading textures off them? I ask because at the moment I am using Neon Helium's function for loading the BMP texture ... and I am having trouble modifiying it to suit what I want to do ...
|
|
|
|
|
 |
Catalyst

|
Posted: Sun Sep 12, 2004 3:25 pm Post subject: (No subject) |
|
|
Nope, never worked with resources
|
|
|
|
|
 |
hq78
|
Posted: Sat Dec 18, 2004 6:23 pm Post subject: (No subject) |
|
|
thats such a sick program, wow i love it good work
|
|
|
|
|
 |
md

|
|
|
|
 |
Mazer

|
Posted: Sun Dec 19, 2004 9:38 am Post subject: (No subject) |
|
|
Besides the fact that this post is, what, 4 months old? I'm guessing he indeed meant his first opengl program. But at the risk of wrongfully accusing him, I would also guess it was more of a copy/paste with some changes kind of thing.
Cornflake: I'm almost certain you meant to return 0 back there, but maybe I don't know as much about C as I thought.
|
|
|
|
|
 |
md

|
Posted: Sun Dec 19, 2004 2:35 pm Post subject: (No subject) |
|
|
lol I didn't notice the original post date, and yes I should have returned 0
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Andy
|
Posted: Sun Dec 19, 2004 5:21 pm Post subject: (No subject) |
|
|
i dont understand why they tell us to return 0.. it makes alot more sense if we returned 1 seeing as how 1 is true and 0 if false
|
|
|
|
|
 |
Catalyst

|
Posted: Sun Dec 19, 2004 5:48 pm Post subject: (No subject) |
|
|
seeing how it is meant to show if the program encountered any errors 0 seems appropriate
|
|
|
|
|
 |
Andy
|
Posted: Sun Dec 19, 2004 6:31 pm Post subject: (No subject) |
|
|
still dont get it... if the program runs into problems, then it wouldnt even return anything...
|
|
|
|
|
 |
md

|
Posted: Sun Dec 19, 2004 6:53 pm Post subject: (No subject) |
|
|
It comes from most modern operating systems unix heritage, but basically you return >= 0 for no errors (i think...), and < 0 if a non-fatal error occurs. In most modern operating systems all errors are caught and the program is signaled, so a program always returns something.
It's original purpose was when unix didn't have thread suport, so instead new processes were forked off to do work. By checking the return value you could tell if the process did what it was supposed to do. When threads became comon place the same system was copied because it was proven. Today Unix (and linux) support user level threads through pthreads, and windows supports threads natively, but each process still returns an int value for legacy reasons.
**Windows programs return an int, because 32bit windows lakes lots of ideas from unix.
|
|
|
|
|
 |
Andy
|
Posted: Sun Dec 19, 2004 7:20 pm Post subject: (No subject) |
|
|
ooo.. thx for that very informative response.. +20 bits
|
|
|
|
|
 |
Mazer

|
Posted: Sun Dec 19, 2004 9:31 pm Post subject: (No subject) |
|
|
Here's my respons: I return 0 so that I have one more way by which to show that I code nothing like my retard of a professor. May God strike her down with several bolts of lightning.
Oh yeah, and I prefer platform-independent code.
|
|
|
|
|
 |
Andy
|
Posted: Mon Dec 20, 2004 2:45 pm Post subject: (No subject) |
|
|
hmm what does she do? void?
|
|
|
|
|
 |
|