Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 First OpenGL Program Involving Resourses, Textures, & Te
Index -> Programming, C++ -> C++ Submissions
Goto page 1, 2  Next
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Kuntzy




PostPosted: 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)



DKproductions.zip
 Description:
Thanx to resources you only need the exe!

Download
 Filename:  DKproductions.zip
 Filesize:  527.14 KB
 Downloaded:  349 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Catalyst




PostPosted: Sun Sep 12, 2004 10:42 am   Post subject: (No subject)

Good Job Very Happy have 25 bits
welcome to the wonderful world of opengl
Kuntzy




PostPosted: 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




PostPosted: Sun Sep 12, 2004 3:25 pm   Post subject: (No subject)

Nope, never worked with resources
hq78




PostPosted: Sat Dec 18, 2004 6:23 pm   Post subject: (No subject)

thats such a sick program, wow i love it good work
md




PostPosted: Sun Dec 19, 2004 3:40 am   Post subject: (No subject)

'Tis very nice, but is it really your first program? or is it your first GL program... cause it seems like a lot of people are posting saying "this is my first program" when they are using things that they must have learned by writing other programs, and to be honest I just can't wrap my mind arround that (I must be old school Razz ).

Back in the day, we started with
code:

#include <stdio.h>

int main()
{
    puts("Hello World!");
}


Smile
Mazer




PostPosted: 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. Wink
md




PostPosted: 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 Smile
Sponsor
Sponsor
Sponsor
sponsor
Andy




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: 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




PostPosted: Sun Dec 19, 2004 7:20 pm   Post subject: (No subject)

ooo.. thx for that very informative response.. +20 bits
Mazer




PostPosted: 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




PostPosted: Mon Dec 20, 2004 2:45 pm   Post subject: (No subject)

hmm what does she do? void?
Display posts from previous:   
   Index -> Programming, C++ -> C++ Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 2  [ 18 Posts ]
Goto page 1, 2  Next
Jump to:   


Style:  
Search: