如何从文件加载纹理? [英] How to load a texture from a file?

查看:89
本文介绍了如何从文件加载纹理?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚开始通过在DirectX中进行2D游戏来学习c / c ++。我之前从未做过(从文件加载纹理)



我尝试了什么:



i还没有尝试任何东西,我锁定了一些代码示例,我不太明白

i just started learning c/c++ by doing a 2D game in DirectX .I've never done it before (load texture from file)

What I have tried:

i haven't tried anything yet ,i locked at some code examples and i didn't quite understand

推荐答案

您无法在快速答案论坛中发布问题来学习编程。您需要获得一本好书或在线学习指南并按照所有示例进行操作。
You cannot learn programming from posting questions in a Quick Answers forum. You need to get a good book or online study guide and work through it, following all the examples.


DirectX是一个相当复杂的API。在使用之前,您应该熟悉C / C ++。



然后你必须熟悉API本身。这意味着阅读和理解文档,以便您了解API文档中的示例代码。



这就像学习驾驶一样。刚开始学习你不应该试驾卡车。
DirectX is a rather complex API. Before using such you should be familiar with C/C++.

Then you have to become familiar with the API itself. That means reading and understanding the documentation so that you understand the example code from the API documentation.

It is like learning to drive. Having just started to learn you should not try to drive a truck.


在这个 DirectX教程包括纹理加载。还有其他有趣的东西你可以在那里找到。



DirectX是一个高级界面,所以请访问一些基本的教程来理解这些东西。
In this DirectX tutorial is texture loading included. Also other interesting stuff you may find there.

DirectX is an advanced interface, so visit some basic tutorials to understand that stuff.


这篇关于如何从文件加载纹理?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆