This document mainly talks about OpenGL programming based on MFC; GDI draws through the device handle (Device Context, hereinafter referred to as "DC"), while OpenGL requires a rendering environment (Rendering Context, hereinafter referred to as "RC"). Each GDI command requires a DC to be passed to it, but unlike GDI, OpenGL uses the current drawing context (RC). Once a current RC is specified in a thread, all subsequent OpenGL commands in this thread use the same current RC. While multiple RCs can be used in a single window, there is only one current RC in a single thread. Below I will first generate an OpenGL RC and make it the current RC, which will be divided into three steps: set the window pixel format; generate RC; set as the current RC. I hope this document will help friends in need; interested friends can come and take a look.
All resources on this website are contributed and published by netizens, or reprinted by major download sites. Please check the integrity of the software yourself! All resources on this website are for learning and reference only. Please do not use them for commercial purposes, otherwise you will be responsible for all consequences incurred! If there is any infringement, please contact us to delete and remove it. Contact information: admin@php.cn