Masm32 SDK description, downloads and other helpful links

Main Menu

NeHe Tutorial in masm64

Started by Mikl__, August 06, 2020, 12:55:45 PM

Previous topic - Next topic


Quote from: Mikl__ on August 20, 2020, 03:32:09 PM
There is silence, like in a crematory. Are there really no questions or wishes?

From time to time I'm still fighting with firsts OpenGl examples  :biggrin: :biggrin: :biggrin:

Equations in Assembly: SmplMath


Lesson #33: Loading Compressed and Uncompressed TGA's

In Lesson 24 NeHe showed a quick way to load uncompressed 24/32 bit TGA images. Very useful if you need to use an alpha channel and you don't mind the large size of an uncompressed TGA! In this tutorial, you will learn how to load both uncompressed and RLE compressed TGA images. The TGA Loading code and header files are seperate from the main project, and can easily be used in projects of your own! The demo is included only as an example! Don't expect eye popping graphics!

There are asm-\tga-\exe-files and cursor in attachment.


Hello Mikl

I've had less free time than ever for some time, which is a good sign with the times living :eusa_dance:. In fact I only ran some of your first examples. When I have some spare time, I am currently interested in doing some raytracing and a database link program to help me with my job. I also played a bit from time to time to Sekiro  :toothy:. However, I would very much like to start reviewing your opengl examples and help, if I can, in some case  :thumbsup:.


Lesson #24: Tokens, Extensions, Scissor Testing and TGA Loading

In this lesson NeHe teaches how to read and parse what OpenGL extensions are supported by video card. NeHe shows how to use scissor testing to create a cool scrolling window effect. NeHe shows how to load and use TGA (targa) image files as textures in projects. TGA files support the alpha channel, allowing you to create some great blending effects, and they are easy to create and work with. Not only that, by using TGA files, you no longer depend on the glAUX library. Alot of you must appreciate it!

There are asm-\exe-files and cursor in attachment.

  • "Arrow Up/Down"

Them more powerful your video card, the longer you get the list (see picture


Lesson #22: Bump-Mapping, Multi-Texturing and Extensions
Right off the start NeHe'd like to point out that this is an advanced tutorial. If you're still uncertain about the basics, please go back and read the previous lessons. If you're a new GL programmer, this lesson may be a bit much. In this lesson, you will modify the code from lesson #6 to support hardware multi-texturing on cards that support it, along with a really cool visual effect called bump-mapping.,_multi-texturing_&_extensions/16009/

There are asm\bmp\exe-files and cursor in attachment.
Due to the forum limitation on the size of the attached file, I had to split the post into two posts. Therefore, the picture for lesson#22 is in the next message.


  • pressing "E/e" ― for toggle Emboss/Bumpmapped Mode
  • pressing "M/m" ― for toggle Multitexturing
  • pressing "B/b" ― for toggle Bumpmapping. This Is Mutually Exclusive With Emboss Mode
  • pressing "F/f" ― for toggle Filters.
  • CURSOR-KEYS ― rotate the cube
  • pressing "Page Up/Down" ― for increases/decrease the z-variable and moves the cube towards/away from the viewer


Lesson #25: Morphing & Loading Objects From A File
Learn how to load simple objects from a text file, and morph smoothly from one object into another. The effect in this tutorial has to be seen to be appreciated. The effect taught in this demo can be used to animated objects similar to the swimming dolphin, or to twist and bend objects into many different shapes. You can also modify the code to use lines or solid polygons. Great effect!

There are asm\exe-files, cursor, tube.txt, torus.txt and sphere.txt in attachment.

  • "1/2/3/4": ― toggle figures (sphere, torus, tube, chaos)
  • Rotate and Move Figures
    • "Page Up/Down" ― increase/decrease z-speed
    • "Down/Up Arrow" ― increase/decrease x-speed
    • "Right/Left Arrow" ― increase/decrease y-speed
    • "Q/q" ― move object away from viewer
    • "Z/z" ― move object towards viewer
    • "W/w" ― move object up
    • "S/s" ― move object down
    • "D/d" ― move object right
    • "A/a" ― move object left


Lesson #29: Blitter Function, RAW Texture Loading
In this tutorial NeHe teaches how to load .RAW image files. NeHe teaches how to write your own blitter routine to modify textures after they have been loaded. You can copy sections of the first texture into a second texture, you can blend textures together, and you can stretch textures. The same routine can be modified to create realtime plasma and other cool effects!

There are asm-\exe-\raw-files and cursor in attachment.



Lesson #32: Picking, Alpha Blending, Alpha Testing, Sorting
In this lesson NeHe attempted answer a few of the questions. How to tell if you have clicked on an object with your mouse (picking). How to draw objects to the screen without a specific color showing up (alpha blending or alpha testing). How to sort objects so they appear properly when blending in enabled (sorting). This tutorial is a complete game and is considered advanced. Make sure you have a good undestanding of OpenGL before you jump into the code.

There are asm-\exe-\tag-\wav-files and cursor in attachment.


Lesson #37: Cel-Shading
This tutorial will teach you Cel-Shading. A very cool effect that makes images look like cartoons.

  • Pressing "Space" ― Toggle rotation
  • "1" ― Toggle outline drawing
  • "2" ― Toggle outline anti-aliasing. When drawing the lines, we want to make sure that they are nice and smooth. Initially this value is turned off, but by pressing the "2" key, it can be toggled on/off.
  • "Down/Up Arrow" ― decrease/increase line width
There are asm-\exe-\txt-files and cursor in attachment.


You are doing a terrific job, Mikl :thumbsup:


Lesson #38: Loading Textures From A Resource File & Texturing Triangles

NeHe wrote this tutorial for all those people that have asking how to load textures from a resource file so that all the textures are stored in the exe-file. The tutorial itself is not all that fancy, and it's definitely not that advanced, but the content is good to know.

There are asm-\exe-\bmp-files and cursor in attachment.


Lesson #35: Playing AVI Files In OpenGL

This NeHe tutorial will teach you how to play AVI-files in OpenGL. Play them in a window, on the side of a cube, sphere, cylinder, etc. Create a billboard with full motion video playing on it! The tutorial also shows you how to use sphere mapping to create a cool looking live environment mapping effect.

File movie0.avi is here. It is important! Avi-file must be uncompressed and not contain an audio stream. It must be in the same directory with the avi-player.

There are asm-/exe-file and cursor in

  • pressing "space" ― create complex objects such as sphere, cube, cylinder, cone
  • pressing "E/e" ― toggle Environment Mapping Off/On
  • pressing "B/b" ― toggle Background Off/On
  • "Page Up/Down" ― increases/decrease the z-variable  and moves the cube (sphere, cylinder, cone) towards/away from the viewer


Hi Mikl,

The forum is generally quiet, except for the "political" threads about Trump etc. Some years ago we had much more coding activity, and the Laboratory was always full of interesting stuff.

As for myself, I would like one day to explore OpenGL, and your posts will be the most valuable resource. But I have lots of other things to do, not only coding. Don't be sad if there are few downloads. You are doing important work here, my friend :thup:

Another reason is that you are coding in 64 bits now. Previously, we all had exactly the same 32-bit SDK and setup. Now there are several 64-bit SDK versions around, and none of them is as perfect as good ol' Masm32. I can't build your sources, simply because I don't have the matching setup. So I run the exe and that's it...

P.S.: Your butterflies are beautiful :thumbsup: