+ Reply to Thread
Page 3 of 10 FirstFirst 12345 ... LastLast
Results 21 to 30 of 99

Thread: GPU: Basic Tutorial by LeonBlade

  1. #21
    Wire Sofaking Solece's Avatar
    Join Date
    Jul 2008
    Location
    Pittsburgh, PA
    Posts
    673

    Default Re: GPU: Basic Tutorial by LeonBlade

    Cool becaues ive been wanting to make a game with GPU

  2. #22
    Wire Amateur LeonBlade's Avatar
    Join Date
    Apr 2009
    Location
    Blossvale, NY
    Posts
    77

    Default Re: GPU: Basic Tutorial by LeonBlade

    New section!
    Now you can learn how to use 3D!!
    Code:
    if (powerLevel > 9000) {
         print "IT'S OVER 9000!!!11";
    }
    Code:
    mov #status,1337

  3. #23
    Wire Sofaking Solece's Avatar
    Join Date
    Jul 2008
    Location
    Pittsburgh, PA
    Posts
    673

    Default Re: GPU: Basic Tutorial by LeonBlade

    Awesome, your my new best friend .
    Might help if you could post the full code after each part though :P

  4. #24
    Wire Amateur LeonBlade's Avatar
    Join Date
    Apr 2009
    Location
    Blossvale, NY
    Posts
    77

    Default Re: GPU: Basic Tutorial by LeonBlade

    Quote Originally Posted by haloguy922 View Post
    Awesome, your my new best friend .
    Might help if you could post the full code after each part though :P
    Updated!
    I'm glad you like it!

    I'm going to start making a program that will auto generate code for you for 3D objects in a few minutes.
    Code:
    if (powerLevel > 9000) {
         print "IT'S OVER 9000!!!11";
    }
    Code:
    mov #status,1337

  5. #25
    Wire Sofaking Solece's Avatar
    Join Date
    Jul 2008
    Location
    Pittsburgh, PA
    Posts
    673

    Default Re: GPU: Basic Tutorial by LeonBlade

    Awesome i love you
    but your code for it seems to be broken unfortunantly

  6. #26
    Wire Amateur LeonBlade's Avatar
    Join Date
    Apr 2009
    Location
    Blossvale, NY
    Posts
    77

    Default Re: GPU: Basic Tutorial by LeonBlade

    Hmm, that's weird... I just compiled this code try it again:

    EDIT: Okay, found the problem, it was my label ^_^
    Code:
    dcvxpipe 3; 					// -1,0,1 (opengl screen)
    dvxpipe 5; 						// matrix projection
    
    // initialize transform
    mperspective mProjectionMatrix,vPerspective;
    
    // render starts
    dclrscr bg_color;
    mlookat mViewMatrix,vLookAt; 	// view matrix
    
    timer eax;
    mov #vRotate.w,eax;
    
    // rotate translate
    mrotate mRotateMatrix,vRotate;
    mtranslate mTranslateMatrix,vTranslate;
    
    // create model matrix
    mmov mModelMatrix,mTranslateMatrix;
    mmul mModelMatrix,mRotateMatrix;
    
    mmov mModelViewMatrix,mViewMatrix;
    mmul mModelViewMatrix,mModelMatrix;
    
    // load matrix
    mload mModelViewMatrix
    mloadproj mProjectionMatrix;
    
    // setup light
    dsetlight 0,lightdata;
    
    // setup buffer
    denable 0;						// vertex buffer
    denable 1;						// z sorting
    denable 2; 						// lighting
    denable 3; 						// face culling  
    
    // render cube
    dcolor fg_color;
    dvxdata_3f drawpyramid,6;
    dvxflush;
    
    ddisable 0; 			// disable everything now
    ddisable 1;
    ddisable 2;
    ddisable 3;
    
    dcvxpipe 0;
    dvxpipe 0;     
    
    dexit;					// exit drawing  
    
    // pyramid points
    drawpyramid:
    db 0,-1,0;	// t (font)
    db 1,1,-1;// br (front)
    db -1,1,-1;	// bl (front)
    
    db 0,-1,0;	// t (right)
    db 1,1,1;// br (right)
    db 1,1,-1; 	// bl (right)
    
    db 0,-1,0;	// t (left)
    db -1,1,-1;	// bl (left)
    db -1,1,1;	// br (left)
    
    db 0,-1,0;// t (back)
    db -1,1,1;// bl (back)
    db 1,1,1;// br (back)
    
    db -1,1,-1;	// bottom (left)
    db 1,1,1;
    db -1,1,1; 
    
    db -1,1,-1;	// bottom (right)
    db 1,1,-1;
    db 1,1,1;
    
    lightdata:
    vector4f lightpos, 0,50,-50,0; // x y z <unused>
    color lightcol,0,255,255,1; // R G B brightness
    
    matrix mRotateMatrix;
    matrix mTranslateMatrix;
    
    matrix mProjectionMatrix; // this defines our projetion to the screen
    matrix mViewMatrix; // this defines our camera transformations
    
    matrix mModelMatrix;	// this is our model transformations
    matrix mModelViewMatrix; // this is our model relatively to camera transform
    
    vector4f vRotate, 0,1,0,0; // axis X Y Z angle
    vector4f vTranslate, 0,0,0,0; // translation X Y Z 0
    vector4f vPerspective, 30,1.6,1,20; // <FOV> <ASPECT RATIO> <ZNEAR> <ZFAR>
    
    vLookAt:
    vector3f vLookAt_Eye, 0,0,-5;	// where our camera is
    vector3f vLookAt_Center, 0,0,0; // what we look at
    vector3f vLookAt_Up, 0,1,0; // where our matt-hat is
    
    color fg_color,69,69,69;
    color bg_color,255,0,125;
    Last edited by LeonBlade; 05-07-2009 at 10:00 PM.
    Code:
    if (powerLevel > 9000) {
         print "IT'S OVER 9000!!!11";
    }
    Code:
    mov #status,1337

  7. #27
    Wire Sofaking Solece's Avatar
    Join Date
    Jul 2008
    Location
    Pittsburgh, PA
    Posts
    673

    Default Re: GPU: Basic Tutorial by LeonBlade

    Your doing a great job with this Leon, I know about 5 people already who have learned GPu from your tut, keep it up!

  8. #28
    Wirererer Hunter234564's Avatar
    Join Date
    Apr 2008
    Location
    Holland
    Posts
    225

    Default Re: GPU: Basic Tutorial by LeonBlade

    Awesome tut, now I only need to know 2d triangles *hint*, if possible on the 0-512 setting.
    [eXs] TP Hunter NL: Is there something you didn't make?
    Black Phoenix: you?

  9. #29
    Wirererer cooldudetb's Avatar
    Join Date
    Sep 2008
    Location
    UK
    Posts
    253

    Default Re: GPU: Basic Tutorial by LeonBlade

    I learnt GPU with these tutorials. Thanks LeonBlade!

  10. #30
    Wire Amateur LeonBlade's Avatar
    Join Date
    Apr 2009
    Location
    Blossvale, NY
    Posts
    77

    Default Re: GPU: Basic Tutorial by LeonBlade

    Thanks a lot guys!

    It really means a lot to me that you like my tutorial!
    I'll get to work on that 2D triangle Hunter234564

    If you guys have any more suggestions, please feel free to ask.

    Again, thanks for all the kind words
    Code:
    if (powerLevel > 9000) {
         print "IT'S OVER 9000!!!11";
    }
    Code:
    mov #status,1337

+ Reply to Thread
Page 3 of 10 FirstFirst 12345 ... LastLast

LinkBacks (?)


Similar Threads

  1. Need help with basic if's
    By Echo51 in forum Expression 2 Discussion & Help
    Replies: 3
    Last Post: 02-27-2009, 04:36 PM
  2. Need Some Not-So-Basic Help
    By DarthRogue in forum Installation and Malfunctions Support
    Replies: 4
    Last Post: 08-05-2008, 05:08 AM
  3. basic if then statements
    By FuzzMaster in forum Installation and Malfunctions Support
    Replies: 3
    Last Post: 03-08-2008, 09:08 PM
  4. Putting a video tutorial in the gmod tutorial list
    By Def the world in forum Installation and Malfunctions Support
    Replies: 1
    Last Post: 08-21-2007, 10:04 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
proceed-collector
proceed-collector
proceed-collector
proceed-collector
linguistic-parrots
linguistic-parrots
linguistic-parrots
linguistic-parrots