Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Something For Beginners...

SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
Well, I have been asked by three of my friends (one of whom uses these boards) to write a simple OpenGL tutorial that will get an object on the screen. I have done that, and also put in simple options for going fullscreen, changing the resolution in fullscreen mode from 640x480 to 1024x768, zooming your object, and rotating it on the x and y axis. I'll have z axis rotation in as well when I put the zip up for download. All functions are commented, and though some are long comments, they explain exactly why we did what we did in each instance. The file will be up Wednsday or Thursday evening at the site below. I hope it helps you people out!

http://www.geocities.com/shrew_ii/programming/opengl_01.zip

-[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]

Comments

  • gautamgautam Member Posts: 642
    Need help, ask :-).

    BTW I'll write the texture stuff by saturday, have tests till then :-)

  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    : Need help, ask :-).
    :
    : BTW I'll write the texture stuff by saturday, have tests till then :-)
    :
    Ah thanks, no rush though. I can't wait to get back and finish my college also :P. Btw, I have figured out rotation to an extent, and can properly rotate around 0, 0, 0, but I can't figure out how to make it relative to the player. Also, take for instance when my player is in the center of the room that is centered around 0 0 0, and he turns 90 deg and tries moving forward or backward, the level goes left or right, like he's strafing, and when he's turned 180, forward makes him go back and back is forward. Something is NOT right somewhere, lol! So I'll be trying to figure this one out for a while anyways. I figure, get the untextured level running properly, THEN stress out over texturing.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


  • Sephiroth2Sephiroth2 Member Posts: 423
    : : Need help, ask :-).
    : :
    : : BTW I'll write the texture stuff by saturday, have tests till then :-)
    : :
    : Ah thanks, no rush though. I can't wait to get back and finish my college also :P. Btw, I have figured out rotation to an extent, and can properly rotate around 0, 0, 0, but I can't figure out how to make it relative to the player. Also, take for instance when my player is in the center of the room that is centered around 0 0 0, and he turns 90 deg and tries moving forward or backward, the level goes left or right, like he's strafing, and when he's turned 180, forward makes him go back and back is forward. Something is NOT right somewhere, lol! So I'll be trying to figure this one out for a while anyways. I figure, get the untextured level running properly, THEN stress out over texturing.
    :
    : -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]
    :
    :
    To make the rotation relative to the current position, you must move the level before you rotate it.

  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    The file is available for download. This is a simple OpenGL tutorial that can have you writing OpenGL apps in no time. For a list of keys and how to use the bonus object (a rocket ship) in the program, view the readme text file I included. Hope this helps somebody!

    http://www.geocities.com/shrew_ii/programming/opengl_01.zip


    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


  • MutilateMutilate Member Posts: 22
    Hi there,
    it's just get the "This page is not available." of yahoo.
    May u send me it by e-mail: mutlate@tiscalinet.ch
    By the way I read recently your post asking help for rotation in a 3D Engine.You may be lucky because I'm just doing it for math at school.
    The 3 rotation matrix for the 3 axis (X,Y,Z), how to make one matrix for the 3 axis and how to rotate on a arbitrary axis (described with a normalized vector [Vx,Vy,Vz]), but u need some maths to understand it...
    Tell me if you want it, it gona take few days because I have yet to traslate it.

    Mutilate

  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    Yeah, GeoSh*ties now no longer allows external links to ANYTHING but html files. If you copy the link and paste it into IE/Netscape, it'll work fine. You can also type it in and it'll work. As for the matrix stuff, I have no clue where to begin with it and help would be REALLY appreciated. Right now I do the rotations for each axis with two lines of code per axis, and it works, but I hear the matrices are faster.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


  • MutilateMutilate Member Posts: 22
    :As for the matrix stuff, I have no clue where to begin with it and help would be REALLY appreciated. Right now I do the rotations for each axis with two lines of code per axis, and it works, but I hear the matrices are faster.

    That's right. I wrote you a text that should explain you matrix's operation from the knowlegend you use now, and from the work I'm doing for school.
    The problem it's that it's too big to post in here. I need an alternative modus operandi to send it to you (do an email on hotmail or something).

    Mutilate

  • SephirothSephiroth Fayetteville, NC, USAMember Posts: 1,035
    Well, [b]I GOT MY LINUX BOX UP ON THE DSL LINE!! WOOOOOOOHOOOOOO!!!![/b] There, I feel better now (=. You can email me at mazeops@hotmail.com if you want. As soon as I get an IP and have dhta.org registered, I'll be using my new box for that though.

    -[italic][b][red]S[/red][purple]e[/purple][blue]p[/blue][green]h[/green][red]i[/red][purple]r[/purple][blue]o[/blue][green]t[/green][red]h[/red]


  • afterdeathafterdeath Member Posts: 14
    : :As for the matrix stuff, I have no clue where to begin with it and help would be REALLY appreciated. Right now I do the rotations for each axis with two lines of code per axis, and it works, but I hear the matrices are faster.
    :
    : That's right. I wrote you a text that should explain you matrix's operation from the knowlegend you use now, and from the work I'm doing for school.
    : The problem it's that it's too big to post in here. I need an alternative modus operandi to send it to you (do an email on hotmail or something).
    :
    : Mutilate
    :

    Hi, I read the posted messages.I wrote a small code for the matrices and vectors for a 3d application I was writting but never finished a while ago. I can email you the code if you want as it can help, but I think that it needs some modifications to work with yours.

    Afterdeath

  • MutilateMutilate Member Posts: 22
    :email me at mazeops@hotmail.com

    Sorry but I was a little busy in these last times.
    You may check your e-mail now.

    By the way I gonna write also similar texts on traslation and scaling using matrixs, just tell me if u are interested.

    I see around that you know how to use opengl, maybe we can learn from eachother many things. But I gonna be busy for some weeks, we may talk about this later...

Sign In or Register to comment.