The MASM Forum

Microsoft 64 bit MASM => Mikl__'s ml64 examples => Topic started by: Mikl__ on August 06, 2020, 12:55:45 PM

Title: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 12:55:45 PM
Hi, All!
It is my try#2 to learn OpengGL
The tiny theory and description of programs are http://nehe.gamedev.net/ (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 #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(https://wasm.in/styles/smiles_s/negative.gif)", 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/ (http://nehe.gamedev.net/tutorial/your_first_polygon/13002/)

There are asm\exe-files and cursor in the attachment.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 01:04:09 PM
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/ (http://nehe.gamedev.net/tutorial/adding_colour/13003/)

There are asm\exe-files and cursor in the attachment
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 01:11:45 PM
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/ (http://nehe.gamedev.net/tutorial/rotation/14001/)

There are asm\exe-files and cursor in the attachment
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 01:19:23 PM
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/ (http://nehe.gamedev.net/tutorial/3d_shapes/10035/)

There are asm\exe-files and cursor in the attachment
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 01:31:21 PM
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/ (http://nehe.gamedev.net/tutorial/texture_mapping/12038/)

There are asm\bmp\exe-files and cursor in the attachment
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 01:57:24 PM
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 (https://wasm.in/styles/smiles_s/smile3.gif) 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/ (http://nehe.gamedev.net/tutorial/texture_filters,_lighting_&_keyboard_control/15002/)

There are asm\bmp\exe-files and cursor in the attachment
Interaction:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 02:05:41 PM
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/ (http://nehe.gamedev.net/tutorial/blending/16001/)

There are asm\bmp\exe-files and cursor in the attachment
Interaction:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 03:38:20 PM
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/ (http://nehe.gamedev.net/tutorial/moving_bitmaps_in_3d_space/17001/)

There are asm\bmp\exe-files and cursor in the attachment
Interaction:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 03:59:07 PM
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/ (http://nehe.gamedev.net/tutorial/flag_effect_(waving_texture)/16002/)

There are asm-\bmp-\exe-files and cursor in the attachment
Title: Re: NeHe Tutorial in masm64
Post by: jj2007 on August 06, 2020, 05:36:20 PM
This is quite impressive, Mikl :thumbsup:

(don't expect criticism, we are all watching in awe :smiley:)
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 06:04:07 PM
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/ (http://nehe.gamedev.net/tutorial/creating_an_opengl_window_(win32)/13001/)

There are asm\exe-files and cursor in the attachment
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 06:20:03 PM
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/ (http://nehe.gamedev.net/tutorial/display_lists/15003/)

There are asm\bmp\exe-files and cursor in the attachment
Interaction:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 06:47:34 PM
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/ (http://nehe.gamedev.net/tutorial/bitmap_fonts/17002/)

There are asm\exe-files and cursor in the attachment
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 06:59:31 PM
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/ (http://nehe.gamedev.net/tutorial/outline_fonts/15004/)

There are asm\exe-files and cursor in the attachment
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 07:21:06 PM
Lesson #15: Texture Mapped Outline Fonts

Hopefully my last font tutorial (https://wasm.in/styles/smiles_s/smile3.gif). 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/ (http://nehe.gamedev.net/tutorial/texture_mapped_outline_fonts/18001/)

There are asm\bmp\exe-files and cursor in the attachment
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 07:36:37 PM
Lesson #16: Cool Looking Fog
It's a pretty short tutorial aimed at teaching you the art of fog. You'll learn how to use 3 different fog filters, how to change the color of the fog, and how to set how far into the screen the fog starts and how far into the screen it ends.
There are asm\bmp\exe-files and cursor in the attachment

http://nehe.gamedev.net/tutorial/cool_looking_fog/19001/ (http://nehe.gamedev.net/tutorial/cool_looking_fog/19001/)

Interaction:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 08:12:13 PM
Lesson #18: Quadrics
In this tutorial you will learn how to write any character or phrase you want to the screen using texture mapped quads. You will learn how to read one of 256 different characters from a 256x256 texture map, and finally NeHe will show you how to place each character on the screen using pixels rather than units. Even if you're not interested in drawing 2D texture mapped characters to the screen, there is lots to learn from this tutorial. Definitely worth reading!

http://nehe.gamedev.net/tutorial/quadrics/20001/ (http://nehe.gamedev.net/tutorial/quadrics/20001/)

There are asm\bmp\exe-files and cursor in the attachment
Interaction:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 06, 2020, 09:02:26 PM
Lesson #36: Radial Blur & Rendering To A Texture
This tutorial will show you how to create an extremely impressive Radial Blur effect. It should run fast on just about every type of hardware, and does not require the use of extensions. This tutorial will also teach you how to render to a texture using the off-screen buffer. A topic I'm sure many of you are interested in! It's important to note that there is very little explanation of the GL commands. By now you should know what they do!
There are asm-\exe-files and cursor in the attachment

http://nehe.gamedev.net/tutorial/radial_blur__rendering_to_a_texture/18004/ (http://nehe.gamedev.net/tutorial/radial_blur__rendering_to_a_texture/18004/)
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 07, 2020, 11:38:01 AM
Lesson #17: 2D-Texture Font
In this tutorial you will learn how to write any character or phrase you want to the screen using texture mapped quads. You will learn how to read one of 256 different characters from a 256x256 texture map, and finally NeHe will show you how to place each character on the screen using pixels rather than units. Even if you're not interested in drawing 2D-texture mapped characters to the screen, there is lots to learn from this tutorial. Definitely worth reading!
There are asm-\bmp-\exe-files and cursor in the attachment

http://nehe.gamedev.net/tutorial/2d_texture_font/18002/ (http://nehe.gamedev.net/tutorial/2d_texture_font/18002/)
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 08, 2020, 10:46:02 PM
Lesson #10: Loading and Moving Through a 3D-World

In this lesson you will learn how to load a 3D world from a data file, and move through the 3D world. The tutorial only explains the NEW code used to load the 3D scene, and move around inside the 3D world. Download asm-code, and follow through it as you read the tutorial. Keys to try out are Blend, Filtering, Lighting (light does not move with the scene however), Left/Right/Up/Down Arrow, and Page Up/Page Down.

http://nehe.gamedev.net/tutorial/loading_and_moving_through_a_3d_world/22003/ (http://nehe.gamedev.net/tutorial/loading_and_moving_through_a_3d_world/22003/)

There are asm-\exe-files, cursor, mud.bmp for texture and world.txt in the attachment
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 09, 2020, 04:23:51 PM
Lesson #19: Particle Engine Using Triangle Strips

Have you ever wanted to create an explosion, water fountain, flaming star, or some other cool effect in your OpenGL program, but writing a particle engine was either too hard, or just too complex? If so, this tutorial is for you. You'll learn how to program a simple but nice looking particle engine. NeHe has thrown in a few extras like a rainbow mode, and lots of keyboard interaction. You'll also learn how to create OpenGL triangle strips. NeHe hopes you find the code both useful and entertaining.

http://nehe.gamedev.net/tutorial/particle_engine_using_triangle_strips/21001/ (http://nehe.gamedev.net/tutorial/particle_engine_using_triangle_strips/21001/)

Interaction:There are asm-\exe-\bmp-files and cursor in the attachment
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 10, 2020, 02:52:10 PM
Lesson #20: Masking

Up until now we've been blending our images onto the screen. Although this is effective, and it adds our image to the scene, a transparent object is not always pretty. Lets say you're making a game and you want solid text, or an odd shaped console to pop up. With the blending we have been using up until now, the scene will shine through our objects. By combining some fancy blending with an image mask, your text can be solid. You can also place solid oddly shaped images onto the screen. A tree with solid branches and non transparent leaves or a window, with transparent glass and a solid frame. Lots of possiblities!

http://nehe.gamedev.net/tutorial/masking/15006/ (http://nehe.gamedev.net/tutorial/masking/15006/)

Interaction:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 10, 2020, 06:48:28 PM
Lesson #34: Beautiful Landscapes By Means Of Height Mapping
Want to create beautiful landscapes smooth shaded landscapes using nothing more than a single texture? If so, this tutorial will teach you how to convert a 2D-greyscale height map image into a full blown 3D landscape. NeHe also talk a little about gluLookAt, a command that seems to have a few of you baffled.
http://nehe.gamedev.net/tutorial/beautiful_landscapes_by_means_of_height_mapping/16006/ (http://nehe.gamedev.net/tutorial/beautiful_landscapes_by_means_of_height_mapping/16006/)
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 15, 2020, 09:19:16 AM
Lesson #35: Playing AVI-files in OpenGL
(1-st part. Only avi-player!)
This 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.

http://nehe.gamedev.net/tutorial/playing_avi_files_in_opengl/23001/ (http://nehe.gamedev.net/tutorial/playing_avi_files_in_opengl/23001/)

File movie0.avi is here (https://yadi.sk/i/J4bVuX4H3JdByJ). 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 35.zip, lib-files in 35 lib.zip and include-files in 35 include.zip.
(to be continue (http://masm32.com/board/index.php?topic=8722.msg96283#msg96283)...)
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 16, 2020, 02:26:17 PM
Lesson #23: Sphere Mapping Quadrics in OpenGL
This tutorial code is based on NeHe quadrics tutorial (lesson 18). In lesson 15 (texture mapped fonts) NeHe talked a little bit about sphere mapping. NeHe explained how to auto-generate texture coordinates, and how to set up sphere mapping, but because lesson 15 was fairly simple NeHe decided to keep the tutorial simple, leaving out alot of details in regards to sphere mapping. Now that the lessons are a little more advanced it's time to dive into the world of sphere mapping.

http://nehe.gamedev.net/tutorial/sphere_mapping_quadrics_in_opengl/15005/ (http://nehe.gamedev.net/tutorial/sphere_mapping_quadrics_in_opengl/15005/)

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

Interaction:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 20, 2020, 01:46:27 AM
Lesson #42: Multiple Viewports
This tutorial was written for to show how to display multiple views on a single screen. This tutorial will teach you how to set up multiple viewports, how to display both ortho and perspective views on the same screen, and how to display a variety of effects with each effect running in it's own viewport. As an added bonus, you will learn how to get the size of your OpenGL window, you will learn a very fast way to update a texture without rebuilding it. You will learn how to use GL_COLOR_MATERIAL to color a texture and you will get to play around with the maze.

http://nehe.gamedev.net/tutorial/multiple_viewports/20002/ (http://nehe.gamedev.net/tutorial/multiple_viewports/20002/)

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

Interaction:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 20, 2020, 03:32:09 PM
Lesson #26: Clipping & Reflections Using The Stencil Buffer
This tutorial demonstrates how to create extremely realistic reflections using the stencil buffer, clipping, and multi-texturing. This tutorial is more advanced than previous lessons, so please make sure you've read the previous lessons before jumping in. It's also important to note this tutorial will not run on video cards that do not support the stencil buffer (voodoo 1, 2, perhaps more).

http://nehe.gamedev.net/tutorial/clipping__reflections_using_the_stencil_buffer/17004/ (http://nehe.gamedev.net/tutorial/clipping__reflections_using_the_stencil_buffer/17004/)

Interaction:There are asm-\exe-\bmp-files and cursor in the attachment.
Title: Re: NeHe Tutorial in masm64
Post by: LordAdef on August 20, 2020, 04:31:46 PM
wow, I saw it tonight, and I know what I'll be doing as a side study for the next few days!



Title: Re: NeHe Tutorial in masm64
Post by: avcaballero on August 20, 2020, 05:17:08 PM
wishes: give us more examples  :thumbsup:  :bgrin:
Title: Re: NeHe Tutorial in masm64
Post by: jj2007 on August 20, 2020, 06:56:59 PM
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? (https://wasm.in/styles/smiles_s/russian.gif)

I wish I had the time to study your examples, Mikl :greenclp:
Title: Re: NeHe Tutorial in masm64
Post by: HSE on August 21, 2020, 12:25:40 AM
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? (https://wasm.in/styles/smiles_s/russian.gif)

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

Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 21, 2020, 03:04:33 PM
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!

http://nehe.gamedev.net/tutorial/loading_compressed_and_uncompressed_tga%27s/22001/ (http://nehe.gamedev.net/tutorial/loading_compressed_and_uncompressed_tga%27s/22001/)

There are asm-\tga-\exe-files and cursor in 33.zip attachment.
Title: Re: NeHe Tutorial in masm64
Post by: avcaballero on August 21, 2020, 06:22:23 PM
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 (https://www.youtube.com/watch?v=js7YXiircX0)  :toothy:. However, I would very much like to start reviewing your opengl examples and help, if I can, in some case  :thumbsup:.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 21, 2020, 08:24:12 PM
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!

http://nehe.gamedev.net/tutorial/tokens_extensions_scissor_testing_and_tga_loading/19002/ (http://nehe.gamedev.net/tutorial/tokens_extensions_scissor_testing_and_tga_loading/19002/)

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

Interaction:

Them more powerful your video card, the longer you get the list (see picture 24.jpg.zip)
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 24, 2020, 08:18:31 PM
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.

http://nehe.gamedev.net/tutorial/bump-mapping,_multi-texturing_&_extensions/16009/ (http://nehe.gamedev.net/tutorial/bump-mapping,_multi-texturing_&_extensions/16009/)

There are asm\bmp\exe-files and cursor in 22.zip 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.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 24, 2020, 08:19:46 PM
Interaction:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 27, 2020, 12:24:13 AM
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!

http://nehe.gamedev.net/tutorial/morphing__loading_objects_from_a_file/16003/ (http://nehe.gamedev.net/tutorial/morphing__loading_objects_from_a_file/16003/)

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

Interaction:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 28, 2020, 09:17:21 PM
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!

http://nehe.gamedev.net/tutorial/blitter_function_raw_texture_loading/18006/ (http://nehe.gamedev.net/tutorial/blitter_function_raw_texture_loading/18006/)

There are asm-\exe-\raw-files and cursor in 29.zip attachment.
Title: Re: NeHe Tutorial in masm64
Post by: mabdelouahab on August 29, 2020, 04:03:46 AM
Quote from: Mikl__ on August 28, 2020, 09:17:21 PM
(https://wasm.in/styles/smiles_s/russian.gif)
Mikl__, We are following, continued  :thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on September 09, 2020, 10:45:15 AM
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.

http://nehe.gamedev.net/tutorial/picking_alpha_blending_alpha_testing_sorting/16005/ (http://nehe.gamedev.net/tutorial/picking_alpha_blending_alpha_testing_sorting/16005/)

There are asm-\exe-\tag-\wav-files and cursor in 32.zip attachment.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on September 17, 2020, 11:15:47 AM
Lesson #37: Cel-Shading
This tutorial will teach you Cel-Shading. A very cool effect that makes images look like cartoons.

http://nehe.gamedev.net/tutorial/cel_shading/25001/ (http://nehe.gamedev.net/tutorial/cel_shading/25001/)

Interaction:There are asm-\exe-\txt-files and cursor in 37.zip attachment.
Title: Re: NeHe Tutorial in masm64
Post by: jj2007 on September 17, 2020, 06:24:30 PM
You are doing a terrific job, Mikl :thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on September 17, 2020, 07:34:54 PM
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.

http://nehe.gamedev.net/tutorial/loading_textures_from_a_resource_file__texturing_triangles/26001/ (http://nehe.gamedev.net/tutorial/loading_textures_from_a_resource_file__texturing_triangles/26001/)

There are asm-\exe-\bmp-files and cursor in 38.zip attachment.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 03, 2020, 10:18:26 AM
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.

http://nehe.gamedev.net/tutorial/playing_avi_files_in_opengl/23001/ (http://nehe.gamedev.net/tutorial/playing_avi_files_in_opengl/23001/)

File movie0.avi is here (https://yadi.sk/i/J4bVuX4H3JdByJ). 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 35.zip

Interaction:
Title: Re: NeHe Tutorial in masm64
Post by: jj2007 on October 03, 2020, 11:07:41 AM
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:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 05, 2020, 02:09:16 AM
Lesson #21: Lines, Antialiasing, Timing, Ortho View And Simple Sounds

This is NeHe large tutorial. In this tutorial you will learn about: Lines, Anti-Aliasing, Orthographic Projection, Timing, Basic Sound Effects, and Simple Game Logic. You have to fill in a grid while avoiding nasty enemies.

http://nehe.gamedev.net/tutorial/lines,_antialiasing,_timing,_ortho_view_and_simple_sounds/17003/ (http://nehe.gamedev.net/tutorial/lines,_antialiasing,_timing,_ortho_view_and_simple_sounds/17003/)

There are asm\wav\bmp\exe-files and cursor in the 21.zip (https://wasm.in/attachments/21-zip.6472/) attachment.
Title: Re: NeHe Tutorial in masm64
Post by: Siekmanski on October 05, 2020, 05:15:37 AM
Your work is really cool. :cool:  :thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 12, 2020, 09:24:26 AM
Lesson #28: Bezier Patches

Tired of flat surfaces? Feel the nice bulge of curved Bezier surfaces! Learn how to create bezier patches. Learn how to alter a surface by modifying control points. The surface being altered is fully texture mapped, the animation is smooth!

Interaction:http://nehe.gamedev.net/tutorial/bezier_patches__fullscreen_fix/18003/ (http://nehe.gamedev.net/tutorial/bezier_patches__fullscreen_fix/18003/)

There are asm-\bmp-\exe-files and cursor in 28.zip attachment.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 14, 2020, 08:51:46 PM
Lesson #45: Vertex Buffer Objects.
We are continuing to travel around Antarctica
(http://cyberstatic.net/images/smilies/smile3.gif)

When you need raw polygon-pushing power, you can always utilize the optimizations provided by OpenGL. Vertex Arrays are one good way to do that. For even more boost you can use a extension to graphics cards called 'Vertex Buffer Objects'. The extension, ARB_vertex_buffer_object, works just like vertex arrays, except that it loads the data into the graphics card's high-performance memory, significantly lowering rendering time. Not all graphics cards support 'Vertex Buffer Objects' extension.

http://nehe.gamedev.net/tutorial/vertex_buffer_objects/22002/ (http://nehe.gamedev.net/tutorial/vertex_buffer_objects/22002/)

There are asm-\bmp-\exe-files and cursor in 45.zip attachment.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 19, 2020, 12:49:34 AM
[delete]
Title: Re: NeHe Tutorial in masm64
Post by: HSE on October 21, 2020, 08:48:27 AM
Hi Mikl!

Assembling: tut_40-38.asm
tut_40-38.asm(140) : error A2006:undefined symbol : GL_LINEAR_MIPMAP_LINEAR
movReg64Arg(11): Macro Called From
  invoke(46): Macro Called From
   tut_40-38.asm(140): Main Line Code
tut_40-38.asm(145) : error A2006:undefined symbol : GL_BGR_EXT


I think I have differents includes and libraries.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 21, 2020, 09:53:13 AM
Hi, HSE!
The inc-files are updated with constants from one lesson to next lesson
Title: Re: NeHe Tutorial in masm64
Post by: HSE on October 22, 2020, 01:17:49 AM
 :thumbsup: Fantastic Mikl!  Object is assembled.

I have some linking problems. Perhaps I have to see Uncle Tales   :biggrin:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 22, 2020, 01:41:17 AM
[delete]
Title: Re: NeHe Tutorial in masm64
Post by: HSE on October 22, 2020, 01:56:08 AM
Tomorrow I will run 64bits again  :thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on October 22, 2020, 03:27:48 AM
Hello,
I have tried the sample 21,the exe don't want to work with Win10.
So I have tried the C++ sample and he work in 32.
I try to compile it in  64 and link say
Quote
Lesson21.obj : error LNK2001: symbole externe non résolu SOIL_load_OGL_texture
Msdn don't kow that and it seems that it is a library.Did you know how and where find it ??
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 22, 2020, 08:35:25 AM
Salut Yves!
Essayez d'exécuter cette version du programme dans Win10. Je ne sais pas d'où vient la constante "SOIL_load_OGL_texture" dans mon programme
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on October 22, 2020, 06:25:11 PM

Thanks for the various samples of the sample21.
There is only the VC one who works with windows 10.
I finally found the SOIL library who need to be compiled in 32 or 64 bits.
https://github.com/paralin/soil (https://github.com/paralin/soil)
I try to compile the VC sample21 with Visual studio 2019,but it is not win.
The 32 bits versions as worked and changed of idea a little time after.
The 64 bits need the 64 bits SOIL library with numerous constants switch to define or not.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 22, 2020, 06:32:34 PM
[delete]
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on October 22, 2020, 08:20:53 PM
Perhaps it's for that than no one work in windows 10.
The Nehe C++ use it,you can download them in "GITHUB  OPENGL NEHE TUTORIAL"
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 22, 2020, 09:55:23 PM
[delete]
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on October 22, 2020, 11:56:27 PM

It seems they are numerous nehe tutorials,the one i download:
https://github.com/superipey/NeHe-Tutorial (https://github.com/superipey/NeHe-Tutorial)
my goal is to find tutorials that can be recompiled with VS2019 and run in windows 10
The 21 is one of them in 32 bits with restriction.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 23, 2020, 12:32:24 AM
[delete]
Title: Re: NeHe Tutorial in masm64
Post by: HSE on October 23, 2020, 07:44:23 AM
Hi Mikl!

I used your translation of Iczelion Tut 2. Look like the linker fail to find libraries, if I copy the libraries and stubby to the same directory that contain the source file there is no problem. Strange thing is, that same linker don't have problems with Hutch's package. I have to see better. 
Title: Re: NeHe Tutorial in masm64
Post by: mineiro on October 23, 2020, 10:39:58 AM
hello sir HSE;
You can try check PATH variable for your include folder;
echo %PATH%
so, append a path folder to that to be visible to system
set PATH=%PATH%;z:\some_dir\include;z:\other_dir\lib
Not sure today, I put that in autoexec.bat file in older days.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 23, 2020, 11:25:18 AM
[delete]
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 23, 2020, 04:19:33 PM
[delete]
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on October 23, 2020, 06:07:13 PM

The nehe C++ lesson have a problem,they work only under ....Visual Studio (Initialisation failed).
A good sample in 64 bit is the MSDN one,I put it here.
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on October 24, 2020, 12:33:19 AM

Soluce complete for the lesson21 in Windows 10 and 64 bits.
The attachment had the SOIL(soilmaster) lib in 64 bits (build in VS2019 windows 10).
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 24, 2020, 01:16:37 AM
Lesson #48: ArcBall Rotation

Wouldn't it be great to rotate your model at will, just by using the mouse? With an ArcBall you can do just that. In this tutorial we will touch on his implementation and considerations for adding ArcBall rotation to your own projects. His implementation of the ArcBall class is based on Bretton Wade's, which is based on Ken Shoemake's from the Graphic Gems series of books. However, his version has some bug fixing and optimizations. The example code was originally based on lesson 5. It has been spruced up a bit, and now includes code to render a torus, complete with normals.

http://nehe.gamedev.net/tutorial/arcball_rotation/19003/ (http://nehe.gamedev.net/tutorial/arcball_rotation/19003/)

Interaction:
There are asm\exe-files and cursor in the 48.zip attachment.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on October 24, 2020, 04:09:36 PM
[delete]
Title: Re: NeHe Tutorial in masm64
Post by: jj2007 on October 24, 2020, 08:10:48 PM
In the name of everybody: thank you, Mikl, for these tutorials - they will become a reference for graphics assembly :thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on November 08, 2020, 01:16:18 PM
[delete]
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on January 27, 2021, 02:26:42 PM
Lesson #41: Volumetric Fog and IPicture Image Loading.
Road to Hell is Paved with Good Intentions

This tutorial will introduce you to the world of extensions. In this tutorial you will learn how to create Volumetric Fog using the glFogCoordf Extension. You will also learn how the IPicture code works, and how to use it in projects of your own. Because of very limited free time, the demo is not all that complex. The only keys used in this demo are the up and down arrow keys. The only effect displayed in this demo is volumetric fog. Keeping that in mind, the fog effect is extremely cool, and the tutorial is very detailed. After reading through this tutorial you should have no problem adding volumetric fog to demos of your own. It's important to note that this tutorial only runs on video cards that support the EXT_fog_coord extension. If you are not sure if you care supports this extension, download lesson #24 (http://masm32.com/board/index.php?topic=8722.msg95638#msg95638) and scroll through the list of supported extensions. Hopefully someone will find this code useful!

http://nehe.gamedev.net/tutorial/volumetric_fog__ipicture_image_loading/18007/ (http://nehe.gamedev.net/tutorial/volumetric_fog__ipicture_image_loading/18007/)

There are asm\exe-files and cursor in the 41.zip attachment.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on February 23, 2021, 12:08:17 AM
Lesson #27: Shadows
This is an advanced tutorial. Before you decide to try out shadows, make sure you completely understand the base code, and make sure you are familiar with the stencil buffer. The effect is amazing! Shadows that actual wrap around objects, and distort on the walls and floor.

https://nehe.gamedev.net/tutorial/shadows/16010/ (https://nehe.gamedev.net/tutorial/shadows/16010/)

Interaction:There are asm\exe-files, Object2.txt and cursor in the 27.zip attachment.
Title: Re: NeHe Tutorial in masm64
Post by: avcaballero on February 23, 2021, 05:49:37 AM
Quote from: Mikl__ on February 23, 2021, 12:08:17 AM
Perhaps began to forget about me? I rewrote yet more NeHe's lesson (https://wasm.in/styles/smiles_s/smile3.gif)

:biggrin: :thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on February 23, 2021, 08:08:59 PM
Find the nehe tutorial in masm32 (1 to 22 + 36) here https://github.com/gamedev-net/nehe-opengl (https://github.com/gamedev-net/nehe-opengl)

Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on February 23, 2021, 11:49:04 PM
Salut Yves!
Il n'y a pas assez de NeHe leçons 30-31, 39-40, 43 pour la collection complète. (https://wasm.in/styles/smiles_s/smile3.gif) Leçons 1-29, 32-38, 41-42, 44-48 J'ai déjà traduit en masm64 et posté dans ce fil
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on February 24, 2021, 02:37:58 AM

Ok,
the link you have given in the upper post link to the forum Nehe who link to all lesson.
The vc lesson will perhaps satisfy windows 10
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on February 24, 2021, 12:38:47 PM
Lesson #47: CG Vertex Shader
Using vertex and fragment (or pixel) shaders to do some rendering dirty work can have numerous benefits. The most obvious is the movement of some of the graphics related CPU load off the CPU and onto the GPU. Cg provides a (reasonably) simple language for writing very powerful shaders. This tutorial has multiple aims. The first is to present a simple vertex shader that actually does something, without introducing unnecessary lighting etc... The second is to provide the basic mechanism for running the vertex shader with visible results using OpenGL. As such, it is aimed at the beginner interested in Cg who has a little experience in OpenGL.

http://nehe.gamedev.net/tutorial/cg_vertex_shader/25002/ (http://nehe.gamedev.net/tutorial/cg_vertex_shader/25002/)

There are asm-\inc-\def-\dll-\lib-\txt-\exe-files and cursor in the 47.zip (https://wasm.in/attachments/47-zip.6725/) attachment.

P.S.Size of attachment is 2.5 Mb, so 47.zip link leads to the site wasm.in
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on February 27, 2021, 01:11:50 AM
Lesson #46: Fullscreen AntiAliasing
Need a tutorial that will make your OpenGL applications look better? A big problem we all run into is aliasing. That is, the square edged "jaggies" that exist on diagonal lines in relation to the square pixels that exist on your screen. In this tutorial you will use Anti-Aliasing to smudge those "jaggies" in order to create a smoother edge for objects. We achieve this through "Multisampling". Fullscreen AntiAliasing is something that non-realtime rendering programs have always had an advantage in. However, with current hardware, we're able to pull off the same effect real time. The ARB_MULTISAMPLE extension allows us to do this. Like any other Extension based tutorial, if your card does not support the extension used, the effect will not work on your machine or the program may fail to run.

https://nehe.gamedev.net/tutorial/fullscreen_antialiasing/16008/ (http://'https://nehe.gamedev.net/tutorial/fullscreen_antialiasing/16008/')

There are asm-\exe-files and cursor in the 46.zip attachment.
Title: Re: NeHe Tutorial in masm64
Post by: jj2007 on February 27, 2021, 01:18:58 AM
Looks good :thumbsup:

This is how it looks here - does it mean that my graphics card doesn't support it?
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on February 27, 2021, 01:32:12 AM
Hi, Jochen!
this tutorial only runs on video cards that support the "WGL_ARB_multisample" extension. If you are not sure if you care supports this extension, download lesson #24 (http://masm32.com/board/index.php?topic=8722.msg95638#msg95638) and scroll through the list of supported extensions
Title: Re: NeHe Tutorial in masm64
Post by: jj2007 on February 27, 2021, 02:22:59 AM
Apparently not...
Title: Re: NeHe Tutorial in masm64
Post by: six_L on February 27, 2021, 06:19:32 AM
Hi,Mikl__
the tur 46 exe works fine here.
:thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on February 27, 2021, 08:02:51 PM
OH,
The 46 must be the first who work with windows 10.
:thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: jj2007 on February 27, 2021, 08:05:27 PM
Quote from: TouEnMasm on February 27, 2021, 08:02:51 PM
OH,
The 46 must be the first who work with windows 10.
:thumbsup:

It works with Win7-64, too, but the lines remain ragged, see above. Could be a hardware issue, though.
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on February 27, 2021, 08:44:05 PM
Quote
It works with Win7-64, too, but the lines remain ragged, see above. Could be a hardware issue, though.
I have the complete collection in C.
this one don't need the old lib glaux.lib who had disappeared in win 10.


Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on February 27, 2021, 10:18:51 PM
I wrote programs under Windows seven x64. If I understood you correctly, not all my programs work under Windows 10. Now I have a laptop with Windows 10 and I can run the NeHe lessons and remake the programs so that they work under Windows 10.
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on February 28, 2021, 03:21:10 AM
Quote
ModLoad: 00000000`49e00000 00000000`49e12000   C:\WINDOWS\SYSTEM32\UMPDC.dll
(f78.2cfc): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** WARNING: Unable to verify checksum for C:\Users\luce\Downloads\tut_40-45.exe
KERNELBASE!ReadFile+0xaf:
00000000`0069380f 49c70603010000  mov     qword ptr [r14],103h ds:00000000`00000001=????????????????
and so on.
Quote
System Information
------------------
      Time of this report: 2/27/2021, 17:21:55
             Machine name: HERISSON
               Machine Id: {B5C1621D-0617-48B9-898B-C0F67777DFE9}
         Operating System: Windows 10 Famille 64-bit (10.0, Build 19042) (19041.vb_release.191206-1406)
                 Language: French (Regional Setting: French)
      System Manufacturer: essentielb
             System Model: Smart'DESK series
                     BIOS: H81EM2ES8.304 (type: UEFI)
                Processor: Intel(R) Core(TM) i3-4150 CPU @ 3.50GHz (4 CPUs), ~3.5GHz
                   Memory: 4096MB RAM
      Available OS Memory: 4014MB RAM
                Page File: 3146MB used, 5219MB available
              Windows Dir: C:\WINDOWS
          DirectX Version: DirectX 12
      DX Setup Parameters: Not found
         User DPI Setting: 96 DPI (100 percent)
       System DPI Setting: 96 DPI (100 percent)
          DWM DPI Scaling: Disabled
                 Miracast: Available, with HDCP
Microsoft Graphics Hybrid: Not Supported
DirectX Database Version: 1.0.8
           DxDiag Version: 10.00.19041.0546 64bit Unicode

------------
DxDiag Notes
------------
      Display Tab 1: No problems found.
        Sound Tab 1: No problems found.
        Sound Tab 2: No problems found.
          Input Tab: No problems found.


Quote
(141c.3120): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** WARNING: Unable to verify checksum for C:\Users\luce\Downloads\07\tut_40-07.exe
KERNELBASE!ReadFile+0xaf:
00000000`006a380f 49c70603010000  mov     qword ptr [r14],103h ds:00000000`00000001=????????????????

Quote
(3cb8.1820): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
*** WARNING: Unable to verify checksum for C:\Users\luce\Downloads\21\tut_40-21.exe
KERNELBASE!ReadFile+0xaf:
00000000`0068380f 49c70603010000  mov     qword ptr [r14],103h ds:00000000`00000001=????????????????

I run the exe in the downloaded directory with all the files needed

Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on February 28, 2021, 04:17:08 AM
soluce write the readfile correctly:
Quote
BOOL ReadFile(
  HANDLE       hFile,
  LPVOID       lpBuffer,
  DWORD        nNumberOfBytesToRead,
  LPDWORD      lpNumberOfBytesRead,
  LPOVERLAPPED lpOverlapped
);
in 64,there only one dword,nNumberOfBytesToRead others are qword
tut45 part of code
   mov   [rsp+20h],rbx
   lea   r9d,szReadWrite
        invoke   ReadFile,hFile,eax,FSize   ;<<<<<<<<<<<<<<<<<<<<<<<<< eax wrong ,not a qword adress

This error don't append with UASM or JWASM >>> compile error "incorrect size"


looking upper:

   push   rsi
   push   rsi
   sub   esp,20h                 ;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> perhaps RSP not ?


it seems there is many local dword here :

Quote
LoadHeightmap proc
local   nX:dword
local   nZ:dword
local   nTri:dword
local   nIndex:dword; Ñîçäàòü ïåðåìåííûå
local   flX:dword
local   flZ:dword
local   buff:dword
local   buff1[256]:byte
local   szReadWrite:QWORD   ;number of bytes actually read or write
local   hFile:dword            ;<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< at least one wrong
local   FSize:dword

   mov   ecx,offset aTerrain
   invoke   CreateFile,,GENERIC_READ,0,0,OPEN_EXISTING,\
        FILE_ATTRIBUTE_ARCHIVE,rbx
   mov   hFile,eax
        invoke   GetFileSize,eax,0
        mov   FSize,eax
   inc   eax            ; Append a 0 char
   invoke   GlobalAlloc,GMEM_ZEROINIT or GMEM_FIXED,eax
   mov   buff,eax
   mov   [rsp+20h],rbx
   lea   r9d,szReadWrite
        invoke   ReadFile,hFile,eax,FSize

..............................





Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on February 28, 2021, 03:39:36 PM
Programs run under Win7 and Win10
to be Continued. . .
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on February 28, 2021, 03:41:54 PM
to be Continued. . .
Title: Re: NeHe Tutorial in masm64
Post by: six_L on February 28, 2021, 07:59:28 PM
Hi,Mikl__
the tut_40-12.exe works failed, others is ok.
;-------------------------------------------------------
        mov ecx,offset FileName2 ;<==
        xor r8d,r8d
mov [rsp+30h],r8
invoke CreateFile,,GENERIC_READ,,0,OPEN_EXISTING,FILE_FLAG_SEQUENTIAL_SCAN
        mov esi,eax         ;<==
        invoke GetFileSize,eax,0
        mov FSize,eax
inc eax ; Append a 0 char
invoke GlobalAlloc,GMEM_ZEROINIT or GMEM_FIXED,eax
mov texture,eax        ;<==
        mov edi,eax
lea r9d,szReadWrite
        and qword ptr [rsp+20h],0
        invoke ReadFile,esi,eax,FSize
        invoke CloseHandle,esi         ;<==
mov esi,edi
        add esi,[rdi + BITMAPFILEHEADER.bfOffBits]
lea edi,[rdi + sizeof BITMAPFILEHEADER]
mov eax,[rdi + BITMAPINFOHEADER.biWidth]
        mov w,eax
        movzx eax, word ptr [rdi + BITMAPINFOHEADER.biHeight]
        mov h,eax
;--------------------------------------------------------------
mov edx,offset Texture1_Id               ;<==
invoke glGenTextures,1

HANDLE, ADDRESS should be QWORD.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 01, 2021, 12:44:12 AM
to be Continued. . .
Title: Re: NeHe Tutorial in masm64
Post by: six_L on March 01, 2021, 01:10:45 AM
Hi,Mikl__
Now, the tut_40-12.exe works ok. :thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on March 03, 2021, 02:26:25 AM

All was good (except one) until this time.
:skrewy: Courage
Title: Re: NeHe Tutorial in masm64
Post by: LiaoMi on March 03, 2021, 05:45:10 AM
NeHe OpenGL Tutorials.pdf - http://bandido.ch/programming/Opengl_Tutorial.pdf
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 06, 2021, 05:35:37 PM
Lesson #44: 3D-Lens Flare With Occlusion Testing

Learn how to do lens flares by extending a glCamera class. If you look at a lens flare you will notice that they all share one thing in common. They all seem to move through the center of the screen. With this in mind you could actually just throw out the z coordinate and make your flares all 2D. The only problem with this approach is without a z coordinate how do you find out if the camera is looking at the light source or not? In this tutorial we will be making 3D lens flares so get ready for a little bit of math.

https://nehe.gamedev.net/tutorial/3d_lens_flare_with_occlusion_testing/16007/ (https://nehe.gamedev.net/tutorial/3d_lens_flare_with_occlusion_testing/16007/)

Interaction:
There are asm-\bmp-\exe-files and cursor in the 44.zip attachment.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 07, 2021, 01:11:03 PM
to be Continued. . .
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 07, 2021, 01:32:27 PM
to be Continued. . .
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 07, 2021, 01:36:58 PM
to be Continued. . .
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 07, 2021, 01:41:35 PM
to be Continued. . .
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 07, 2021, 01:45:46 PM
to be Continued. . .
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 07, 2021, 01:54:53 PM
to be Continued. . .

P.S. File movie0.avi for Lesson #35 is here (https://yadi.sk/i/J4bVuX4H3JdByJ)
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 07, 2021, 02:02:50 PM
to be Continued. . .
Title: Re: NeHe Tutorial in masm64
Post by: avcaballero on March 07, 2021, 08:30:34 PM
Hey, Mikl, good job  :thumbsup:

They all work well to me except 12, 22, 29, 32, 33, 35
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 07, 2021, 11:21:06 PM
¡Hola caballero!
In that message  (http://masm32.com/board/index.php?topic=8722.msg101121#msg101121), I have already laid out lesson #12 and six_L wrote
QuoteNow, the tut_40-12.exe works ok. :thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on March 08, 2021, 02:01:30 AM

38 is beatifull with all this butterfly.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 10, 2021, 09:56:22 AM
Hi caballero, TouEnMasm and six_L!
Can you briefly describe what's wrong with 22, 29, 32, 33, 35? What happens when you run these programs in Win10?
Title: Re: NeHe Tutorial in masm64
Post by: six_L on March 10, 2021, 07:13:29 PM
Hi,Mikl__
First of all, thank you for the great work! :thumbsup:
a few exe files don't work. there are the tut_40-22.exe, tut_40-29.exe,tut_40-32.exe,tut_40-33.exe,tut_40-35.exe.
they have the common performance:"double click exe,don't start up, no any messages, mouse icon only rotating for a moment."
the tut_40-37.exe works fine at sometime.
Title: Re: NeHe Tutorial in masm64
Post by: avcaballero on March 10, 2021, 08:38:50 PM
When you execute the program, it dessapears with no info. This issue happens in 22, 29, 32, 33, 35.
Title: Re: NeHe Tutorial in masm64
Post by: six_L on March 10, 2021, 09:26:09 PM
the tut_40-37.exe works failed at sometime.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 11, 2021, 02:28:45 PM
to be Continued. . .
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 11, 2021, 02:30:51 PM
to be Continued. . .
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 11, 2021, 02:35:08 PM
to be Continued. . .
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on March 11, 2021, 06:26:54 PM
Hélas,
Quote
win10_29_33_35\35\tut_40-35.exe

(2e28.3af4): Access violation - code c0000005 (first chance)
First chance exceptions are reported before any exception handling.
This exception may be expected and handled.
avifil32!AVIStreamInfoW+0x25:
00000000`001c70a5 488b06          mov     rax,qword ptr [rsi] ds:00000000`00000000=????????????????


There is here too many offset used in code ,change them by lea.

Quote
   mov   edx,offset psi         ;wrong usage of offset in code ,only valuable to point data
   invoke   AVIStreamInfo,pavi,,sizeof psi;   ; Reads information about the stream into psi


Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on March 11, 2021, 10:40:43 PM
Hi, Yves!
Why "Hélas" ?
Lesson #35 doesn't work, it's not scary. It will work later ... (https://wasm.in/styles/smiles_s/don-t_mention.gif)Do lessons #29, #32, #33 work?
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on March 12, 2021, 03:25:55 AM
#29, #32, #33  works OK
a rotating cube ,TGA,a country.
Title: Re: NeHe Tutorial in masm64
Post by: six_L on March 12, 2021, 05:22:48 AM
Hi,Mikl__
29,32,33 works fine now.  :thumbsup:
35,37 can't work.
Title: Re: NeHe Tutorial in masm64
Post by: avcaballero on March 12, 2021, 06:25:39 AM
32.- After a while playing with it, it hangs up and disappears suddenly
35.- Doesn' work
37.- It works ok to me
Title: Re: NeHe Tutorial in masm64
Post by: FORTRANS on March 13, 2021, 01:41:46 AM
Hi,

   Number 24 does not work for me.  A warning
about executing it and then nothing.  Windows 8.1
and 10.

Steve
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on April 06, 2021, 02:47:23 PM
Lesson #31: Model Loading

This tutorial will teach you how to load in and display texture mapped Milkshape3D models. This tutorial is quite advanced so make sure you understand the previous lessons before you attempt the code in this tutorial.
http://nehe.gamedev.net/tutorial/model_loading/16004/ (http://nehe.gamedev.net/tutorial/model_loading/16004/)

There are asm\exe-files, data folder with wood.bmp and model.ms3d files and cursor in the attachment.
Title: Re: NeHe Tutorial in masm64
Post by: avcaballero on April 06, 2021, 06:38:05 PM
Hi, Mikl, works fine here  :thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on April 10, 2021, 09:19:41 AM
Not interested? You'll write about it, please (https://wasm.in/styles/smiles_s/scratch_one-s_head.gif)
Title: Re: NeHe Tutorial in masm64
Post by: jj2007 on April 10, 2021, 09:24:33 AM
Quote from: Mikl__ on April 10, 2021, 09:19:41 AM
Not interested? You'll write about it, please (https://wasm.in/styles/smiles_s/scratch_one-s_head.gif)

Dear Mikl,

What you are doing is fantastic :thumbsup:

There are two main reasons why people don't answer your posts:
1. Busy chasing their bugs :sad:
2. They have no hope to catch up with you :tongue:

(I plead guilty for 1+2)

Keep up the good work, we are watching in awe :thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on April 23, 2021, 05:57:30 PM
Quote35 can't work
Hi, All!
Is there the file movie0.avi (https://yadi.sk/i/J4bVuX4H3JdByJ) in the same folder as the file tut_40-35.exe (http://masm32.com/board/index.php?action=dlattach;topic=8722.0;attach=11610)?
Title: Re: NeHe Tutorial in masm64
Post by: HSE on April 26, 2021, 08:34:33 AM
Hi Mikl__!

Binary work perfectly here in Win7  :thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on April 26, 2021, 05:10:07 PM
Hi, HSE!
I checked tut_40-35.exe in Win7 and Win10, the program worked in both. But the rest are silent and I do not know whether the program works for them or does not work (https://wasm.in/styles/smiles_s/sad.gif)
Title: Re: NeHe Tutorial in masm64
Post by: avcaballero on April 26, 2021, 05:26:50 PM
tut_40-35 seems that doesn't work to me. I put "movie0.avi" in the same folder, execute it, and appears a black window that close and dissapears. W10.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 03, 2021, 08:39:05 AM
Hello, All!
Can anyone please help me? I need a exe-file from NeHe 30th lesson (https://nehe.gamedev.net/tutorial/collision_detection/17005/) compiled in x64 mode, best with optimization off.
Thank you so much for your support! (https://cyberstatic.net/images/smilies/senor.gif)
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on July 04, 2021, 05:11:35 PM
Hello,
This one resist a little.
I get  VS2019 using the C:\WinDDK\7600.16385.1\lib\win7\amd64:
Quote
3 externes not solved
Erreur   LNK2001   symbole externe non résolu _Init_thread_epoch   NeheLesson30   H:\VC_directory\vc_nehe_lesson\Lesson30\Lesson30.obj   1   
Erreur   LNK2019   symbole externe non résolu _Init_thread_footer référencé dans la fonction "int __cdecl CreateGLWindow(char *,int,int,int,int)" ..
Erreur   LNK2019   symbole externe non résolu _Init_thread_header référencé dans la fonction "int __cdecl CreateGLWindow(char *,int,int,int,int)" (?
CreateGLWindow@@YAHPEADHHHH@Z)   NeheLesson30   H:\VC_directory\vc_nehe_lesson\Lesson30\Lesson30.obj   1   


Help to find those ones is needed


Title: Re: NeHe Tutorial in masm64
Post by: TimoVJL on July 04, 2021, 06:01:42 PM
Here is asm-files generated with msvc 2013
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 04, 2021, 11:53:58 PM
Friends, thank you so much!
Timo, kiitos paljon!
(https://wasm.in/styles/smiles_s/drinks.gif) (https://wasm.in/styles/smiles_s/party.gif)
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 11, 2021, 12:12:48 PM
Lesson #30: Collision Detection

In this tutorial you will learn the basics of collision detection, collision response, and physically based modelling effects. This tutorial concentrates more on how collision detection works than on the actual code, although all of the important code is explained. It's important to note, this is an ADVANCED tutorial. Don't expect to read through the tutorial once and understand everything about collision detection. It's a complex topic, and this tutorial will only get you started.

https://nehe.gamedev.net/tutorial/collision_detection/17005/ (https://nehe.gamedev.net/tutorial/collision_detection/17005/)

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

Interaction:
continuation... (http://masm32.com/board/index.php?topic=8722.msg103392#msg103392)
Title: Re: NeHe Tutorial in masm64
Post by: jj2007 on July 11, 2021, 12:15:50 PM
#30 works like a charm and looks quite impressive, Mikl :thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 11, 2021, 12:24:42 PM
I suffered for a long time with 30th lesson on my own (https://wasm.in/styles/smiles_s/dash1.gif) until Timo helped to me (https://wasm.in/styles/smiles_s/friends.gif). Many thanks to Timo! (https://wasm.in/styles/smiles_s/yes4.gif)
Title: Re: NeHe Tutorial in masm64
Post by: Biterider on July 11, 2021, 03:04:50 PM
Very cool
The big effort seems to be worth it  :thumbsup:

Biterider
Title: Re: NeHe Tutorial in masm64
Post by: avcaballero on July 11, 2021, 07:02:35 PM
Hello, Breaking bad Mikl  :biggrin:
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on July 12, 2021, 12:52:59 AM
Virus?!

Title: Re: NeHe Tutorial in masm64
Post by: jj2007 on July 12, 2021, 01:14:39 AM
Quote from: TouEnMasm on July 12, 2021, 12:52:59 AM
Virus?!

See a doctor, Yves, if you have a virus.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 12, 2021, 01:23:07 AM
Quote from: TouEnMasmVirus?!
Bonjour, TouEnMasm!
Là est ASM-source, si vous pensez que j'ai mis un virus dans le programme, essayez de créer le programme vous-même ...
Title: Re: NeHe Tutorial in masm64
Post by: six_L on July 12, 2021, 03:04:12 AM
Hi,Mikl__
the lesson30 is very very good. :thumbsup: :thumbsup: :thumbsup:
thanks you has done much effective work with opengl.  :eusa_boohoo: :eusa_boohoo: :eusa_boohoo:
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on July 12, 2021, 03:31:42 AM
Quote
Bonjour, TouEnMasm!
Là est ASM-source, si vous pensez que j'ai mis un virus dans le programme, essayez de créer le programme vous-même ...
be cool I don't think that.
Probable reason "WinMain   proc"    is not standard  and had no ret  , must be a question for AV

WinMain proc
local msg:MSG

xor ebx,ebx
        mov edi,offset szClassName
        mov esi,IMAGE_BASE
        mov ecx,offset FileName
invoke LoadCursorFromFile
        push rax ;hIconSm
push rdi ;lpszClassName
push rbx ;lpszMenuName
push COLOR_WINDOWTEXT+1;hbrBackground
push rax ;hCursor
push rax        ;hIcon
push rsi ;hInstance
push rbx        ;cbClsExtra & cbWndExtra
pushaddr WndProc;lpfnWndProc
mov rax,(CS_HREDRAW or CS_VREDRAW or CS_OWNDC)shl 32 \
or (sizeof WNDCLASSEX)
push rax ;cbSize & style
invoke RegisterClassEx,esp ;addr WNDCLASSEX

push rbx
push rsi ;rsi = 400000h
shl esi,9 ;rsi = CW_USEDEFAULT
push rbx
push rbx
push WINDOWHEIGHT
push WINDOWWIDTH
push rsi
push rsi
sub esp,20h
    invoke CreateWindowEx,0,edi,edi,WS_OVERLAPPEDWINDOW or \
WS_CLIPCHILDREN or WS_CLIPSIBLINGS or WS_VISIBLE
;öèêë ñîîáùåíèé
    lea edi,msg
@@: invoke GetMessage,edi,0,0,0
invoke DispatchMessage,edi
jmp @b
WinMain endp
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 12, 2021, 08:40:36 AM
Bonjour, TouEnMasm!
For the normal completion of the Windows program, it is enough to process the WM_DESTROY message
WndProc proc hWin:QWORD,uMsg:QWORD,wParam:QWORD,lParam:QWORD
        mov hWin,rcx

        cmp edx,WM_CREATE
je      wmCREATE
        cmp edx,WM_SIZE
je      wmSIZE
        cmp edx,WM_PAINT
je      wmPAINT
        cmp edx,WM_DESTROY
je      wmDESTROY     
        cmp edx,WM_KEYDOWN
je      wmKEYDOWN
        cmp edx,WM_TIMER
je      wmTIMER
leave
jmp NtdllDefWindowProc_
wmDESTROY::invoke wglMakeCurrent,0,0
invoke wglDeleteContext,hRC
invoke ReleaseDC,hWin,hDC
invoke KillTimer,hWin,10
invoke RtlExitUserProcess,NULL; <----
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 13, 2021, 01:50:16 AM
Lesson #30: Collision Detection. Ultimate gloss

Now, when the program has started working, we will eliminate the discovered disadvantages
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on July 13, 2021, 05:25:22 PM
 :thumbsup:
The AV don't protest
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 18, 2021, 09:08:41 AM
Hello, All!
Now I'm dealing with lesson #43 (FreeType fonts in OpenGL (https://nehe.gamedev.net/tutorial/freetype_fonts_in_opengl/24001/)). Can anyone help create structures for the 64 bit masm?
Title: Re: NeHe Tutorial in masm64
Post by: jj2007 on July 18, 2021, 09:44:08 AM
From what I see in FreeType.h (https://chromium.googlesource.com/chromium/src/third_party/freetype2/+/2.6.5/include/freetype/freetype.h), Ft_Face is just a handle; same for FT_Library. But I'm not a C guy...
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 18, 2021, 10:29:40 AM
Thank you jj
How to translate this FT_shit into normal masm-structures with real4, real8, qword and dword? Moreover, take into account the specifics of masm64?
FT_Int  = signed int
FT_Long = signed long
FT_String*
FT_Bitmap_Size*
FT_CharMap*
FT_Pos = signed long
FT_Generic =
---------------------------------------
typedef struct  FT_BBox_
  {
    FT_Pos  xMin, yMin;
    FT_Pos  xMax, yMax;

  } FT_BBox;
---------------------------------------------------
FT_UShort = unsigned short
FT_Short  = signed short
-------------------------------------------------------
typedef struct  FT_Bitmap_
  {
    unsigned int    rows;
    unsigned int    width;
    int             pitch;
    unsigned char*  buffer;
    unsigned short  num_grays;
    unsigned char   pixel_mode;
    unsigned char   palette_mode;
    void*           palette;

  } FT_Bitmap;
----------------------------------------------------
typedef struct  FT_BitmapGlyphRec_
  {
    FT_GlyphRec  root;
    FT_Int       left;
    FT_Int       top;
    FT_Bitmap    bitmap;

  } FT_BitmapGlyphRec;
-------------------------------------------------------
typedef struct  FT_GlyphRec_
  {
    FT_Library             library;
    const FT_Glyph_Class*  clazz;
    FT_Glyph_Format        format;
    FT_Vector              advance;

  } FT_GlyphRec;
---------------------------------------------------
typedef struct FT_LibraryRec_   *FT_Library
-----------------------------------------------------
typedef struct  FT_Vector_
  {
    FT_Pos  x;
    FT_Pos  y;

  } FT_Vector
------------------------------------------------
typedef struct FT_FaceRec_*  FT_Face
{
    FT_Long           num_faces;
    FT_Long           face_index;

    FT_Long           face_flags;
    FT_Long           style_flags;

    FT_Long           num_glyphs;

    FT_String*        family_name;
    FT_String*        style_name;

    FT_Int            num_fixed_sizes;
    FT_Bitmap_Size*   available_sizes;

    FT_Int            num_charmaps;
    FT_CharMap*       charmaps;

    FT_Generic        generic;

    /*# The following member variables (down to `underline_thickness`) */
    /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size    */
    /*# for bitmap fonts.                                              */
    FT_BBox           bbox;

    FT_UShort         units_per_EM;
    FT_Short          ascender;
    FT_Short          descender;
    FT_Short          height;

    FT_Short          max_advance_width;
    FT_Short          max_advance_height;

    FT_Short          underline_position;
    FT_Short          underline_thickness;

    FT_GlyphSlot      glyph;
    FT_Size           size;
    FT_CharMap        charmap;

    /*@private begin */

    FT_Driver         driver;
    FT_Memory         memory;
    FT_Stream         stream;

    FT_ListRec        sizes_list;

    FT_Generic        autohint;   /* face-specific auto-hinter data */
    void*             extensions; /* unused                         */

    FT_Face_Internal  internal;

    /*@private end */

  } FT_FaceRec;
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on July 18, 2021, 07:01:33 PM
How to translate ?
Put them in correct c syntax and headinc will help you:

typedef  signed int FT_Int;
typedef signed long FT_Long ;
typedef int * FT_String ;
typedef int * FT_Bitmap_Size;
typedef int * FT_CharMap;
typedef  signed long FT_Pos;
typedef  int FT_Generic;      //???????????? by defaut
//---------------------------------------

typedef struct  FT_BBox_
  {
    FT_Pos  xMin, yMin;
    FT_Pos  xMax, yMax;

  } FT_BBox;
//---------------------------------------------------
typedef unsigned short FT_UShort;
signed short FT_Short  ;
//-------------------------------------------------------
typedef struct  FT_Bitmap_
  {
    unsigned int    rows;
    unsigned int    width;
    int             pitch;
    unsigned char*  buffer;
    unsigned short  num_grays;
    unsigned char   pixel_mode;
    unsigned char   palette_mode;
    void*           palette;

  } FT_Bitmap;
//----------------------------------------------------
typedef struct  FT_BitmapGlyphRec_
  {
    FT_GlyphRec  root;
    FT_Int       left;
    FT_Int       top;
    FT_Bitmap    bitmap;

  } FT_BitmapGlyphRec;
//-------------------------------------------------------
typedef struct  FT_GlyphRec_
  {
    FT_Library             library;
    const FT_Glyph_Class*  clazz;
    FT_Glyph_Format        format;
    FT_Vector              advance;

  } FT_GlyphRec;
//---------------------------------------------------
typedef struct FT_LibraryRec_   *FT_Library;
//-----------------------------------------------------
typedef struct  FT_Vector_
  {
    FT_Pos  x;
    FT_Pos  y;

  } FT_Vector;
------------------------------------------------
typedef struct FT_FaceRec_
{
    FT_Long           num_faces;
    FT_Long           face_index;

    FT_Long           face_flags;
    FT_Long           style_flags;

    FT_Long           num_glyphs;

    FT_String*        family_name;
    FT_String*        style_name;

    FT_Int            num_fixed_sizes;
    FT_Bitmap_Size*   available_sizes;

    FT_Int            num_charmaps;
    FT_CharMap*       charmaps;

    FT_Generic        generic;

    /*# The following member variables (down to `underline_thickness`) */
    /*# are only relevant to scalable outlines; cf. @FT_Bitmap_Size    */
    /*# for bitmap fonts.                                              */
    FT_BBox           bbox;

    FT_UShort         units_per_EM;
    FT_Short          ascender;
    FT_Short          descender;
    FT_Short          height;

    FT_Short          max_advance_width;
    FT_Short          max_advance_height;

    FT_Short          underline_position;
    FT_Short          underline_thickness;

    FT_GlyphSlot      glyph;
    FT_Size           size;
    FT_CharMap        charmap;

    /*@private begin */

    FT_Driver         driver;
    FT_Memory         memory;
    FT_Stream         stream;

    FT_ListRec        sizes_list;

    FT_Generic        autohint;   /* face-specific auto-hinter data */
    void*             extensions; /* unused                         */

    FT_Face_Internal  internal;

    /*@private end */

  } FT_FaceRec,*  FT_Face;

Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 18, 2021, 10:14:09 PM
Bonjour, TouEnMasm!
thank you for headinc.exe! What is XMASM ? qword? dword?


typedef struct  FT_Bitmap_|
  {|FT_Bitmap   STRUCT DEFALIGNMASM
    unsigned int    rows;|   rows DWORD ?
    unsigned int    width;|   awidth DWORD ?
    int             pitch;|   pitch DWORD ?
    unsigned char*  buffer;|   buffer XMASM ?;<----?
    unsigned short  num_grays;|   num_grays WORD ?
    unsigned char   pixel_mode;|   pixel_mode BYTE ?
    unsigned char   palette_mode;|     palette_mode BYTE ?
    void*           palette;|    palette XMASM ?;<----?
  } FT_Bitmap;|FT_Bitmap      ENDS








Title: Re: NeHe Tutorial in masm64
Post by: LiaoMi on July 18, 2021, 10:41:13 PM
Quote from: Mikl__ on July 18, 2021, 10:14:09 PM
Bonjour, TouEnMasm!
thank you for headinc.exe! What is XMASM ? qword? dword?


typedef struct  FT_Bitmap_|
  {|FT_Bitmap   STRUCT DEFALIGNMASM
    unsigned int    rows;|   rows DWORD ?
    unsigned int    width;|   awidth DWORD ?
    int             pitch;|   pitch DWORD ?
    unsigned char*  buffer;|   buffer XMASM ?;<----?
    unsigned short  num_grays;|   num_grays WORD ?
    unsigned char   pixel_mode;|   pixel_mode BYTE ?
    unsigned char   palette_mode;|     palette_mode BYTE ?
    void*           palette;|    palette XMASM ?;<----?
  } FT_Bitmap;|FT_Bitmap      ENDS



Hi Mikl,

You should take into account that before converting, you need to collect all the variable definitions in one file, after that you need to take into account the structure of the header files, the order of defining variables, only in this case you can get the correct result. An alternative method is to add all types to the converter configuration, but I would not do that, since this will create confusion.

XMASM = PTR
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 19, 2021, 12:02:08 AM
Thank you LiaoMi!
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on July 21, 2021, 12:14:08 AM

I try to re-compile your source with:
Microsoft (R) Macro Assembler (x64) Version 14.29.30038.1
I couldn't say it is successfull.
With the MASM64 package a lot of of problems with include.
I have downloaded your includes  and ML64 say that DQ is not allowed in structures and more !.
Could help me a little?
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 21, 2021, 07:55:44 AM
Bonjour, Yves!
Oui, je vais t'aider... (https://wasm.in/styles/smiles_s/smile3.gif)
Is Lession#1 (http://masm32.com/board/index.php?topic=8722.msg95272#msg95272) worked?
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 24, 2021, 06:33:54 PM
TouEnMasm, où es tu? (https://wasm.in/styles/smiles_s/scratch_one-s_head.gif)
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on July 24, 2021, 09:09:41 PM
Hello,
I will test it as soon as possible.
Thanks
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on July 25, 2021, 01:06:32 AM
Sorry,After added hWin in data and further little corrections,I get

ML64.exe  tut_40-01.asm
C:\Users\luce\Downloads\01
Microsoft (R) Macro Assembler (x64) Version 14.29.30038.1
Copyright (C) Microsoft Corporation.  All rights reserved.

Assembling: tut_40-01.asm

C:\install64\include64\gdi32.inc(1485) : error A2163:non-benign structure redefinition: incorrect initializers : POLYTEXT
tut_40-01.asm(17) : error A2005:symbol redefinition : MSG
tut_40-01.asm(51) : error A2070:invalid instruction operands
tut_40-01.asm(57) : error A2012:PROC, MACRO, or macro repeat directive must precede LOCAL
tut_40-01.asm(58) : error A2012:PROC, MACRO, or macro repeat directive must precede LOCAL
tut_40-01.asm(59) : error A2012:PROC, MACRO, or macro repeat directive must precede LOCAL
tut_40-01.asm(60) : error A2012:PROC, MACRO, or macro repeat directive must precede LOCAL
tut_40-01.asm(61) : error A2012:PROC, MACRO, or macro repeat directive must precede LOCAL
tut_40-01.asm(96) : error A2001:immediate operand not allowed
tut_40-01.asm(144) : error A2008:syntax error : endp
tut_40-01.asm(146) : error A2008:syntax error : dq
tut_40-01.asm(148) : error A2006:undefined symbol : PIXELFORMATDESCRIPTOR
tut_40-01.asm(148) : error A2175:invalid qualified type
tut_40-01.asm(79) : error A2006:undefined symbol : wglMakeCurrent
invoke(30): Macro Called From
  tut_40-01.asm(79): Main Line Code
tut_40-01.asm(80) : error A2006:undefined symbol : wglDeleteContext
invoke(30): Macro Called From
  tut_40-01.asm(80): Main Line Code
tut_40-01.asm(105) : error A2006:undefined symbol : wglCreateContext
invoke(30): Macro Called From
  tut_40-01.asm(105): Main Line Code
tut_40-01.asm(108) : error A2006:undefined symbol : wglMakeCurrent
invoke(46): Macro Called From
  tut_40-01.asm(108): Main Line Code
tut_40-01.asm(115) : error A2006:undefined symbol : w
tut_40-01.asm(117) : error A2006:undefined symbol : h
tut_40-01.asm(118) : error A2006:undefined symbol : glViewport
invoke(30): Macro Called From
  tut_40-01.asm(118): Main Line Code
tut_40-01.asm(119) : error A2006:undefined symbol : GL_PROJECTION
movReg64Arg(11): Macro Called From
  invoke(14): Macro Called From
   tut_40-01.asm(119): Main Line Code
tut_40-01.asm(119) : error A2006:undefined symbol : glMatrixMode
invoke(30): Macro Called From
  tut_40-01.asm(119): Main Line Code
tut_40-01.asm(120) : error A2006:undefined symbol : glLoadIdentity
invoke(56): Macro Called From
  tut_40-01.asm(120): Main Line Code
tut_40-01.asm(124) : error A2006:undefined symbol : w
tut_40-01.asm(125) : error A2006:undefined symbol : h
tut_40-01.asm(128) : error A2006:undefined symbol : gluPerspective
invoke(56): Macro Called From
  tut_40-01.asm(128): Main Line Code
tut_40-01.asm(130) : error A2006:undefined symbol : GL_MODELVIEW
movReg64Arg(11): Macro Called From
  invoke(14): Macro Called From
   tut_40-01.asm(130): Main Line Code
tut_40-01.asm(130) : error A2006:undefined symbol : glMatrixMode
invoke(30): Macro Called From
  tut_40-01.asm(130): Main Line Code
tut_40-01.asm(131) : error A2006:undefined symbol : glLoadIdentity
invoke(56): Macro Called From
  tut_40-01.asm(131): Main Line Code
tut_40-01.asm(134) : error A2006:undefined symbol : ps
tut_40-01.asm(138) : error A2006:undefined symbol : glFlush
invoke(56): Macro Called From
  tut_40-01.asm(138): Main Line Code
tut_40-01.asm(140) : error A2006:undefined symbol : ps
tut_40-01.asm(56) : error A2206:missing operator in expression
tut_40-01.asm(56) : error A2006:undefined symbol : uMsg
tut_40-01.asm(56) : error A2096:segment, group, or segment register expected
tut_40-01.asm(149) : error A2006:undefined symbol : PIXELFORMATDESCRIPTOR
tut_40-01.asm(151) : error A2006:undefined symbol : PFD_SUPPORT_OPENGL
tut_40-01.asm(152) : error A2006:undefined symbol : PFD_TYPE_RGBA
tut_40-01.asm(170) : error A2006:undefined symbol : PFD_MAIN_PLANE

Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 25, 2021, 08:17:32 AM
Bonjour, TouEnMasm!
https://disk.yandex.ru/client/disk/TouEnMasm
QuoteMicrosoft (R) Macro Assembler (x64) Version 14.29.30038.1
I saw you have installed Visual Studio 2022
Will share with me ml64.exe and link.exe? It is possible there is a means of solving a problem or dealing with a difficult situation in these programs...
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on July 25, 2021, 05:11:25 PM
Thanks for link but I think I will search another way .
For example the masm nehe in 32 bits for masm ,must be faster.

Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 26, 2021, 08:51:13 PM
QuoteMicrosoft (R) Macro Assembler (x64) Version 14.30.30401.0
Microsoft (R) Incremental Linker Version 14.30.30401.0
I installed Visual Studio 2022 and rebuilt the NeHe tutorials, replacing the ml64.exe and link.exe with newer versions did not result in errors
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on July 27, 2021, 07:13:13 PM

The question seem to be what is the compiler and include files that you are using.
The include files must not be too much big to put here.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 27, 2021, 09:51:08 PM
Bonjour, Yves!
I posted all the include- and lib-files wich I created. Each include- and lib-file has small size. I posted the link https://disk.yandex.ru/client/disk/TouEnMasm, you will try compiling and linking
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on July 27, 2021, 11:45:35 PM
Answered corretly:
****** Name
****** password
****** Not a bot    (words with many russian names and a few european)
****** recall  the memory phrase

Must be a site who is never satisfy until he have your mobile phone number,your credit card and more.

Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 28, 2021, 06:23:37 AM
Bonjour, Yves!
Try to follow the link https://disk.yandex.ru/client/disk/TouEnMasm again
Title: Re: NeHe Tutorial in masm64
Post by: TouEnMasm on July 28, 2021, 04:19:36 PM

Same thing,
After the too many questions i failed on the phone format number ?!
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 28, 2021, 08:25:11 PM
QuoteSame thing, After the too many questions i failed on the phone format number ?!
There shouldn't be any questions, some problems with accessing the virtual disk, but I'll figure it out
Title: Re: NeHe Tutorial in masm64
Post by: HSE on July 28, 2021, 11:01:15 PM
Hi Mikl__ !

Quote from: Mikl__ on July 28, 2021, 08:25:11 PM
There shouldn't be any questions, some problems with accessing the virtual disk, but I'll figure it out
Requiere to create an ID, and provide email adress or phone number. I don't do that, then I don't know what happen next :biggrin:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on July 31, 2021, 06:12:40 PM
Lesson #43: FreeType Fonts in OpenGL

In this tutorial NeHe teaches how to work with font anti-aliasing. Bitmap fonts are usually blocky looking when zoomed, and outline fonts eat up too much CPU. You can now create extremely nice looking fonts using the FreeType library. By using the FreeType library you can create anti-aliased text. The text is easy to rotate and works well with OpenGL's picking functions. The example program is based on lesson 13, and uses the older NeHe basecode. The example is not all that fancy, but after running it, you will see a clear difference between the older WGL Bitmap Font and the new FreeType Font!

https://nehe.gamedev.net/tutorial/freetype_fonts_in_opengl/24001/
There are asm\exe-files, cursor, freetype.dll, freetype.inc and freetype.lib in the 43.zip attachment.

Attention! The program was written and tested under 64-bit Windows seven. The author did not check how the program will behave under Windows 10...
Title: Re: NeHe Tutorial in masm64
Post by: LiaoMi on August 01, 2021, 07:07:03 PM
Quote from: Mikl__ on July 31, 2021, 06:12:40 PM
Lesson #43: FreeType Fonts in OpenGL

In this tutorial NeHe teaches how to work with font anti-aliasing. Bitmap fonts are usually blocky looking when zoomed, and outline fonts eat up too much CPU. You can now create extremely nice looking fonts using the FreeType library. By using the FreeType library you can create anti-aliased text. The text is easy to rotate and works well with OpenGL's picking functions. The example program is based on lesson 13, and uses the older NeHe basecode. The example is not all that fancy, but after running it, you will see a clear difference between the older WGL Bitmap Font and the new FreeType Font!

https://nehe.gamedev.net/tutorial/freetype_fonts_in_opengl/24001/
There are asm\exe-files, cursor, freetype.dll, freetype.inc and freetype.lib in the 43.zip attachment.

Attention! The program was written and tested under 64-bit Windows seven. The author did not check how the program will behave under Windows 10...

Hi Mikl__,

on Windows 10, the text movement is too fast, and the text line is visible just as a line, but not as text.
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 01, 2021, 07:11:32 PM
Hi, LiaoMi!
Thanks for the comment, I will try to fix it ...
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 04, 2021, 10:18:22 AM
I fixed it. Now the program works in Windows 10 too...
There are asm\exe-files, cursor, freetype.dll, freetype.inc and freetype.lib in the 43.zip attachment.
Title: Re: NeHe Tutorial in masm64
Post by: LiaoMi on August 04, 2021, 04:19:26 PM
Quote from: Mikl__ on August 04, 2021, 10:18:22 AM
I fixed it. Now the program works in Windows 10 too...
There are asm\exe-files, cursor, freetype.dll, freetype.inc and freetype.lib in the 43.zip attachment.

Hi Mikl__,

now works flawlessly, thanks!  :thumbsup:
Title: Re: NeHe Tutorial in masm64
Post by: Mikl__ on August 10, 2021, 08:37:58 PM
Lesson #39: Introduction to Physical Simulations

This tutorial demonstrates motion under gravity, a mass with constant velocity, and a mass connected to a spring. An excellent introduction to physical simulation in projects of your own. The code is based on the latest NeHeGL code and the bitmap font code from lesson 14. It features keyboard interaction and heavy commenting.

https://nehe.gamedev.net/tutorial/introduction_to_physical_simulations/18005/
There are asm\exe-files and cursor in the 39.zip attachment.

The program was tested in 64-bit Windows seven and Windows 10... (https://wasm.in/styles/smiles_s/smile3.gif)
Title: Re: NeHe Tutorial in masm64
Post by: jj2007 on August 11, 2021, 08:35:36 AM
Works fine on Win7-64, thanks, Mikl :thumbsup: