Results 1 to 2 of 2

Thread: NeHe Lesson 01

  1. #1
    Member matthew's Avatar
    Join Date
    Mar 2007
    Location
    England
    Age
    47
    Posts
    489
    Rep Power
    66

    NeHe Lesson 01

    NeHe Lesson 01 will Open a Blank OpenGL Display.

    [code=thinbasic]
    ' NeHe Lesson 01

    uses "UI" ' MessageBox Functions
    uses "TBGL" ' thinBASIC OpenGL Library

    ' Create MessageBox
    dim fullScreen as long
    fullScreen = msgbox(0, "Would you like to Run in Fullscreen Mode?", %MB_YESNO or %MB_ICONINFORMATION, "Start FullScreen?")

    select case fullScreen

    ' Create FullScreen Display, Return Handle.
    case %IDYES
    dim hWnd as dword
    hWnd = tbgl_createwindowex("", 1024, 768, 32, 1)

    ' Create Windowed Display, Return Handle.
    case %IDNO
    dim hWnd as dword
    hWnd = tbgl_createwindowex("NeHe Lesson 01 - Press 'Esc' to Quit", 640, 480, 16, 0)

    end select

    tbgl_showwindow ' Show Display

    TBGL_GetAsyncKeyState(-1) ' Reset all Keys

    ' Start Main Loop
    while tbgl_iswindow(hWnd)

    tbgl_clearframe ' Clear Display
    tbgl_camera 0,0,1,0,0,0 ' Default Camera, View From 0,0,1 To 0,0,0.

    tbgl_drawframe ' Display anything

    if tbgl_getasynckeystate(%VK_ESCAPE) then exit while

    wend

    tbgl_destroywindow ' Closes Display
    [/code]

    Update
    This Lesson was updated on 29th June 2007 when you Run the Application it will now ask you whether you want to use a FullScreen or Windowed Display.
    Attached Images Attached Images
    Operating System: Windows 10 Home 64-bit
    CPU: Intel Celeron N4000 CPU @ 1.10GHz
    Memory: 4.00GB RAM
    Graphics: Intel UHD Graphics 600

  2. #2
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    68
    Posts
    3,865
    Rep Power
    405

    Re: NeHe Lesson01

    Mathew, thanks for doing all of these. I will go through all of them to make sure I didn't miss learning something. I won't write on all of them to say thanks, but know that they will all be used, studied and hopefully learned from. Thanks for doing these!!
    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

Similar Threads

  1. NeHe Lesson 03
    By matthew in forum TBGL Tutorials
    Replies: 0
    Last Post: 16-03-2007, 01:01
  2. NeHe Lesson 02
    By matthew in forum TBGL Tutorials
    Replies: 0
    Last Post: 16-03-2007, 00: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
  •