-
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: 49/are translated: 39 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
- 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
- Lesson #31: Model Loading
- 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)
- Lesson #35: Playing AVI-Files in OpenGL. 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
- Lesson #40: Rope Physics
- Lesson #41: Volumetric Fog and IPicture Image Loading
- Lesson #42: Multiple Viewports (http://masm32.com/board/index.php?topic=8722.msg95608#msg95608)
- Lesson #43: FreeType Fonts in OpenGL
- Lesson #44: 3D-Lens Flare With Occlusion Testing
- Lesson #45: Vertex Buffer Objects (http://masm32.com/board/index.php?topic=8722.msg96577#msg96577)
- Lesson #46: Fullscreen AntiAliasing
- Lesson #47: CG Vertex Shader
- Lesson #48: ArcBall Rotation (http://masm32.com/board/index.php?topic=8722.msg96806#msg96806)
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:
-
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:
-
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.
-
(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.
-
[Lesson #27: Shadows]
-
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:
-
[Lesson #30: Collision Detection]
-
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
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.
-
[Lesson #31: Model Loading]
-
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"
-
[Lesson #39: Introduction to Physical Simulations]
-
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.
-
[Lesson #40: Rope Physics]
-
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.
-
[Lesson #41: Volumetric Fog and IPicture Image Loading]
-
[Lesson #46: Fullscreen AntiAliasing]
-
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.
-
[Lesson #43: FreeType Fonts in OpenGL]
-
In the name of everybody: thank you, Mikl, for these tutorials - they will become a reference for graphics assembly :thumbsup:
-
[Lesson #44: 3D-Lens Flare With Occlusion Testing]