News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests

Main Menu

NeHe Tutorial in masm64

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

Previous topic - Next topic

Mikl__

Hi, All!
It is my try#2 to learn OpengGL
The tiny theory and description of programs are http://nehe.gamedev.net/
There are total lessons: 48/are translated: 47 lessons now.
Programs from the NeHe tutorial are not translated into assembler masm64 sequentially, but from whether I like them or not. But I hope will be translated all lessons.
Table of contents
Lessons that are not published on the NeHe website, but which are based on his lessons
  • Lesson X1. Improved input handling using DirectInput and Windows
  • Lesson X2. Opengl Frustum Culling
  • Lesson X3. Combining lessons into a shared library GLSummary in MFC
  • Lesson X4. Formation of game applications from the available lessons
  • Lesson X5. Formation of shapes and movements from an external text file
  • Lesson X6. Formation of shapes and movements from an external text file

Lesson #2: Your First Polygon

Using the source code from the first tutorial, we will now add code to create a Triangle, and a Square on the screen. NeHe knows you're probably thinking to yourself "a triangle and square... oh joy", but it really is a BIG deal. Just about everything you create in OpenGL will be created out of triangles and squares. If you don't understand how to create a simple little triangle in Three Dimensional space, you'll be completely lost down the road. So read through this chapter and learn.

Once you've read through this chapter, you should understand the X axis, Y axis and Z axis. You will learn about translation left, right, up, down, into and out of the screen. You should understand how to place an object on the screen exactly where you want it to be. You will also learn a bit about the depth buffer (placing objects into the screen).

http://nehe.gamedev.net/tutorial/your_first_polygon/13002/

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

Mikl__

#1
Lesson #3: Adding Color

Expanding on the second tutorial NeHe will teach you how to create spectacular colors in OpenGL with very little effort. You will learn about both flat coloring and smooth coloring. The triangle on the left uses smooth coloring. The square on the right is using flat coloring. Notice how the colors on the triangle blend together. 

Color adds alot to an OpenGL project. By understanding both flat and smooth coloring, you can greatly enhance the way your OpenGL demos look.

http://nehe.gamedev.net/tutorial/adding_colour/13003/

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

Mikl__

#2
Lesson #4: Rotation

Moving right along. In this tutorial NeHe will teach you how to rotate both the triangle and the quad. The triangle will rotate on the Y-axis, and the quad will rotate on the X-axis. This tutorial will introduce 2 variables. rtri is used to store the angle of the triangle, and rquad will store the angle of the quad. 

It's easy to create a scene made up of polygons. Adding motion to those object makes the scene come alive. In later lessons NeHe will teach you how to rotate an object around a point on the screen causing the object to move around the screen rather than spin on its axis.

http://nehe.gamedev.net/tutorial/rotation/14001/

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

Mikl__

#3
Lesson #5: 3D-Shapes

Now that we have setup, polygons, quads, colors and rotation figured out, it's time to build 3D objects. We'll build the objects using polygons and quads. This time we'll expand on the last tutorial, and turn the triangle into a colorful pyramid, and turn the square into a solid cube. The pyramid will use blended colors, the cube will have a different color for each face. 

Building an object in 3D can be very time consuming, but the results are usually worth it. Your imagination is the limit!

http://nehe.gamedev.net/tutorial/3d_shapes/10035/

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

Mikl__

#4
Lesson #6: Texture Mapping

You asked for it, so here it is... Texture Mapping!!! In this tutorial NeHe will teach you how to map a bitmap image onto the six sides of a cube. We'll use the GL code from lesson one to create this project. It's easier to start with an empty GL window than to modify the last tutorial. You'll find the code from lesson one is extremely valuable when it comes to developing a project quickly. The code in lesson one sets everything up for you, all you have to do is concentrate on programming the effect(s).

http://nehe.gamedev.net/tutorial/texture_mapping/12038/

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

Mikl__

#5
Lesson #7: Texture Filters, Lighting and Keyboard Control

NeHe hopes you've been understanding everything up till now, because this is a huge tutorial. NeHe is going to attempt to teach you 2 new ways to filter your textures, simple lighting, keyboard control, and probably more If you don't feel confident with what you've learned up to this lesson, go back and review. Play around with the code in the other lessons. Don't rush. It's better to take your time and learn each lesson well, than to jump in, and only know enough to get things done.

http://nehe.gamedev.net/tutorial/texture_filters,_lighting_&_keyboard_control/15002/

There are asm\bmp\exe-files and cursor in the attachment
Interaction:
  • pressing "L/l" for turn on/off light
  • pressing "F/f" for select texture filter
  • pressing "Page Up/Down" for increases/decrease the z-variable and moves the cube towards/away from the viewer
  • pressing "Arrow Left/Right" for increase/decrease x-rotation speed
  • pressing "Arrow Up/Down" for increase/decrease y-rotation speed

Mikl__

#6
Lesson #8: Blending

Lesson eight was going to be a blending tutorial. This tutorial expands on lesson seven. Blending is a very cool effect... Blending is not an easy topic to cover.

http://nehe.gamedev.net/tutorial/blending/16001/

There are asm\bmp\exe-files and cursor in the attachment
Interaction:
  • pressing "L/l" for lighting on/off
  • pressing "B/b" for blending on/off
  • pressing "Page Up/Down" for increases/decrease the z-variable and moves the cube towards/away from the viewer
  • pressing "Arrow Left/Right" for increase/decrease x-rotation speed
  • pressing "Arrow Up/Down" for increase/decrease y-rotation speed

Mikl__

#7
Lesson #9: Moving Bitmaps in 3D-Space

This tutorial covers a few of the topics you guys had requested. You wanted to know how to move the objects you've made around the screen in 3D. You wanted to know how to draw a bitmap to the screen, without the black part of the image covering up what's behind it. You wanted simple animation and more uses for blending. This tutorial will teach you all of that. You'll notice there's no spinning boxes. The previous lessons covered the basics of OpenGL. Each tutorial expanded on the last. This tutorial is a combination of everything that you have learned up till now, along with information on how to move your object in 3D. This tutorial is a little more advanced, so make sure you understand the previous lessons before you jump into this tutorial.

http://nehe.gamedev.net/tutorial/moving_bitmaps_in_3d_space/17001/

There are asm\bmp\exe-files and cursor in the attachment
Interaction:
  • pressing "T/t" for twinkle on/off
  • pressing "Page Up"/"Page Down" for increases/decrease the z-variable and moves the cube towards/away from the viewer
  • pressing "Arrow Up"/"Arrow Down" for increase/decrease angle of rotation

Mikl__

#8
Lesson #11: Flag Effect (Waving Texture)

This tutorial builds on the code from lesson 6. By the end of the tutorial you should be able to bend fold and manipulate textures of your own. It's definitely a nice effect, and alot better than flat non moving textures.

http://nehe.gamedev.net/tutorial/flag_effect_(waving_texture)/16002/

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

jj2007

This is quite impressive, Mikl :thumbsup:

(don't expect criticism, we are all watching in awe :smiley:)

Mikl__

#10
Lesson #1: Setting Up An OpenGL Window

In this tutorial, NeHe will teach you how to set up, and use OpenGL in a Windows environment. The program you create in this tutorial will display an empty OpenGL window and wait for you to press ESC or close the Window to exit. It doesn't sound like much, but this program will be the framework for every other tutorial NeHe releases in the next while. It's very important to understand how OpenGL works, what goes into creating an OpenGL Window, and how to write simple easy to understand code. You can download the code, but NeHe definitely recommend you read over the tutorial at least once, before you start programming in OpenGL.

http://nehe.gamedev.net/tutorial/creating_an_opengl_window_(win32)/13001/

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

Mikl__

#11
Lesson #12: Display Lists

Want to know how to speed up you OpenGL programs? Tired of writing lots of code every time you want to put an object on the screen? If so, this tutorial is definitely for you. Learn how to use OpenGL display lists. Prebuild objects and display them on the screen with just one line of code. Speed up your programs by using precompiled objects in your programs. Stop writing the same code over and over. Let display lists do all the work for you! In this tutorial we'll build the Q-Bert pyramids using just a few lines of code thanks to display lists.

http://nehe.gamedev.net/tutorial/display_lists/15003/

There are asm\bmp\exe-files and cursor in the attachment
Interaction:
  • pressing "Arrow Left"/"Arrow Right" for increase/decrease x-rotation angle
  • pressing "Arrow Up"/"Arrow Down" for increase/decrease y-rotation angle

Mikl__

#12
Lesson #13: Bitmap Fonts

NeHe thinks the question he gets asked most often in email is "how can I display text on the screen using OpenGL?". You could always texture map text onto your screen. Of course you have very little control over the text, and unless you're good at blending, the text usually ends up mixing with the images on the screen. If you'd like an easy way to write the text you want anywhere you want on the screen in any color you want, using any of your computers built in fonts, then this tutorial is definitely for you. Bitmaps font's are 2D-scalable fonts, they can not be rotated. They always face forward.

http://nehe.gamedev.net/tutorial/bitmap_fonts/17002/

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

Mikl__

#13
Lesson #14: Outline Fonts

Bitmap fonts not good enough? Do you need control over where the fonts are on the Z axis? Do you need 3D fonts (fonts with actual depth)? Do you need wireframe fonts? If so, Outline fonts are the perfect solution. You can move them along the Z-axis, and they resize. You can spin them around on an axis (something you can't do with bitmap fonts), and because proper normals are generated for each character, they can be lit up with lighting. You can build Outline fonts using any of the fonts installed on your computer. Definitely a nice font to use in games and demos.

http://nehe.gamedev.net/tutorial/outline_fonts/15004/

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

Mikl__

#14
Lesson #15: Texture Mapped Outline Fonts

Hopefully my last font tutorial . This time we learn a quick and fairly nice looking way to texture map fonts, and any other 3D-object on your screen. By playing around with the code, you can create some pretty cool special effects, Everything from normal texture mapped object to sphere mapped objects. In case you don't know... Sphere mapping creates a metalic looking object that reflects anything from a pattern to a picture.

http://nehe.gamedev.net/tutorial/texture_mapped_outline_fonts/18001/

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