Reading and displaying 3DS files in OpenGL
After learning blender, I really want to load the model I designed into my own program. Therefore, I considered the common 3DS file format. This time I tried to load the 3DS file into my own OpenGL program and display it.
Demo program: here
Source code: here
First, I found a lot of examples of loading the 3DS format ou
:
Behavior that begins with # comment line
USEMTL and mtllib represent the texture-related data, parsing texture data is a little cumbersome, this section we just to illustrate the principle of loading the model, not to discuss.
o introduction of a new object
V indicates vertex position
VT represents vertex texture coordinates
VN denotes vertex normal vector
F represents a polygon, the polygon uses the format of 1/2/8, which represents the index of the vertex pos
The OpenGL Basic Library provides a large number of methods for drawing various types of elements, and the auxiliary Library also provides many functions to describe complex 3D images. This chapter mainly introduces basic elements, such as points, lines, and polygon. With these elements, you can create a complex model.
7.1. description elements
OpenGL is a function library for 3D graphics. Its elements su
Reprinted please indicate the source for the klayge game engine, this article address for http://www.klayge.org/2011/07/17/%e8%b7%a8%e8%b6%8aopengl%e5%92%8cd3d%e7%9a%84%e9%b8%bf%e6%b2%9f%ef%bc%88%e4%ba%8c%ef%bc%89%ef%bc%9a%e7%8e%b0%e4%bb%a3opengl/
The previous article raised the basic problem of crossing OpenGL and d3d, and introduced some ways to eliminate the differences between OpenGL and d3d by inputti
OpenGL basic graphics programming-OpenGL BASIC program structure
Author: Unknown Article Source: game developers in China hits: 1043 updated:
The program structure compiled with OpenGL is similar to the program written in other languages. In fact,
1. Necessary work before drawing
1.1 set the view area of the form (view port)
Glviewport (X: glint; Y: glint; width: glsizei; Height: glsizei );
The parameters X and Y specify the position in the window in the lower-left corner of the visible area. Generally, they are (0, 0), and width and height specify the width and height of the visible area. Note that the window coordinates used by OpenGL are different from those used by windowsgdi.
See http://www.khw.s.org/on the official website,OpenGL ES 1.x
For fixed function hardware: OpenGL ES 1.1 is defined relative to the OpenGL 1.5 specification and emphasizes hardware acceleration of the API, but is fully backwards compatible with 1.0. it provides enhanced functionality, improved image quality and Optimizations to increase performance while loading
ObjectiveIn the first 2 articles, we all talked about shaders, and in the second it was formally said that this shader can only be used in programmable pipelines such as OpenGL es2.x, but not in OpenGL es1.x. But we haven't been saying why, what's the difference between the two. Well, let's get this one together. Learn the rendering pipeline in OpenGL ES.BodyPipe
2.1 basic understanding of OpenGL
OpenGL is a software interface with a hardware Graphics Generator. It includes more than 100 graphic operation functions. developers can use these functions to construct scene models and develop 3D graphics interaction software. As described in the previous chapter, OpenGL is a high-performance graphics development software packa
OpenGL Template Mac Cmake OpenGL (Glut) Template, cmakeglut
I often use some of the features to make a template, with a light effect, you can use the mouse to zoom, rotate the coordinate system around the origin
Main. cpp
#include
CMakeLists.txt
cmake_minimum_required (VERSION 2.6)project(OpenGL)find_package(OpenGL
The state management mechanism of OpenGL
Viewport and viewport coordinate system concepts
Test Viewport settings
1 Moving the Viewport
2 Multi-viewport
Viewport summary
1 status management mechanism for OpenGLAs we can see from the simplest examples above, we have almost no configuration of colors and coordinate systems, and OpenGL has been able to implement rendering
In this section, we will study the development environment of OpenGL in WIN10 64 and VS1013 environment.(1) Select a compilation environment:Now the main compiler tools for OpenGL in Windows are visual Studio,broland C + + Builder,dev C + +, we choose Visual Studio2013 as the development environment.(2) Resources used:We used the three libraries of Glew,freeglut and Gltools . Here is an introduction to them
Before opengl2.0, OpenGL was designed as a fixed-function state machine, so the only way to modify OpenGL was to define extensions for it. In this way, in various OpenGL implementations, new functions should be exposed in the form of extensions, resulting in a large number of available extensions. OpenGL has a well-def
1 representation of 3D objects in OpenGL
In 3D space, a scene is a collection of objects or models. In 3D rendering, all objects are composed of triangles. This is because a triangle can represent a plane, and a 3D object is composed of one or more planes. For example, it represents a very complex 3D terrain, and its door is represented by many triangles.
Terrain after rendering
Complex terrain is also composed of triangles.
AbstractDebussy is a debugging tool for hyper-linear computing. In this article, we will explain how to integrate nc-OpenGL with Debussy.
IntroductionA simple D-FF that shows how to use nc-OpenGL and Debussy for regression.
D_ff.v/OpenGL
Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->
1
/*
2
(C) oo
Nine, OpenGL colorAlmost all OpenGL applications aim to draw color graphics within the screen window, so color plays an important role in OpenGL programming. The color here is not the same as the color concept in painting, it belongs to the RGB color space and is only displayed on the monitor screen. In addition, the screen window coordinates are in pixels, so ea
[Computer Graphics] openGL common functions, computer graphics opengl
OpenGL common functions
GlAccum operation accumulation Buffer
GlAddSwapHintRectWIN defines a group
Triangle copied by SwapBuffers
GlAlphaFunc allows alpha Detection
GlAreTexturesResident determines whether a specific texture object is resident in the texture memory.
GlArrayElement defines an
OpenGL extensions is one of the highlights of OpenGL. The update of the video card brings more and more dazzling new features, so that we can use the outstanding hardware to draw amazing 3D images. With the extension mechanism of OpenGL, new features provided by any hardware manufacturer can be conveniently used by our OpenGL
OpenGL Development Environment configuration in vc6.0 (required for OpenGL)
Step 1: select a compiling environment
Now {Tagshow (event, 'windows ');} "Href =" javascript:; "target =" _ Self ">WindowsThe mainstream compiling environments of the system include Visual Studio, broland C ++ builder, Dev-C ++, and so on. They all support OpenGL. But here we choose VC +
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.