Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

In fact, the study of API is very simple.

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

Recently, many people are asking, how should I learn OpenGL? I have finished learning OpenGL. How should I use it?

Before answering these similar questions, I would like to talk to you about how to learn API. Maybe after talking, I don't need to answer them. First of all, I think API is a tool, not essence. The essence of OpenGL/Direct3D is graphics, not OpenGL/Direct3D itself. API itself is just some Interface. If you understand the principles of graphics. Then you can easily understand the role of these interfaces and why they exist. So, the first point I want to say is: if you want to learn 3D programming, you don't just have to learn OpenGL/Direct3D. Even these API are not that important (though many people may not agree with them). The most important and fundamental thing is to understand the principles of graphics behind these API-because that's the root of it.

Now I would like to introduce my views on API learning.

I think there are two ways to learn API: one is positive learning. The second is reverse learning.

One: positive learning, the so-called positive learning, is learning API itself. I think this method is a kind of Brute Force behavior. Not so well。 We just need to look at the features of API and those parts. Just do it. For example, when learning Direct3D, we need to know how it is initialized and how it combines with the operating system. It introduces VS/PS into Direct3D8. Finally, there are the steps and methods of creating a Direct3D application. That's enough. Otherwise, with so many functions in Direct3D, every one of them will kill me.

The second function of positive learning is that after you are familiar with graphics and a general understanding of API, take a look at the details of API when you are free, and then think about what some of the features provided in API will do to your program. For example, TextureCombine in Two Side Stencil.OpenGL in Direct3D.

Second, reverse learning. This is the fundamental method, and at this point, you can really be regarded as an introduction to graphics. This requires you to have a certain foundation in graphics. For example, you start to make a demo. You expect to have a bunch of dazzling effects in your demo, and of course you need to know how to achieve them. Then you look for the corresponding function in API. I think if your idea is normal, the general function should be available in Direct3D/OpenGL. Of course, you will also encounter that the features you want are not available in these API, but it doesn't matter. The important thing is that you have learned something new-this feature is not supported in XX API.

Usually I use the method of forward, then reverse, and then forward learning at the same time. I hope the above suggestions will be of some help to all beginners.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report