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- Lesson #1: Setting Up an OpenGL Window (http://masm32.com/board/index.php?topic=8722.msg95272#msg95272)
- Lesson #2: Your First Polygon
- Lesson #3: Adding Color (http://masm32.com/board/index.php?topic=8722.msg95258#msg95258)
- Lesson #4: Rotation (http://masm32.com/board/index.php?topic=8722.msg95260#msg95260)
- Lesson #5: 3D-Shapes (http://masm32.com/board/index.php?topic=8722.msg95261#msg95261)
- Lesson #6: Texture Mapping (http://masm32.com/board/index.php?topic=8722.msg95262#msg95262)
- Lesson #7: Texture Filters, Lighting and Keyboard Control (http://masm32.com/board/index.php?topic=8722.msg95263#msg95263)
- Lesson #8: Blending (http://masm32.com/board/index.php?topic=8722.msg95264#msg95264)
- Lesson #9: Moving Bitmaps in 3D-Space (http://masm32.com/board/index.php?topic=8722.msg95267#msg95267)
- Lesson #10: Loading and Moving Through a 3D-World (http://masm32.com/board/index.php?topic=8722.msg95324#msg95324)
- Lesson #11: Flag Effect (Waving Texture) (http://masm32.com/board/index.php?topic=8722.msg95268#msg95268)
- Lesson #12: Display Lists (http://masm32.com/board/index.php?topic=8722.msg95273#msg95273)
- Lesson #13: Bitmap Fonts (http://masm32.com/board/index.php?topic=8722.msg95274#msg95274)
- Lesson #14: Outline Fonts (http://masm32.com/board/index.php?topic=8722.msg95275#msg95275)
- Lesson #15: Texture Mapped Outline Fonts (http://masm32.com/board/index.php?topic=8722.msg95277#msg95277)
- Lesson #16: Cool Looking Fog (http://masm32.com/board/index.php?topic=8722.msg95278#msg95278)
- Lesson #17: 2D-Texture Font (http://masm32.com/board/index.php?topic=8722.msg95294#msg95294)
- Lesson #18: Quadrics (http://masm32.com/board/index.php?topic=8722.msg95279#msg95279)
- Lesson #19: Particle Engine Using Triangle Strips (http://masm32.com/board/index.php?topic=8722.msg95334#msg95334)
- Lesson #20: Masking (http://masm32.com/board/index.php?topic=8722.msg95349#msg95349)
- Lesson #21: Lines, Antialiasing, Timing, Ortho View and Simple Sounds (http://masm32.com/board/index.php?topic=8722.msg96316#msg96316)
- Lesson #22: Bump-Mapping, Multi-Texturing and Extensions (http://masm32.com/board/index.php?topic=8722.msg95664#msg95664)
- Lesson #23: Sphere Mapping Quadrics In OpenGL (http://masm32.com/board/index.php?topic=8722.msg95544#msg95544)
- Lesson #24: Tokens, Extensions, Scissor Testing and TGA Loading (http://masm32.com/board/index.php?topic=8722.msg95638#msg95638)
- Lesson #25: Morphing and Loading Objects From A File (http://masm32.com/board/index.php?topic=8722.msg95713#msg95713)
- Lesson #26: Clipping and Reflections Using The Stencil Buffer (http://masm32.com/board/index.php?topic=8722.msg95619#msg95619)
- Lesson #27: Shadows (http://masm32.com/board/index.php?topic=8722.msg101041#msg101041)
- Lesson #28: Bezier Patches (http://masm32.com/board/index.php?topic=8722.msg96528#msg96528)
- Lesson #29: Blitter Function, RAW-Texture Loading (http://masm32.com/board/index.php?topic=8722.msg95758#msg95758)
- Lesson #30: Collision Detection (http://masm32.com/board/index.php?topic=8722.msg103366#msg103366)
- Lesson #31: Model Loading (http://masm32.com/board/index.php?topic=8722.msg101939#msg101939)
- Lesson #32: Picking, Alpha Blending, Alpha Testing, Sorting (http://masm32.com/board/index.php?topic=8722.msg95903#msg95903)
- Lesson #33: Loading Compressed and Uncompressed TGA's (http://masm32.com/board/index.php?topic=8722.msg95636#msg95636)
- Lesson #34: Beautiful Landscapes by Means of Height Mapping (http://masm32.com/board/index.php?topic=8722.msg95351#msg95351)
- Lesson #35: Playing AVI-Files in OpenGL: 1-st part (http://masm32.com/board/index.php?topic=8722.msg95512#msg95512), 2-nd part (http://masm32.com/board/index.php?topic=8722.msg96283#msg96283)
- Lesson #36: Radial Blur and Rendering to a Texture (http://masm32.com/board/index.php?topic=8722.msg95280#msg95280)
- Lesson #37: Cel-Shading (http://masm32.com/board/index.php?topic=8722.msg96002#msg96002)
- Lesson #38: Loading Textures From A Resource File and Texturing Triangles (http://masm32.com/board/index.php?topic=8722.msg96009#msg96009)
- Lesson #39: Introduction to Physical Simulations (http://masm32.com/board/index.php?topic=8722.msg103832#msg103832)
- Lesson #40: Rope Physics
- Lesson #41: Volumetric Fog and IPicture Image Loading (http://masm32.com/board/index.php?topic=8722.msg100440#msg100440)
- Lesson #42: Multiple Viewports (http://masm32.com/board/index.php?topic=8722.msg95608#msg95608)
- Lesson #43: FreeType Fonts in OpenGL (http://masm32.com/board/index.php?topic=8722.msg103669#msg103669)
- Lesson #44: 3D-Lens Flare With Occlusion Testing (http://masm32.com/board/index.php?topic=8722.msg101295#msg101295)
- Lesson #45: Vertex Buffer Objects (http://masm32.com/board/index.php?topic=8722.msg96577#msg96577)
- Lesson #46: Fullscreen AntiAliasing (http://masm32.com/board/index.php?topic=8722.msg101092#msg101092)
- Lesson #47: CG Vertex Shader (http://masm32.com/board/index.php?topic=8722.msg101064#msg101064)
- Lesson #48: ArcBall Rotation (http://masm32.com/board/index.php?topic=8722.msg96806#msg96806)
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 (http://masm32.com/board/index.php?topic=9357.msg102661#msg102661)
- 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(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.
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
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
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
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
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:- 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
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:- 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
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:- 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
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
This is quite impressive, Mikl :thumbsup:
(don't expect criticism, we are all watching in awe :smiley:)
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
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:- pressing "Arrow Left"/"Arrow Right" for increase/decrease x-rotation angle
- pressing "Arrow Up"/"Arrow Down" for increase/decrease y-rotation angle
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
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
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
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:- pressing "L/l" ― turn on/off light
- pressing "F/f" ― select texture filter
- pressing "G/g" ― select fog filter
- pressing "Page Up/Down" ― increases/decrease the z-variable and moves the cube towards/away from the viewer
- pressing "Arrow Left/Right" ― increase/decrease x-rotation speed
- pressing "Arrow Up/Down" ― increase/decrease y-rotation speed
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:- pressing "space" ― create complex objects such as sphere, discs, cylinder, cone
- pressing "L/l" ― turn on/off light
- pressing "F/f" ― select texture filter
- pressing "Page Up/Down" ― increases/decrease the z-variable and moves the cube towards/away from the viewer
- pressing "Arrow Left/Right" ― increase/decrease x-rotation speed
- pressing "Arrow Up/Down" ― increase/decrease y-rotation speed
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/)
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/)
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
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:- pressing "+"/"-" ― increases/decrease the variable slowdown
- pressing "Page Up"/"Page Down" ― increases/decrease the z-variable and moves the source of stars towards/away from the viewer
- pressing "Arrow Left"/"Arrow Right" ― increase/decrease x-rotation speed
- pressing "Arrow Up"/"Arrow Down" ― increase/decrease y-rotation speed
There are asm-\exe-\bmp-files and cursor in the attachment
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:- pressing "space" ― switch textures
- pressing "M/m" ― masking is turned on/off
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/)
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)...)
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:- pressing "L/l" ― turn on/off light
- pressing "space" for switch figures (cube, cylinder, sphere, cone)
- pressing "F/f" ― select texture filter
- pressing "Page Up/Down" ― increases/decrease the z-variable and moves towards/away from the viewer
- pressing "Arrow Left/Right" ― increase/decrease x-rotation speed
- pressing "Arraw Up/Down" ― increase/decrease y-rotation speed
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:- pressing "space" ― the maze is reset, and the program starts redrawing a new maze
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:- pressing one of the 4 arrow keys ― the ball is spun right, left, down or up.
- pressing 'A/a' ― zoom you in closer to the ball
- pressing 'Z/z' ― zoom you away from the ball.
- Pressing 'PAGE UP/DOWN' ― increase/decrease the value of height moving the ball up/down.
There are asm-\exe-\bmp-files and cursor in the attachment.
wow, I saw it tonight, and I know what I'll be doing as a side study for the next few days!
wishes: give us more examples :thumbsup: :bgrin:
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:
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:
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.
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:.
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)
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.
Interaction:- pressing "E/e" ― for toggle Emboss/Bumpmapped Mode
- pressing "M/m" ― for toggle Multitexturing
- pressing "B/b" ― for toggle Bumpmapping. This Is Mutually Exclusive With Emboss Mode
- pressing "F/f" ― for toggle Filters.
- CURSOR-KEYS ― rotate the cube
- pressing "Page Up/Down" ― for increases/decrease the z-variable and moves the cube towards/away from the viewer
Lesson #25: Morphing & Loading Objects From A File
Learn how to load simple objects from a text file, and morph smoothly from one object into another. The effect in this tutorial has to be seen to be appreciated. The effect taught in this demo can be used to animated objects similar to the swimming dolphin, or to twist and bend objects into many different shapes. You can also modify the code to use lines or solid polygons. Great effect!
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:- "1/2/3/4": ― toggle figures (sphere, torus, tube, chaos)
- Rotate and Move Figures
- "Page Up/Down" ― increase/decrease z-speed
- "Down/Up Arrow" ― increase/decrease x-speed
- "Right/Left Arrow" ― increase/decrease y-speed
- "Q/q" ― move object away from viewer
- "Z/z" ― move object towards viewer
- "W/w" ― move object up
- "S/s" ― move object down
- "D/d" ― move object right
- "A/a" ― move object left
Lesson #29: Blitter Function, RAW Texture Loading
In this tutorial NeHe teaches how to load .RAW image files. NeHe teaches how to write your own blitter routine to modify textures after they have been loaded. You can copy sections of the first texture into a second texture, you can blend textures together, and you can stretch textures. The same routine can be modified to create realtime plasma and other cool effects!
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.
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:
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.
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:- Pressing "Space" ― Toggle rotation
- "1" ― Toggle outline drawing
- "2" ― Toggle outline anti-aliasing. When drawing the lines, we want to make sure that they are nice and smooth. Initially this value is turned off, but by pressing the "2" key, it can be toggled on/off.
- "Down/Up Arrow" ― decrease/increase line width
There are asm-\exe-\txt-files and cursor in 37.zip attachment.
You are doing a terrific job, Mikl :thumbsup:
Lesson #38: Loading Textures From A Resource File & Texturing Triangles
NeHe wrote this tutorial for all those people that have asking how to load textures from a resource file so that all the textures are stored in the exe-file. The tutorial itself is not all that fancy, and it's definitely not that advanced, but the content is good to know.
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.
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:- pressing "space" ― create complex objects such as sphere, cube, cylinder, cone
- pressing "E/e" ― toggle Environment Mapping Off/On
- pressing "B/b" ― toggle Background Off/On
- "Page Up/Down" ― increases/decrease the z-variable and moves the cube (sphere, cylinder, cone) towards/away from the viewer
Hi Mikl,
The forum is generally quiet, except for the "political" threads about Trump etc. Some years ago we had much more coding activity, and the Laboratory was always full of interesting stuff.
As for myself, I would like one day to explore OpenGL, and your posts will be the most valuable resource. But I have lots of other things to do, not only coding. Don't be sad if there are few downloads. You are doing important work here, my friend :thup:
Another reason is that you are coding in 64 bits now. Previously, we all had exactly the same 32-bit SDK and setup. Now there are several 64-bit SDK versions around, and none of them is as perfect as good ol' Masm32. I can't build your sources, simply because I don't have the matching setup. So I run the exe and that's it...
P.S.: Your butterflies are beautiful :thumbsup:
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.
Your work is really cool. :cool: :thumbsup:
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:- the Left and Right arrow keys rotate the object
- the Up and Down arrow keys raise and lower the resolution
- the SPACE key toggles displaying the control point grid
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.
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.
[delete]
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.
Hi, HSE!
The inc-files are updated with constants from one lesson to next lesson
:thumbsup: Fantastic Mikl! Object is assembled.
I have some linking problems. Perhaps I have to see Uncle Tales :biggrin:
[delete]
Tomorrow I will run 64bits again :thumbsup:
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 ??
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
- MASM64 conversion of NeHe's OpenGL tutorial 21 by Mikl___ There are wav and bmp-files in http://masm32.com/board/index.php?topic=8722.msg96316#msg96316
- Visual C++ OpenGL tutorial 21 by Jeff Molofee (NeHe)
- MASM32 conversion of NeHe's OpenGL tutorial 21 by Christophe Jeannin (Chrishka)
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.
[delete]
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"
[delete]
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.
[delete]
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.
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.
[delete]
[delete]
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.
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).
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:- right click ― return to the previous state of the object
- mouse movement while holding down the left key ― rotation of objects following the cursor
There are asm\exe-files and cursor in the 48.zip attachment.
[delete]
In the name of everybody: thank you, Mikl, for these tutorials - they will become a reference for graphics assembly :thumbsup:
[delete]
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.
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:- 'Arrow Left' Decrease yspeed
- 'Arrow Right' Increase yspeed
- 'Arrow Up' Decrease xspeed
- 'Arrow Down' Increase xspeed
- 'L' Moves Light Right
- 'J' Moves Light Left
- 'I' Moves Light Up
- 'K' Moves Light Down
- 'O' Moves Light Toward Viewer
- 'U' Moves Light Away From Viewer
- 'Numpad6' Move Object Right
- 'Numpad4' move object Left
- 'Numpad8' Move Object Up
- 'Numpad5' Move Object Down
- 'Numpad9' Move Object Toward Viewer
- 'Numpad7' move Object away from viewer
- 'D' move sphere Right
- 'A' move sphere Left
- 'W' move sphere Up
- 'S' move sphere Down
- 'E' move sphere toward viewer
- 'Q' move sphere away from viewer
There are asm\exe-files, Object2.txt and cursor in the 27.zip attachment.
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:
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)
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
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
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
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.
Looks good :thumbsup:
This is how it looks here - does it mean that my graphics card doesn't support it?
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
Apparently not...
Hi,Mikl__
the tur 46 exe works fine here.
:thumbsup:
OH,
The 46 must be the first who work with windows 10.
:thumbsup:
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.
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.
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.
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
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
..............................
Programs run under Win7 and Win10
to be Continued. . .
to be Continued. . .
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.
to be Continued. . .
Hi,Mikl__
Now, the tut_40-12.exe works ok. :thumbsup:
All was good (except one) until this time.
:skrewy: Courage
NeHe OpenGL Tutorials.pdf - http://bandido.ch/programming/Opengl_Tutorial.pdf
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:- 'W', 'S', 'A' and 'D' keys ― to change the direction the camera is pointed in
- '1'/'2' keys ― toggle information on/off
- 'Z' key ― gives the camera a constant forward velocity
- 'C' key ― gives the camera a constant backward velocity
- 'X' key ― stop the camera from moving at all
There are asm-\bmp-\exe-files and cursor in the 44.zip attachment.
to be Continued. . .
to be Continued. . .
to be Continued. . .
to be Continued. . .
to be Continued. . .
to be Continued. . .
P.S. File movie0.avi for Lesson #35 is here (https://yadi.sk/i/J4bVuX4H3JdByJ)
to be Continued. . .
Hey, Mikl, good job :thumbsup:
They all work well to me except 12, 22, 29, 32, 33, 35
¡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:
38 is beatifull with all this butterfly.
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?
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.
When you execute the program, it dessapears with no info. This issue happens in 22, 29, 32, 33, 35.
the tut_40-37.exe works failed at sometime.
to be Continued. . .
to be Continued. . .
to be Continued. . .
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
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?
#29, #32, #33 works OK
a rotating cube ,TGA,a country.
Hi,Mikl__
29,32,33 works fine now. :thumbsup:
35,37 can't work.
32.- After a while playing with it, it hangs up and disappears suddenly
35.- Doesn' work
37.- It works ok to me
Hi,
Number 24 does not work for me. A warning
about executing it and then nothing. Windows 8.1
and 10.
Steve
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.
Hi, Mikl, works fine here :thumbsup:
Not interested? You'll write about it, please (https://wasm.in/styles/smiles_s/scratch_one-s_head.gif)
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:
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)?
Hi Mikl__!
Binary work perfectly here in Win7 :thumbsup:
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)
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.
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)
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
Here is asm-files generated with msvc 2013
Friends, thank you so much!
Timo, kiitos paljon!
(https://wasm.in/styles/smiles_s/drinks.gif) (https://wasm.in/styles/smiles_s/party.gif)
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:- pressing "Arrow Up/Down" ― increases/decrease the z-variable and moves the room towards/away from the viewer
- pressing "Arrow Left/Right" ― room rotation to the left/right
- pressing F2 ― toggle on/off sound
- pressing F3 ― the camera view changes and a (the ball with index 0 in the array) ball is followed. For making the camera following the ball we used its position and velocity vector to position the camera exactly behind the ball and make it look along the velocity vector of the ball.
- pressing "+"/"-" key on the numeric keypad ― increase/decrease balls speed
continuation... (http://masm32.com/board/index.php?topic=8722.msg103392#msg103392)
#30 works like a charm and looks quite impressive, Mikl :thumbsup:
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)
Very cool
The big effort seems to be worth it :thumbsup:
Biterider
Hello, Breaking bad Mikl :biggrin:
Virus?!
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 ...
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:
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
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; <----
Lesson #30: Collision Detection. Ultimate gloss
Now, when the program has started working, we will eliminate the discovered disadvantages
:thumbsup:
The AV don't protest
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?
- FT_Face,
- FT_Library,
- FT_Bitmap,
- FT_BitmapGlyph,
- FT_Glyph
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...
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;
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;
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 |
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
Thank you LiaoMi!
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?
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?
TouEnMasm, où es tu? (https://wasm.in/styles/smiles_s/scratch_one-s_head.gif)
Hello,
I will test it as soon as possible.
Thanks
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
Bonjour,
TouEnMasm!
https://disk.yandex.ru/client/disk/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...
Thanks for link but I think I will search another way .
For example the masm nehe in 32 bits for masm ,must be faster.
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
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.
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
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.
Bonjour, Yves!
Try to follow the link https://disk.yandex.ru/client/disk/TouEnMasm (https://disk.yandex.ru/client/disk/TouEnMasm) again
Same thing,
After the too many questions i failed on the phone format number ?!
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
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:
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/ (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...
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.
Hi, LiaoMi!
Thanks for the comment, I will try to fix it ...
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.
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:
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/ (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)
Works fine on Win7-64, thanks, Mikl :thumbsup:
Hi Mikl__
Can you make a zip of all the OpenGL material you translated to asm from NeHe tutorials? Can you attach it to the first post? And it would be the latest files.
I am interested to read all of them thru.
Cheers, Petter
Hi Petter, I wrote this quite a while ago (2021), but you can try
Hei Petter! Kirjoitin tämän jonkin aikaa sitten (2021), mutta voin yrittää koota sen
Mikl___
@Mikl_
hi!
sometimes the app from 39.zip does not render at all, so you see just black sreen - https://prnt.sc/zq44QZOEaBPF (https://prnt.sc/zq44QZOEaBPF)
but sometimes it runs well.. https://prnt.sc/Yru3TS6UGoZB (https://prnt.sc/Yru3TS6UGoZB)
a mystery!
Win7 x64 SP1
Hi greenozon!
I will try to correct the errors that I find.
Hi Petter!
The archive will too large. The forum masm32.com (https://masm32.com/board/index.php) is not support such large attachments. I will attach it in parts
Respectfully, Mikl__
Hei Petter!
Arkistosta tulee liian suuri. Foorumi ei tue niin suuria investointeja. Täytyy liittää se osiin
Terveisin Mikl__
QuoteHi Petter!
The archive will too large. The forum masm32.com (https://masm32.com/board/index.php) is not support such large attachments. I will attach it in parts
Respectfully, Mikl__
Hei Petter!
Arkistosta tulee liian suuri. Foorumi ei tue niin suuria investointeja. Täytyy liittää se osiin
Terveisin Mikl__
Thank you, I'll download zip's one by one.