摘要: I started learn NeHe OpenGL lessons in university, but I never went though all of his lessons. I wish this time my blog will go though all of content, and figure out all of the OpenGL technology poin... 阅读全文
posted @ 2012-08-23 23:12 opencoder 阅读(315) 评论(0) 推荐(0)
摘要: NeHe OpenGL Lesson02 – Your First Polygon. This lesson shows how to draw polygons with OpenGL API. The following lines are source code that used to draw a triangle. As you see, it is very easy and ... 阅读全文
posted @ 2012-08-23 23:08 opencoder 阅读(245) 评论(0) 推荐(0)
摘要: This sample shows how to add color to your primitives. The main idea used here is that specify the vertex color for each vertex or the next all vertexes. And the vertex color was added by the functio... 阅读全文
posted @ 2012-08-23 23:03 opencoder 阅读(213) 评论(0) 推荐(0)
摘要: This program shows how to make the objects rotated. OpenGL API is kind of so low level graphic API that allows the user create some separate matrix components. Here this sample just give some basic... 阅读全文
posted @ 2012-08-23 22:58 opencoder 阅读(201) 评论(0) 推荐(0)
摘要: This programs show how to build 3d objects and render them with OpenGL. Those shapes displayed here are very primitive, they were hard code in the source code. When you come to some games, you wil... 阅读全文
posted @ 2012-08-23 22:54 opencoder 阅读(281) 评论(0) 推荐(0)
摘要: This program shows us how to apply texture mapping with OpenGL. Well, texture mapping increase the visual effect significantly. And also until now, the texture mapping was vastly used. Those textures... 阅读全文
posted @ 2012-08-23 22:51 opencoder 阅读(364) 评论(0) 推荐(0)
摘要: This sample shows us how to bring texture mapping, different texture filtering, lighting and Widget keyboard control together. Keyboard ‘page up’ or ‘page down’ to zoom out or zoom in. Key ‘L’ tog... 阅读全文
posted @ 2012-08-23 22:47 opencoder 阅读(391) 评论(0) 推荐(0)
摘要: This sample shows us how to use blending operation with OpenGL API. Blending, I guess, may be the only way to access the destination pixels from the current color buffer. In the previous lesson, we c... 阅读全文
posted @ 2012-08-23 22:41 opencoder 阅读(278) 评论(0) 推荐(0)
摘要: So Cool! Well, I would like to say that this sample shows us the beautiful and the magic of mathematic. The programming knowledge or OpenGL API involved in here are not too much or just a very lit... 阅读全文
posted @ 2012-08-23 22:38 opencoder 阅读(170) 评论(0) 推荐(0)
摘要: This sample shows us a small proto-type how to write a game with OpenGL. This is the first lesson that abandon using hard code game world. It seems like a engine, a small one. What is an engine? An e... 阅读全文
posted @ 2012-08-23 22:35 opencoder 阅读(378) 评论(0) 推荐(0)
摘要: This demo shows us how to wave texture though vertex position changing at the running time instead of moving texture coordinated. You could get such cool effect with the method used here. But obvious... 阅读全文
posted @ 2012-08-23 22:27 opencoder 阅读(383) 评论(0) 推荐(0)
摘要: This lesson shows us how to use the OpenGL display list. Display list is a special feature with OpenGL, that D3D does not have. A Display list is an OpenGL commands optimized cache. Some of it’s c... 阅读全文
posted @ 2012-08-23 22:24 opencoder 阅读(267) 评论(0) 推荐(0)
摘要: This demo shows us how to display some characters on the screen with OpenGL bitmap fonts. This is a very useful feature that we could used to display some text, debug information, fps or even menu co... 阅读全文
posted @ 2012-08-23 22:19 opencoder 阅读(339) 评论(0) 推荐(0)
摘要: This sample program show us how to display 3d characters on the screen. Those characters are called outline fonts. They are different from the bitmap fonts that are 2d only. Outline fonts are creat... 阅读全文
posted @ 2012-08-23 22:15 opencoder 阅读(373) 评论(0) 推荐(0)
摘要: This sample program shows us how to texture mapping outline fonts. It seems the outline fonts does not generate 3d font object texture coordinates for us. And luckily, OpenGL provide some interfac... 阅读全文
posted @ 2012-08-23 22:11 opencoder 阅读(319) 评论(0) 推荐(0)
摘要: This sample shows us how to use OpenGL fog feature. we will 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... 阅读全文
posted @ 2012-08-23 22:06 opencoder 阅读(244) 评论(0) 推荐(0)
摘要: This sample show us how to display 2D texture font on the screen with OpenGL. This 2d texture font is just an image painted with characters instead of windows fonts. The mainly workflow for 2D text... 阅读全文
posted @ 2012-08-23 22:00 opencoder 阅读(493) 评论(0) 推荐(0)
摘要: This sample will introduce us to the wonderful world of quadrics. With quadrics you can easily create complex objects such as spheres, discs, cylinders and cones. These object can be created with jus... 阅读全文
posted @ 2012-08-23 21:55 opencoder 阅读(301) 评论(0) 推荐(0)
摘要: Here is a simple particle engine. The particle effect is a very important element in game. It could be used simulate an explosion, water fountain, flaming star and so on. Generally speaking, a par... 阅读全文
posted @ 2012-08-23 21:51 opencoder 阅读(559) 评论(0) 推荐(0)
摘要: This sample shows us how to implement masking effect with OpenGL using blend operation instead of alpha testing. Masking is an important effect, that could be used build tree leaves, some complicated... 阅读全文
posted @ 2012-08-23 21:46 opencoder 阅读(325) 评论(0) 推荐(0)
摘要: This sample shows us a simple 2d game with only basic OpenGL knowledge: draw lines, timing, ortho view. Draw Lines The way to draw lines is the same as draw other primitives, just set GL_LINES o... 阅读全文
posted @ 2012-08-23 21:41 opencoder 阅读(289) 评论(0) 推荐(0)
摘要: This sample shows how to do bump mapping with OpenGL. The bump mapping technology used here for approximating diffuse lighting. The concept behind this article was Embossed bump mapping. The frag... 阅读全文
posted @ 2012-08-23 21:33 opencoder 阅读(582) 评论(0) 推荐(0)
摘要: This sample shows us how to do a Sphere Mapping when work with auto-generate texture coordinates in OpenGL. For sphere mapping, you need a sphere map. What you need to do in PS is selecting distor... 阅读全文
posted @ 2012-08-23 21:26 opencoder 阅读(468) 评论(0) 推荐(0)
摘要: This sample shows us how to extract the OpenGL extensions into tokens and scissor testing. In the masking example, I already wrote some code of loading TGA textures. But here, another TGA loading ... 阅读全文
posted @ 2012-08-23 21:22 opencoder 阅读(252) 评论(0) 推荐(0)
摘要: This sample shows us how to do vertex morphing and load objects from text files. For vertex morphing, you could apply such technology to transform smoothly object A to object B, like transform a h... 阅读全文
posted @ 2012-08-23 21:19 opencoder 阅读(272) 评论(0) 推荐(0)
摘要: This sample shows us how to display a reflection effect with stencil buffer and plane clipping in OpenGL. The stencil buffer usually goes with the depth buffer in the display card, and also called ma... 阅读全文
posted @ 2012-08-23 21:14 opencoder 阅读(871) 评论(0) 推荐(0)
摘要: This sample shows us how to create dynamic volume shadows with OpenGL. The main technology used here are, create the shadow volumes, figure out the shadow area in the stencil buffer. The first pr... 阅读全文
posted @ 2012-08-23 21:05 opencoder 阅读(736) 评论(0) 推荐(0)
摘要: Well, this samples shows us how to create Bzeier Patches based on some math ideas. And OpenGL used to just display those patches. The main idea underneath the Bzeier Patches math is how to calcula... 阅读全文
posted @ 2012-08-23 20:49 opencoder 阅读(419) 评论(0) 推荐(0)
摘要: This samples shows us how to load raw texture (or customized texture format file) and image alpha blend, image copy operations (namely Blitter function). When I got into the source code, I found s... 阅读全文
posted @ 2012-08-23 20:41 opencoder 阅读(238) 评论(0) 推荐(0)
摘要: This sample shows us how to work with collision detection and response. At first, it provide some ideas about how to determine whether a intersection happened between a ray and a plane, a ray and a c... 阅读全文
posted @ 2012-08-23 20:36 opencoder 阅读(300) 评论(0) 推荐(0)
摘要: This sample shows us how to parse, load and display texture mapped Milkshape3D models. Milkshape3D is a free modeling package. Of course it is not popular as Maya or 3D Max. If you want to save mone... 阅读全文
posted @ 2012-08-23 09:15 opencoder 阅读(194) 评论(0) 推荐(0)
摘要: This simple game shows us how to do something funny that already detailed as in the title. 1) Screen mouse picking: We could emit a 3D ray from the current viewer position and do intersection tes... 阅读全文
posted @ 2012-08-23 09:11 opencoder 阅读(384) 评论(0) 推荐(0)
摘要: As the title describes, we could learn how to load TGA images as texture from this sample. Nothing special to advance about this lesson. The only thing that need to mention may be that refactoring an... 阅读全文
posted @ 2012-08-23 09:03 opencoder 阅读(130) 评论(0) 推荐(0)
摘要: This sample shows us how to create a landscape by means of height mapping. As the word height mapping means that the height of the landscape come from a gray image. Of course, you could apply other ... 阅读全文
posted @ 2012-08-23 08:59 opencoder 阅读(216) 评论(0) 推荐(0)
摘要: This sample shows us how to play AVI files with OpenGL. In addition to get AVI files frame animation images, the author used windows native AVI playing library instead of re-writing his own AVI file ... 阅读全文
posted @ 2012-08-23 08:53 opencoder 阅读(288) 评论(0) 推荐(0)
摘要: This sample shows us how to implement a radial blur effect with OpenGL render into a texture technology. To render objects into a texture: 1) set the view port size with the texture size; 2)... 阅读全文
posted @ 2012-08-23 08:45 opencoder 阅读(959) 评论(0) 推荐(0)
摘要: This sample shows us how to do Cel-Shading with OpenGL. The cel-shading contain two part: one is the color grading on the object surface; the other one is the outline effect. To get the color grad... 阅读全文
posted @ 2012-08-23 08:35 opencoder 阅读(597) 评论(1) 推荐(0)
摘要: This sample shows us how to load the texture data from the .exe file instead of external image files on the disk. The method was based on the Visual Studio resource data. That means you need to use V... 阅读全文
posted @ 2012-08-23 08:28 opencoder 阅读(216) 评论(0) 推荐(0)
摘要: This sample gives us some basics information about Physical Simulations. Some terminologies like Mass, Force, acceleration, velocity, time, position and the relationships among them are described h... 阅读全文
posted @ 2012-08-23 08:23 opencoder 阅读(168) 评论(0) 推荐(0)
摘要: This sample provides us an ArcBall module that we could use to rotate object along the screen with mouse. The underneath idea is mapping a 2d screen position into a 3d sphere coordinate. A rotation... 阅读全文
posted @ 2012-08-23 08:10 opencoder 阅读(581) 评论(0) 推荐(0)