什么是OpenGL的API接口来? [英] What is OpenGL API interfacing to?

查看:344
本文介绍了什么是OpenGL的API接口来?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

OpenGL库调用在我的源C code是界面'东西'。那是什么'东西'软件?它是显卡的设备驱动程序在我的电脑?

The OpenGL library calls in my source c code are interface to 'something'. What is that 'something' software? Is it device driver of the graphic card in my computer?

推荐答案

您对OpenGL库链接应用程序。图书馆是一套做的事情一样绘制三角形,开灯等功能的图书馆也是你的计算机上的硬件的抽象。所以,是的,最终它会调用到设备驱动程序做一些工作。

You will link your application against the OpenGL library. The library is a set of functions that do things like drawing triangles, turning on lights, etc. The library is also an abstraction of the hardware on your machine. So yes, eventually it calls into the device driver to do some work.

当你调用一个方法,如 glTexImage2D(),你调用OpenGL库函数。这个函数可能做一些事情给你通过它的数据,然后调用设备驱动程序告诉它,这里有一些像素描述2D图像。然后,驱动程序将数据存储到卡上的副本(除非你已经设置一些参数来告诉它的数据可以在以后复制)。

When you call a method such as glTexImage2D(), you're calling a function in the OpenGL library. That function probably does something to the data you passed it, and then calls the device driver to tell it, "Here are some pixels that describe a 2D image." The driver then copies that data to memory on the card (unless you've set some parameters to tell it that the data can be copied later).

利用OpenGL意味着您不必担心哪个品牌的显卡是在机器中,你必须跨系统绘制3D图形一致的界面。

Using OpenGL means you don't have to worry about which brand of video card is in the machine, and you have a consistent interface for drawing 3D graphics across systems.

这篇关于什么是OpenGL的API接口来?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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