tp安卓中文版|wgl
Access Denied
Access Denied
Access Denied
You don't have permission to access "http://www.intel.cn/content/www/cn/zh/support/articles/000058790/graphics.html" on this server.
Reference #18.f4231c78.1709819945.3c5c4522
wgl初步解读 - 知乎
wgl初步解读 - 知乎首发于小可靠大靠谱切换模式写文章登录/注册wgl初步解读xianyunyehe用尽全力,过平凡的一生 老化中,我们经常要将wgl文件转化为老化pattern,一般这些步骤有专门转pattern工具处理,但拿到wgl文件我们应该怎样解读? 什么是wgl? wgl是Waveform Generation Language的缩写。可以理解为测试用的pattern文件,最主要的功能就是描述测试所需要用到的输入输出管脚信号名,以及测试的过程。包含如何给激励和给什么激励,以及最后期望得到什么输出和如何判断比较输出。 wgl文件包括如下几部分,以scan为例:1) SI,SO为scan_in与scan_out端,定义scan chain的input和output端。通常情况下,每一个input会驱动一条scan chain,ouput用来观察一条scan chain。2) SE是scan enable信号,控制着scan cell的工作模式。SE,SI,D端通过一个Mux实现工作模式的切换。当SE输入为0时,scan cell工作在普通模式下,相当于是普通的触发器;当SE输入为1时,scan cell就进入scan模式,相当于一个移位寄存器。1) scancell:device内部的寄存器,仅代表瞬时逻辑状态,和ATE及DUT引脚没有直接关联。2) scanchain从SCI开始,到SCO结束。扫描状态块中的每个状态声明定义了某一时刻所有扫描单元状态的集合。在不同的group中,可以看到初始的pin和结束pin,分别为input和output,不同group串起来构成完成的chain。3) scanstate: 定义了scan chain中各个cell的状态,这里会在wgl的pattern中使用。4) timeplate定义时钟。D = Logic 0 S = Apply pattern data x = Mask output (don’t care) Q = Expect pattern data 5) pattern、vector、cycles。定义pattern中的向量和test cycle。 对照pattern转化设置,需要关注timing和pattern中的vector的input、output pin状态。wgl 文件整体例子:参考文献:WGL中的Scan信息的解析_贾亮的专栏-CSDN博客STIL Language Test Vector Format SimplifiedSTIL语言测试矢量格式简化Designing Semiconductor ATE With the NI PXIe-6556 Digital ATE Module发布于 2020-05-01 18:26WAVE(文件格式)赞同 98 条评论分享喜欢收藏申请转载文章被以下专栏收录小可靠
WGL|Wealthsee Global|全球领先在线外汇交易商
WGL|Wealthsee Global|全球领先在线外汇交易商
首页
为什么选择WGL
交易平台
金融产品
会员中心
合作模式
客户服务
近期活动
关于我们
教育中心
EN
WGL
首页
为什么选择WGL
B2B经纪商
监管合规
深耕外汇市场多年
四种账户类型及点差模式
流动性丰沛
STP-ECN交易模式
高速执行 稳定流畅
交易平台
WGL MetaTrader4平台
MetaTrader4手机客户端
金融产品
外汇主流盘
外汇稀有盘
现货黄金
现货白银
指数
原油
会员中心
客户登录
IB登录
合作模式
机构交易者
介绍经纪商
资金管理人
白标计划
交易APIs
客户服务
新闻动态
每日汇评
广告下载
客户登录
近期活动
关于我们
关于WGL
联系我们
菁英计划
教育中心
指南下载
外汇基础知识
常见问题
EN
WGL
一站式金融在线交易服务
WGL
高效稳定的外汇交易平台
WGL
全自动化的ECN撮合交易
WGL
极具竞争力的低浮动点差
为什么选择WGL?
B2B经纪商
监管合规
深耕外汇市场多年
MT4平台
四种账户类型及点差模式
流动性丰沛
STP-ECN交易模式
高速执行 稳定流畅
交易平台
国内先进交易平台;使您的交易更加迅捷稳定,高 效透明。
适用于多种桌面及移动操作系统如Mac OS, Windows, iOS, Android 。
现在体验
金融产品
WGL得益于全球多个先进流动性提供商所给予的完善执行服务优势为客户提供定制化的交易解决方案以匹配其多元性的业务需求。凭借多款平台超低延迟并提供包括FIX API在内的灵活多选的连接方式,WGL将与客户通力合作为其业务发展共谋未来。
全部
外汇
贵金属
差价合约
数字货币
外汇主流盘
FOREX
外汇稀有盘
EXOTIC
现货黄金
SPOT GOLD
现货白银
SPOT SILVER
指数
INDICES
原油
CRUDE OIL
会员中心
多样的账户类型,紧凑的浮动点差,灵活的杠杆选择,多方面契合您的交易所需。
了解更多
会员专区
合作模式
机构交易者
WGL的个性化完善交易平台同时具备多种先进功能,支持多渠道交易,机构客户可以通过不同的客户端平台对接到流动性和APIs中,从而强化报价质量,或进行清算交易。
介绍经纪商
WGL为介绍经纪商提供稳健双赢的合作方案。与WGL密切合作的IB,不仅能够获得WGL的先进配套支持用以强势开拓市场,同时还能收获优渥的回报。
资金管理人
WGL先进的多账户管理系统,以及账户自动化配置、客户化报告等交易技术,能同时满足委托的交易客户以及提供委托交易服务的客户的双向需求。
白标计划
WGL白标计划致力于为渴望为创建自品牌的客户提供前后台管理、技术支持、业务培训等协助服务,使之在外汇行业中树立有辐射性的品牌形象。
交易APIs
享受STP交易模式下直接入市交易的优势,并可同时获取实时国际银行间报价,订单完全自动执行,24小时在线交易,及具竞争力的点差条件。
客户服务
客服支持
实时追踪客户服务要求,及时解决客户反馈,协助客户交易活动,5.5*24小时超长待机服务
新闻动态
服务公告、交易时间、重大事件,WGL近期资讯一目了然,客户可据此及时作出调整,紧跟变化,严控风险。
每日汇评
定期进行外汇走势的分析,由具有数年实际操盘经验的汇评分析师执笔,结合全球重大财经时事,为客户提供主观信息参考,拓宽信息渠道
IB登录
WGL 客户可专享实时账户报告为其提供的互动功能。该功能可令客户快速简便地通过在线报告,直接阅读账户信息。WGL 账户报告无特殊软件配置要求,您可24小时在任何计算机上进行查阅。
广告下载
客户不仅在账户类型上拥有丰富的选择性,还可以轻松设置交易账户,包括账户信息、基础货币、主账户等,高能且安 全。同时还能通过模拟账户体验实盘功能。
客户登录
智能化自定义交易活动报表,方便客户及时查看所有交易及账户详情,从而分析交易成本和订单交易价质量,更好地优化盈亏。
近期活动
关于我们
WGL是率先应用MTF(Multilateral Trading Facility)多边交易技术的一站式在线金融交易商。我们致力于为全球机构和个体交易者提供安 全、稳定、迅捷、可靠的金融衍生品交易服务。WGL提供的外汇(Forex)及差价合约(CFDs)交易服务,让客户可以24小时通过交易平台 MetaTrader 4 进入全球金融市场。
我们的成功是基于三个重要元素:严谨的规管监察、不断的技术革新及经验丰富的团队。WGL在严格的监管环境下运作,为客户及合作伙伴提供了高透明度且可靠的服务。
WGL 视市场与技术并重,旗下主流平台WGL MT4采用全球先进的STP + ECN无交易员模式,所有订单100%自动执行,并且以匿名方式通过电子交易系统直达国际间真实外汇市场。与WGL 进行交易,交易者足不出户,便能轻松参与到包括外汇、贵金属和CFD差价合约在内的金融衍生品的在线交易中。并且,我们郑重承诺,WGL 不会从交易者的任何一笔盈利单或是亏损单中获取额外的利益,客户的资金完全取决于投资产品的市场价 格变化。给予交易者透明,公正的交易环境是WGL 以前、现在、以及未来都会贯彻始终的不变理念。
联系我们
汇市之誉
[email protected]
+678 2246768
WGL集团公司包含:Wealthsee Global Limited (WGLNZ) 位于新西兰奥克兰 Level 10, 21 Queen Street, (1010) ,
Wealthsee Global Limited (WGLVN) 位于瓦努阿图维拉 Govant Building, BP 1276, Port Vila, Vanuatu.
Copyright© 2016 Wglforex.com
风险提示:所有外汇、贵金属及CFD差价合约产品的保证金交易均伴有风险,因此并不适合所有投资者。请您务必在充分了解其中的风险后在您自身可承受的范围内进行投资。更多风险详情,敬请参阅WGL的 风险声明 及 保证金政策 。
TOP
会员专区
在线客服
WGL
WGL
Investor Relations
INVESTORRELATIONS
Careers
Contact
Account
FAQs
ENERGYANSWERS
RESIDENTIALLIVING
POWERINGBUSINESS
INNOVATION &TECHNOLOGY
CORPORATERESPONSIBILITY
We Know Energy
WGL is a diversified energy business that provides natural gas, electricity, green power, carbon reduction and energy services. Our calling as a company is to make energy surprisingly easy-for our employees, our community and all our customers.
We Make Energy Easy
Energy impacts everything we do, our daily lives, our businesses and our communities. Energy can sometimes be complex and we know that our customers need answers that help them make smart choices and stay on top of the constantly evolving energy technology, projects and resources.
Profit & Productivity
WGL provides a wide range of options for natural gas electricity, green power and energy services. So you can protect your profits and achieve your energy goals.
Changing the Energy Industry
Natural gas, solar power, wind power, fuel cell technology, geothermal and distributed energy solutions are just some of the ways we're making energy surprisingly easy.
Energizing Communities
WGL supports and contributes to the communities in which we live. Our employees are dedicated community ambassadors, volunteering more than 11,000 hours to those who need our help. Through high profile projects – such as our Day of Weatherization to local blood drives and school uniform drives, our employees are recognized for their commitment.
We Know Energy
WGL is a diversified energy business that provides natural gas, electricity, green power, carbon reduction and energy services. Our calling as a company is to make energy surprisingly easy-for our employees, our community and all our customers.
Sustainability is crucial to our continued growth and success
Read our latest Sustainability Report
We Make Energy Easy
Energy impacts everything we do, our daily lives, our businesses and our communities. Energy can sometimes be complex and we know that our customers need answers that help them make smart choices and stay on top of the constantly evolving energy technology, projects and resources. At WGL, our energy expertise is founded on a 166-year history that provides us with unrivaled experience, now fortified by our diverse energy and service offerings and our ability to put technology and data to work for you.
A history of Energy Answers
Washington Gas was founded over 169 years ago. Read about the first home in Washington fueled by gas.
Learn More
How can you make your energy costs more predictable?
WGL Energy has been providing residential service since it's founding in 1997. Read how you can control your natural gas costs while enjoying a comfortable home.
Learn More
Profit & Productivity
WGL provides a wide range of options for natural gas electricity, green power and energy services. So you can protect your profits and achieve your energy goals.
Commercial Power and Natural Gas Solutions
Washington Gas' first customer was the U.S. Capitol building. Read how your business can convert to gas, too.
Learn More
Beyond a Power Utility
WGL Energy offers wind, solar and other renewable energy to customers like the U.S. Army, National Geographic Society, Washington Metropolitan Area Transit Authority, Perdue Farms and the Department of Homeland Security. Add renewable to your company's portfolio.
Learn More
Changing the Energy Industry
Natural gas, solar power, wind power, fuel cell technology, geothermal and distributed energy solutions are just some of the ways we're making energy surprisingly easy.
Commitment to Sustainability
Washington Gas is powered by innovation. Read how our Rockville station achieved LEED Gold status.
Learn More
Strategic Solutions
WGL Energy embraces offsite solar to make the Capital One Arena (formerly the Verizon Center) more sustainable. Read more.
Learn More
Energizing Communities
WGL supports and contributes to the communities in which we live. Our employees are dedicated community ambassadors, volunteering more than 11,000 hours to those who need our help. Through high profile projects – such as our Day of Weatherization to local blood drives and school uniform drives, our employees are recognized for their commitment.
Corporate Citizenship
Our community service team has been busy this summer. Read about our Corporate Citizenship.
Caring for Our Communities
Founded by Washington Gas and administered by The Salvation Army, WAFF helps families who do not qualify for, or who have exhausted, government energy assistance. Learn how we provide answers through WAFF.
Read More
Washington Gas Light Company is a regulated natural gas utility serving approximately 1.1 million customers in the metropolitan Washington, D.C. area.
WGL Energy is a leader in efficient and environmentally-friendly energy technology solutions that provide electricity, natural gas, renewable energy and green products to public and private sector customers across the United States.
Hampshire Gas is a natural gas storage business which owns and operates facilities in and around Hampshire County, West Virginia.
ANNOUNCEMENTS
WGL Joins the AltaGas Family of Companies
July 06, 2018
WGL NEWSROOM
Washington Gas Earns Most Trusted Brand for Third Consecutive Year
July 25, 2019
Washington Gas Files Request for Maryland Rate Increase to Support Natural Gas Safety, Service Enhancements and Reliability
April 22, 2019
Washington Gas Named Top Environmental Champion for Second Year in a Row in National Utility Industry Survey
April 22, 2019
ABOUT WGL
The WGL family of companies—Washington Gas, WGL Energy and Hampshire Gas—are now indirect, wholly-owned subsidiaries of AltaGas Ltd [TSX:ALA]. WGL is headquartered in Washington, D.C., and is a leading source for clean, efficient and diverse energy solutions. With activities and assets across the U.S., WGL provides options for natural gas, electricity, green power and energy services, including generation, storage, transportation, distribution, supply and efficiency. Our calling as a company is to make energy surprisingly easy for our employees, our community and all our customers. Whether you are a homeowner or renter, small business or multinational corporation, state and local or federal agency, WGL is here to provide Energy Answers. Ask Us. For more information, visit us at @wglanswers.
©2016 WGL Holdings, Inc. All Rights Reserved
Terms of Use
Privacy Policy
Careers
Account
Contact
Terms of Use
Privacy Policy
Creating an OpenGL Context (WGL) - OpenGL Wiki
Creating an OpenGL Context (WGL) - OpenGL Wiki
Creating an OpenGL Context (WGL)
From OpenGL Wiki
Jump to navigation
Jump to search
OpenGL Context Creation is the part of initialization that creates a fully realized OpenGL implementation. You need to go through this process to use OpenGL.
Contents
1 A Note on Platforms
2 Simple Context Creation
2.1 The Window Itself
2.2 Pixel Format
2.3 Create the Context
2.4 Delete the Context
3 Proper Context Creation
3.1 Create a False Context
3.2 Get WGL Extensions
3.3 Pixel Format Extensions
3.4 Create Context with Attributes
3.5 Sample Code: Create Render Context, Check GL_VERSION
4 See Also
5 References
A Note on Platforms[edit]
Because OpenGL doesn't exist until you create an OpenGL Context, OpenGL context creation is not governed by the OpenGL Specification. It is instead governed by platform-specific APIs. The following discussion will cover Windows-based initialization. GLX has its initialization functions as well; some of them have analogs in Windows, and some do not. Many of the Windows-specific initialization functions have the "wgl" prefix affixed to them.
This also assumes you know how to handle the Win32 API at some basic level of competence. You should know what a window handle (HWND) and a device context (DC) are, as well as how to create them. This is not a tutorial on how to create a Window.
Simple Context Creation[edit]
This section covers the basics of context creation.
The Window Itself[edit]
When you create your HWND, you need to make sure that it has the CS_OWNDC set for its style.
Pixel Format[edit]
Each window in MS Windows has a Device Context (DC) associated with it. This object can store something called a Pixel Format. This is a generic structure that describes the properties of the default framebuffer that the OpenGL context you want to create should have.
Setting up the pixel format is non-intuitive. The way you create a pixel format is that you fill out a struct that describes the features you want. Then you give that struct to a function that will return a number that represents the closest match that it can find in the list of supported pixel formats. You then set this number to be the pixel format of the DC.
The struct described above is the PIXELFORMATDESCRIPTOR. A good way to set this up is as follows:
PIXELFORMATDESCRIPTOR pfd =
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, // Flags
PFD_TYPE_RGBA, // The kind of framebuffer. RGBA or palette.
32, // Colordepth of the framebuffer.
0, 0, 0, 0, 0, 0,
0,
0,
0,
0, 0, 0, 0,
24, // Number of bits for the depthbuffer
8, // Number of bits for the stencilbuffer
0, // Number of Aux buffers in the framebuffer.
PFD_MAIN_PLANE,
0,
0, 0, 0
};
As you can see, many of the fields in the struct are set to 0. Leave them that way. The ones we need to be concerned about, the ones you might want to use, are labled above with comments. There are more flags than are specified in this pixel format; more information on them can be found in the Windows SDK documentation. These will do for now.
Now that we have a PIXELFORMATDESCRIPTOR, we need to convert this into a pixel format number. We do this with the function ChoosePixelFormat. This function takes a device context and PFD struct and returns a pixel format number. If it returns 0, then it could not find a pixel format that matches the description, or the PFD was not filled out correctly.
Once you have the pixel format number, you can set it into the DC with SetPixelFormat. This function takes the DC, the pixel format number, and a PFD struct pointer. Don't get excited about being able to supply the PFD struct; it doesn't read any important information out of it to set the pixel format into the context.
Create the Context[edit]
Once you have set pixel format in the DC, creating the context is easy. You call wglCreateContext. This function takes the DC as a parameter and returns a handle to the the OpenGL context (of type HGLRC, for handle to GL Rendering Context).
Before you can use OpenGL, the context you created must be made current. This is done with the wglMakeCurrent function. This takes a DC and the HGLRC context. If there is already a current context, then this function will cause the old context to be replaced with the new. OpenGL functions after this will refer to state in the new context, not the old one. If you pass NULL for the context, then the old one is removed and OpenGL functions will fail (or crash) as though you had never made a context current.
The current context is thread-specific; each thread can have a different context current, and it's dangerous to have the same context current in multiple threads.
Delete the Context[edit]
Technically not part of creation, but you should know how to delete a context.
The first step is always to make sure that the context you want to delete is not current. Call wglMakeCurrent with NULL for the context.
Now that the context is not current, you can call wglDeleteContext on it.
Proper Context Creation[edit]
Unless you are making a very simple application, you should not use the above simple context creation steps. There are a number of WGL extensions that give you greater power and flexibility in creating contexts. But to get access to those extensions, you have to make context creation a bit more complex.
Create a False Context[edit]
The key problem is this: the function you use to get WGL extensions is, itself, an OpenGL extension. Thus like any OpenGL function, it requires an OpenGL context to call it. So in order to get the functions we need to create a context, we have to... create a context. Fortunately, this context does not need to be our final context. All we need to do is create a dummy context to get function pointers, then use those functions directly.
Warning: Unfortunately, Windows does not allow the user to change the pixel format of a window. You get to set it exactly once. Therefore, if you want to use a different pixel format from the one your fake context used (for sRGB or multisample framebuffers, or just different bit-depths of buffers), you must destroy the window entirely and recreate it after we are finished with the dummy context.
A good pixel format to choose for the dummy context is a simple 32-bit RGBA color buffer, with a 24-bit depth buffer and 8-bit stencil, as we did in the above sample PFD. This will usually get a hardware accelerated pixel format.
So, this step means going through the above code to create a context. Make it current as well.
Get WGL Extensions[edit]
Main article: Load OpenGL Functions#Windows 2
If you are using an extension loading library, now is the time to call whatever function is required to have it load function pointers of interest. If you are not using an extension loading library, then you will need to do this manually.
There are quite a few extensions of interest for doing advanced context creation. Most of them revolve around pixel format creation, with one notable exception.
Pixel Format Extensions[edit]
The PFD struct is a nice way to describe your needs to the OpenGL implementation. But it does have one major flaw; it isn't extensible. Therefore, there is the WGL_ARB_pixel_format extension. This extension defines a new mechanism for getting a pixel format number, one based on providing a list of attributes and values.
To use this, the extension must be defined. Much like WGL_ARB_extensions_string, this one has been around for a long time, and even old implementations will provide it. So if you've gotten this far, it's a good bet that WGL_ARB_pixel_format is implemented too.
There are several new functions in this extension, but the one we are interested in is this one:
BOOL wglChoosePixelFormatARB( HDC hdc,
const int *piAttribIList,
const FLOAT *pfAttribFList,
UINT nMaxFormats,
int *piFormats,
UINT *nNumFormats);
wglChoosePixelFormatARB is analogous to ChoosePixelFormat. Instead of taking a fixed PFD struct, it takes a list of attributes and values. Many of these attributes have direct analogs to PFD struct fields, but some of them are new. Also, unlike ChoosePixelFormat, this function can return multiple formats that fill the requested parameters. The order of these is in order from best fits to worst, though what constitutes "best" is implementation-defined.
In any case, the way it works is fairly simple. piAttribIList is a list of integer attributes. Every two elements in the list is an attribute/value pair. The attribute "0" represents the end of the list, and it doesn't need a value after it. You can pass NULL if you wish; this function will act as if you passed an empty list.
Similarly, pfAttribFList is a list of floating-point attributes. Every two elements in the list is an attribute/value pair. How do you put the attributes (which are integers) in a float list? Very carefully. You need to static-cast them (if you're using C++) or do other trickery to make C keep the bit-pattern between the integer and float form the same.
The nMaxFormats is the maximum number of formats that will be stored in piFormats. Therefore, piFormats should be a list of at least that many entries. The nNumFormats is a return value, informing you how many entries were stored in the list.
If this function returns FALSE (not GL_FALSE, but the Windows FALSE. Both are just 0, though), then the code failed to find an appropriate pixel format. Despite not finding a pixel format, the piFormats list is left in an undefined state (translation: the implementation is free to change stuff in it even if it failed). If the return value is not FALSE, the function worked and you have pixel format numbers.
Here is an example of this function that should produce a near-equivalent list of pixel formats as our above code:
const int attribList[] =
{
WGL_DRAW_TO_WINDOW_ARB, GL_TRUE,
WGL_SUPPORT_OPENGL_ARB, GL_TRUE,
WGL_DOUBLE_BUFFER_ARB, GL_TRUE,
WGL_PIXEL_TYPE_ARB, WGL_TYPE_RGBA_ARB,
WGL_COLOR_BITS_ARB, 32,
WGL_DEPTH_BITS_ARB, 24,
WGL_STENCIL_BITS_ARB, 8,
0, // End
};
int pixelFormat;
UINT numFormats;
wglChoosePixelFormatARB(hdc, attribList, NULL, 1, &pixelFormat, &numFormats);
There are a number of extensions that have added new attributes for this function. The important ones that you might want to use are:
WGL_ARB_pixel_format_float: Allows for floating-point framebuffers.
WGL_ARB_framebuffer_sRGB: Allows for color buffers to be in sRGB format.
WGL_ARB_multisample: Allows for multisampled framebuffers.
Once you have a pixel format number, you can set it just like any pixel format with SetPixelFormat.
Create Context with Attributes[edit]
OpenGL 3.0 and above created a deprecation and removal model for getting rid of old, legacy functionality. However, it also created a bit of a problem. In previous OpenGL versions, the new version was a strict superset of the old. Therefore, if you wanted a 1.5 context and got a 2.0 context, that was fine; you just got extra functionality you didn't use. Once the possibility of removing old functionality came into being, that was no longer viable.
Thus, the extension WGL_ARB_create_context was made. It exposes a new function to replace wglCreateContext. Much like wglChoosePixelFormatARB, it adds an extensibility mechanism to the system that makes it possible to extend the options for context creation.
If the fake context does not expose this extension, then you cannot use this section. You must use wglCreateContext as normal.
If it does advertise this extension, then there are a number of features that we can access that would normally not be available:
Ensure getting an OpenGL 3.0 or greater context.
Creating an OpenGL 3.2 or greater core context, without the compatibility features.
Creating a context without a window, for off-screen rendering. This may not actually work.
Legacy Note: Implementations that support GL 3.0 or 3.1, but not 3.2 used a slightly different scheme for context creation than those that support 3.2. Pre 3.2 implementations were required to ask for a GL 3.0 or greater context in order to get one; thus, you had to use the new creation API to get a higher GL version. 3.2 and above do not; they can get backwards-compatible profiles of 3.0 or greater versions (assuming the implementation supports them). Thus, the best way to ensure that you get 3.0 or above is to ask for it with this extension. As more drivers implement GL 3.2, this will become less of an issue.
You can tell the difference by checking the extensions. If WGL_ARB_create_context_profile is defined, then it uses the above method. If it is not, then the only way to get a GL 3.0 or greater context is to use wglCreateContext directly.
The signature for wglCreateContextAttribsARB is as follows:
HGLRC wglCreateContextAttribsARB(HDC hDC, HGLRC hshareContext, const int *attribList);
The attribList works similarly to the one in wglChoosePixelFormatARB. It is a series of attribute/value pairs, with a 0 attribute signaling the end of the list.
You can ask for a specific version of OpenGL by using the two attributes WGL_CONTEXT_MAJOR_VERSION_ARB and WGL_CONTEXT_MINOR_VERSION_ARB. How this is resolved is complicated.
There are a number of rules that define what version you get back when you ask for a specific version. The rules are complicated, but boil down to two things:
It will always return an OpenGL version equal to or greater than the one you ask for.
It will never return an OpenGL version and profile that does not implement core features that the version you ask for implements.
If the extension WGL_ARB_create_context_profile is defined, then you can also use the WGL_CONTEXT_PROFILE_MASK_ARB to select a core profile (WGL_CONTEXT_CORE_PROFILE_BIT_ARB) or a compatibility profile (WGL_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB). Note that these are bits, so you could ask for both (but it would simply return a compatibility one). The details of what this means merit a longer discussion.
You can also pass a number of flags with the WGL_CONTEXT_FLAGS_ARB. With these, you can ask for a forward compatible context (WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB) and/or a debug context (WGL_CONTEXT_DEBUG_BIT_ARB). A debug context will often implement ARB_debug_output for enhanced error message testing. A forward compatible context must fully remove deprecated features in the version that it returns; you should never actually use this.
The hshareContext is a special field. If you have two GL contexts, and you want them to share objects, then you can use the function wglShareLists. But you have to do this before you create objects in either context. wglCreateContextAttribsARB incorporates this functionality directly into context creation.
Sample Code: Create Render Context, Check GL_VERSION[edit]
Heres a working program which creates a render context and shows the version number in a messagebox, then shuts down the program:
#include
#include
#pragma comment (lib, "opengl32.lib")
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam);
int WinMain( __in HINSTANCE hInstance, __in_opt HINSTANCE hPrevInstance, __in_opt LPSTR lpCmdLine, __in int nShowCmd )
{
MSG msg = {0};
WNDCLASS wc = {0};
wc.lpfnWndProc = WndProc;
wc.hInstance = hInstance;
wc.hbrBackground = (HBRUSH)(COLOR_BACKGROUND);
wc.lpszClassName = L"oglversionchecksample";
wc.style = CS_OWNDC;
if( !RegisterClass(&wc) )
return 1;
CreateWindowW(wc.lpszClassName,L"openglversioncheck",WS_OVERLAPPEDWINDOW|WS_VISIBLE,0,0,640,480,0,0,hInstance,0);
while( GetMessage( &msg, NULL, 0, 0 ) > 0 )
DispatchMessage( &msg );
return 0;
}
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
switch(message)
{
case WM_CREATE:
{
PIXELFORMATDESCRIPTOR pfd =
{
sizeof(PIXELFORMATDESCRIPTOR),
1,
PFD_DRAW_TO_WINDOW | PFD_SUPPORT_OPENGL | PFD_DOUBLEBUFFER, //Flags
PFD_TYPE_RGBA, // The kind of framebuffer. RGBA or palette.
32, // Colordepth of the framebuffer.
0, 0, 0, 0, 0, 0,
0,
0,
0,
0, 0, 0, 0,
24, // Number of bits for the depthbuffer
8, // Number of bits for the stencilbuffer
0, // Number of Aux buffers in the framebuffer.
PFD_MAIN_PLANE,
0,
0, 0, 0
};
HDC ourWindowHandleToDeviceContext = GetDC(hWnd);
int letWindowsChooseThisPixelFormat;
letWindowsChooseThisPixelFormat = ChoosePixelFormat(ourWindowHandleToDeviceContext, &pfd);
SetPixelFormat(ourWindowHandleToDeviceContext,letWindowsChooseThisPixelFormat, &pfd);
HGLRC ourOpenGLRenderingContext = wglCreateContext(ourWindowHandleToDeviceContext);
wglMakeCurrent (ourWindowHandleToDeviceContext, ourOpenGLRenderingContext);
MessageBoxA(0,(char*)glGetString(GL_VERSION), "OPENGL VERSION",0);
//wglMakeCurrent(ourWindowHandleToDeviceContext, NULL); Unnecessary; wglDeleteContext will make the context not current
wglDeleteContext(ourOpenGLRenderingContext);
PostQuitMessage(0);
}
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
See Also[edit]
Core And Compatibility in Contexts
Tutorial: OpenGL 3.0 Context Creation (GLX)
Tutorial: OpenGL 3.1 The First Triangle (C++/Win)
References[edit]
WGL_ARB_pixel_format Specification
WGL_ARB_pixel_format_float Specification
WGL_ARB_framebuffer_sRGB Specification
WGL_ARB_create_context Specification
Retrieved from "http://www.khronos.org/opengl/wiki_opengl/index.php?title=Creating_an_OpenGL_Context_(WGL)&oldid=14723"
Categories: Pages using deprecated source tagsGeneral OpenGL
Navigation menu
Personal tools
Not logged inTalkContributionsLog in
Namespaces
PageDiscussion
English
Views
ReadEditView history
More
Search
Navigation
Main PageGetting StartedDownload OpenGLRegistryReference PagesReference GuideNewsCommunity ForumsAbout OpenGL
Help
Contact UsPrivacy PolicyHelp EditingRecent changes
Tools
What links hereRelated changesSpecial pagesPrintable versionPermanent linkPage informationCite this page
This page was last edited on 11 January 2021, at 22:38.
WGL 函数 - Win32 apps | Microsoft Learn
WGL 函数 - Win32 apps | Microsoft Learn
跳转至主内容
此浏览器不再受支持。
请升级到 Microsoft Edge 以使用最新的功能、安全更新和技术支持。
下载 Microsoft Edge
有关 Internet Explorer 和 Microsoft Edge 的详细信息
目录
退出焦点模式
使用英语阅读
保存
目录
使用英语阅读
保存
打印
电子邮件
目录
WGL 函数
项目
06/13/2023
2 个参与者
反馈
本文内容
以下是与 OpenGL 关联的 WGL 函数:
wglCopyContext
wglCreateContext
wglCreateLayerContext
wglDeleteContext
wglDescribeLayerPlane
wglGetCurrentContext
wglGetCurrentDC
wglGetLayerPaletteEntries
wglGetProcAddress
wglMakeCurrent
wglRealizeLayerPalette
wglSetLayerPaletteEntries
wglShareLists
wglSwapLayerBuffers
wglUseFontBitmaps
wglUseFontOutlines
反馈
此页面是否有帮助?
是
否
提供产品反馈
|
在 Microsoft Q&A 获取帮助
反馈
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.
提交和查看相关反馈
此产品
此页面
查看所有页面反馈
其他资源
加州消费者隐私法案 (CCPA) 禁用图标
你的隐私选择
主题
亮
暗
高对比度
早期版本
博客
参与
隐私
使用条款
商标
© Microsoft 2024
其他资源
本文内容
加州消费者隐私法案 (CCPA) 禁用图标
你的隐私选择
主题
亮
暗
高对比度
早期版本
博客
参与
隐私
使用条款
商标
© Microsoft 2024
OpenGL ES OpenGL WebGL EGL WGL 区别 - 知乎
OpenGL ES OpenGL WebGL EGL WGL 区别 - 知乎切换模式写文章登录/注册OpenGL ES OpenGL WebGL EGL WGL 区别猿说编程最简单详细python教程,零基础一起学python 目录
一.OpenGL
二.OpenGL ES
三.WebGL四.EGL 和 WGL
五.猜你喜欢
零基础 OpenGL ES 学习路线推荐 : OpenGL ES 学习目录 >> OpenGL ES 基础
零基础 OpenGL ES 学习路线推荐 : OpenGL ES 学习目录 >> OpenGL ES 特效
零基础 OpenGL ES 学习路线推荐 : OpenGL ES 学习目录 >> OpenGL ES 转场
零基础 OpenGL ES 学习路线推荐 : OpenGL ES 学习目录 >> OpenGL ES 函数
零基础 OpenGL ES 学习路线推荐 : OpenGL ES 学习目录 >> OpenGL ES GPUImage 使用
零基础 OpenGL ES 学习路线推荐 : OpenGL ES 学习目录 >> OpenGL ES GLSL 编程
一.OpenGL
OpenGL(全写 Open Graphics Library)是个定义了一个跨编程语言、跨平台的应用程序接口(API)的规格,它用于生成二维、三维图像。OpenGL 广泛用于 PC 平台(windows、Linux、Unix、Mac OS X);
二.OpenGL ES
早先定义 OpenGL ES 是 OpenGL 的嵌入式设备版本,用于移动端平台(Android、iOS),但由于嵌入式设备要求的是高性能,所以一些其它纯追求高性能的设备也开始用这种 API 方式;
OpenGL ES 是 OpenGL 的子集,区别在于 OpenGL ES 删减了 OpenGL 一切低效能的操作方式,有高性能的决不留低效能的,即只求效能不求兼容性。(即:OpenGL ES 能实现的,OpenGL 也能实现;OpenGL 部分 API,OpenGL ES 不支持)
OpenGL ES 是个与硬件无关的软件接口,可以在不同的平台如 Windows、Unix、Linux、MacOS、IOS、Android 之间进行移植。因此,支持 OpenGL ES 的软件具有很好的移植性,可以获得非常广泛的应用。
三.WebGL
前面有做介绍,OpenGL 属于 PC 端 ; OpenGL 属于移动端,可以用作 PC 端;而 WebGL 用于 Web 浏览器;
WebGL 是基于 OpenGL ES 2.0 的 Javascript API,被各大** web 浏览器**厂商广泛支持,使用 JavaScript 语言提供 API ,不使用插件的情况下在兼容的 web 浏览器的 Canvas 上呈现交互式 3D 图形;
四.EGL 和 WGL
OpenGL 和 OpenGL ES 在不同平台上有不同的机制以关联窗口系统:
1. OpenGL 在 Windows 上是 WGL ,在 Linux 上是 GLX ,在 Apple OS 上是 AGL ;
2. OpenGL ES 在 Windows / Android 上是 EGL,在 IOS 中是 EAGL;
EGL OpenGL ES 绘制可以参考以下代码:
Windows OpenGL ES 调节亮度 Demo
Windows OpenGL ES 调节曝光 Demo
Windows OpenGL ES 调节对比度 Demo
Windows OpenGL ES 调节饱和度 Demo
Windows OpenGL ES 调节伽马线 Demo
WGL OpenGL 绘制可以参考以下代码:
Windows OpenGL 调节亮度 Demo
Windows OpenGL 调节曝光 Demo
Windows OpenGL 调节对比度 Demo
Windows OpenGL 调节饱和度 Demo
Windows OpenGL 调节伽马线 Demo
五.猜你喜欢
OpenGL ES 简介
OpenGL ES 版本介绍
OpenGL ES 2.0 和 3.0 区别
OpenGL ES 名词解释(一)
OpenGL ES 名词解释(二)
OpenGL ES GLSL 着色器使用过程
OpenGL ES EGL 简介
OpenGL ES EGL 名词解释
OpenGL ES EGL eglGetDisplay
OpenGL ES EGL eglInitialize
OpenGL ES EGL eglGetConfigs
OpenGL ES EGL eglChooseConfig
OpenGL ES EGL eglGetError
OpenGL ES EGL eglCreateContext
OpenGL ES EGL eglCreateWindowSurface
OpenGL ES EGL eglCreatePbufferSurface
OpenGL ES EGL eglMakeCurrent
OpenGL ES EGL eglSwapBuffer
OpenGL ES EGL eglDestroySurface
OpenGL ES EGL eglDestroyContext
OpenGL ES EGL eglQueryContext
OpenGL ES EAGLContext 和 EGLContext
OpenGL ES OpenGL WebGL EGL WGL 区别
本文由博客 - 猿说编程 猿说编程 发布!
发布于 2022-11-13 08:31・IP 属地重庆OpenGL ES 3.x游戏开发(上卷)(书籍)赞同 1添加评论分享喜欢收藏申请
Attention Required! | Cloudflare
Attention Required! | Cloudflare
Please enable cookies.
Sorry, you have been blocked
You are unable to access allacronyms.com
Why have I been blocked?
This website is using a security service to protect itself from online attacks. The action you just performed triggered the security solution. There are several actions that could trigger this block including submitting a certain word or phrase, a SQL command or malformed data.
What can I do to resolve this?
You can email the site owner to let them know you were blocked. Please include what you were doing when this page came up and the Cloudflare Ray ID found at the bottom of this page.
Cloudflare Ray ID: 860b1aa2fc000450
•
Your IP:
Click to reveal
49.157.13.121
•
Performance & security by Cloudflare
GLX 和 WGL/Windows - Win32 apps | Microsoft Learn
GLX 和 WGL/Windows - Win32 apps | Microsoft Learn
跳转至主内容
此浏览器不再受支持。
请升级到 Microsoft Edge 以使用最新的功能、安全更新和技术支持。
下载 Microsoft Edge
有关 Internet Explorer 和 Microsoft Edge 的详细信息
目录
退出焦点模式
使用英语阅读
保存
目录
使用英语阅读
保存
打印
电子邮件
目录
GLX 和 WGL/Windows
项目
06/13/2023
4 个参与者
反馈
本文内容
某些 WGL 函数和 Windows 函数或多或少类似于 GLX X 窗口函数。 以下列表显示 GLX 函数及其相应的 WGL/Windows 函数(如果可用)。
GLX 函数
WGL/Windows Functions
glXChooseVisual
ChoosePixelFormat
glXCopyContext
glXCreateContext
wglCreateContext
glXCreateGLXPixmap
CreateDIBitmap / CreateDIBSection
glXDestroyContext
wglDeleteContext
glXDestroyGLXPixmap
DeleteObject
glXGetConfig
DescribePixelFormat
glXGetCurrentContext
wglGetCurrentContext
glXGetCurrentDrawable
wglGetCurrentDC
glXIsDirect
glXMakeCurrent
wglMakeCurrent
glXQueryExtension
GetVersion
glXQueryVersion
GetVersion
glXSwapBuffers
SwapBuffers
glXUseXFont
wglUseFontBitmaps / wglUseFontOutlines
glXWaitGL
glXWaitX
XGetVisualInfo
GetPixelFormat
XCreateWindow
CreateWindow / CreateWindowEx 和 GetDC / BeginPaint
XSync
GdiFlush
SetPixelFormat
wglGetProcAddress
wglShareLists
有关详细信息,请参阅 移植指南。
反馈
此页面是否有帮助?
是
否
提供产品反馈
|
在 Microsoft Q&A 获取帮助
反馈
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see: https://aka.ms/ContentUserFeedback.
提交和查看相关反馈
此产品
此页面
查看所有页面反馈
其他资源
加州消费者隐私法案 (CCPA) 禁用图标
你的隐私选择
主题
亮
暗
高对比度
早期版本
博客
参与
隐私
使用条款
商标
© Microsoft 2024
其他资源
本文内容
加州消费者隐私法案 (CCPA) 禁用图标
你的隐私选择
主题
亮
暗
高对比度
早期版本
博客
参与
隐私
使用条款
商标
© Microsoft 2024
WGL控股(WGL)股票股价_股价行情_财报_数据报告 - 雪球
股(WGL)股票股价_股价行情_财报_数据报告 - 雪球首页行情行情中心筛选器新股上市买什么交易A股交易基金交易私募中心下载App扫一扫,下载登录/注册公司概况公司简介公司高管内部持股所属指数股票交易盘前交易盘后交易历史价格期权交易空仓数据内部交易财报公告SEC文件财报公告(中)财报公告(英)电话会议实录财务数据主要指标分红派息利润表资产负债表现金流量表雪球选股器研究分析收益预估评级变化研究报告APP专享大盘异动股价提醒购买指数相关ETF扫码下载雪球App查看详情WGL控股(NYSE:WGL)可融资$88.74-- -- 18 球友关注盘前交易 03-06 09:30:00 美东时间最高:--今开:--成交量:--换手:--最低:--昨收:88.74成交额:--振幅:--52周最高:--量比:--市盈率(TTM):16.05市净率:2.8352周最低:--委比:0.00%市盈率(静):23.73市销率:1.87每股收益:5.34股息(TTM):--每手股数:1总市值:45.58亿每股净资产:34.63股息率(TTM):--最小价差:0.01总股本:5135.92万机构持股:63.85%Beta:0.57空头回补天数:--货币单位:USD分时五日日K周K月K季K年K120分60分30分15分5分1分区间统计全屏显示股票对比前复权前复权后复权不复权MABOLL成交量MACDKDJPEPSPCF总市值WRRSIBIASCCIPSY近1月近3月近6月近1年近3年近5年今年以来上市以来-简介WGL控股公司在弗吉尼亚州成立,子公司销售和运输天然气,并且为哥伦比亚区、马里兰与弗吉尼亚周围的大都市提供与能源相关的产品与服务。WGL控股公司拥有华盛顿天然气公司的所有普通股的股份,该公司是天然气产品相关的实体公司,此外,WGL控股公司还拥有华盛顿天然气资源公司、汉普郡天然气公司和Crab Run天然气公司的所有普通股股份。华盛顿天然气资源公司有四个业务不相关的子公司,包括华盛顿天然气能源服务有限公司、华盛顿天然气能源系统有限公司、国会能源合资公司和WGSW有限公司。公司网站:http://www.wglholdings.com公司地址:101 Constitution Ave.N.W.
Washington, D.C. 20080公司电话:1-703-7502000收起WGL控股公司在弗吉尼亚州成立,子公司销售和运输天然气,并且为哥伦比亚区、马里兰与弗吉尼亚周围的大都市提供与能源相关的产品与服务。...展开