Page 2 of 3 FirstFirst 123 LastLast
Results 11 to 20 of 21

Thread: NeHe Lesson18

  1. #11
    thinBasic MVPs
    Join Date
    May 2007
    Location
    UK
    Posts
    1,427
    Rep Power
    159

    Re: NeHe Lesson18

    Psch thanks for that, it was about 30 minutes after posting when i was about to leave for work that i reaslised it was working backwards but didnt have time to go and modify it.

    Mike - it is your routine (i nabbed it. :P) thanks.
    Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
    Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
    Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
    Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370

  2. #12
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: NeHe Lesson18

    Glad this information came up. Nice commands there Petr. Will make it so much easier. Didn't know about them, or if I read about them forgot.

    I like simple, and these make things simple!
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  3. #13

    Re: NeHe Lesson18

    I came across this lesson on Lazy Foo, some time ago.

    I'm thinking of creating a General Routine for Capping the Frame Rate which could be used in all the Lessons.
    Operating System: Windows 10 Home 64-bit
    CPU: Intel Celeron N4000 CPU @ 1.10GHz
    Memory: 4.00GB RAM
    Graphics: Intel UHD Graphics 600

  4. #14
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: NeHe Lesson18

    Hi,

    matthew, whats wrong with tbgl_GetFrameRate :'( ?

    Mikes system is probably the most precise one, but it needs to wait some frames before it returns something and it tends to return more average value, while normally I need to know framerate in each frame to perform movement calculations.

    TBGL_GetFrameRate is very simple function, lets see what it does...

    It can be called only once in each frame. Why ? First because it was designed this way ;D and second it leads to real man coding ;D. Because when you store result at begining of each frame to variable, it is much more faster to read value from it later than invoke some measuring function multiple times per frame.

    As it is called once in frame, it is enough to measure time between two calls to this function and from this find out how long frame took. TBGL_getframeRate is kind of hybrid, because in case it runs in old ( ancient ) hardware it uses GetTickCount to get time, while on newer PCs it automatically makes uses of hardware counter, which is very precise ... at least for this purpose


    Bye,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #15

    Re: NeHe Lesson18

    ^^
    Lol, Okay then we'll use 'tbgl_GetFrameRate'.
    Operating System: Windows 10 Home 64-bit
    CPU: Intel Celeron N4000 CPU @ 1.10GHz
    Memory: 4.00GB RAM
    Graphics: Intel UHD Graphics 600

  6. #16
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: NeHe Lesson18

    Good,

    now I can sleep peacefuly


    Bye,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  7. #17

    Re: NeHe Lesson18

    Updated the Code a bit.
    Attached Files Attached Files
    Operating System: Windows 10 Home 64-bit
    CPU: Intel Celeron N4000 CPU @ 1.10GHz
    Memory: 4.00GB RAM
    Graphics: Intel UHD Graphics 600

  8. #18
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: NeHe Lesson18

    Matthew thanks for the update.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  9. #19

    Re: NeHe Lesson18

    Yes, thank you Mattew.

  10. #20

    Re: NeHe Lesson18

    ^^
    Thank's, I'm going to start updating the Code for all the other Lessons as well.
    Operating System: Windows 10 Home 64-bit
    CPU: Intel Celeron N4000 CPU @ 1.10GHz
    Memory: 4.00GB RAM
    Graphics: Intel UHD Graphics 600

Page 2 of 3 FirstFirst 123 LastLast

Similar Threads

  1. NeHe lessons
    By Michael Clease in forum TBGL General
    Replies: 1
    Last Post: 26-06-2008, 13:24
  2. NeHe Lesson 01
    By matthew in forum TBGL Tutorials
    Replies: 1
    Last Post: 16-03-2007, 06:38
  3. More NeHe Lessons...
    By matthew in forum TBGL Tutorials
    Replies: 5
    Last Post: 15-03-2007, 22:57

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •