欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

OpenGL ES EGL eglGetError

目錄

創(chuàng)新互聯(lián)主要從事網(wǎng)站設(shè)計制作、成都做網(wǎng)站、網(wǎng)頁設(shè)計、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)來賓,10年網(wǎng)站建設(shè)經(jīng)驗(yàn),價格優(yōu)惠、服務(wù)專業(yè),歡迎來電咨詢建站服務(wù):18982081108

  • 一. EGL 前言
  • 二. EGL 繪制流程簡介
  • 三.eglGetError 函數(shù)簡介
  • 四.eglGetError 函數(shù)使用
  • 五.猜你喜歡

零基礎(chǔ) OpenGL ES 學(xué)習(xí)路線推薦 : OpenGL ES 學(xué)習(xí)目錄 >> OpenGL ES 基礎(chǔ)

零基礎(chǔ) OpenGL ES 學(xué)習(xí)路線推薦 : OpenGL ES 學(xué)習(xí)目錄 >> OpenGL ES 特效

零基礎(chǔ) OpenGL ES 學(xué)習(xí)路線推薦 : OpenGL ES 學(xué)習(xí)目錄 >> OpenGL ES 轉(zhuǎn)場

零基礎(chǔ) OpenGL ES 學(xué)習(xí)路線推薦 : OpenGL ES 學(xué)習(xí)目錄 >> OpenGL ES 函數(shù)

零基礎(chǔ) OpenGL ES 學(xué)習(xí)路線推薦 : OpenGL ES 學(xué)習(xí)目錄 >> OpenGL ES GPUImage 使用

零基礎(chǔ) OpenGL ES 學(xué)習(xí)路線推薦 : OpenGL ES 學(xué)習(xí)目錄 >> OpenGL ES GLSL 編程

一. EGL 前言

EGLNativeDisplayType – 系統(tǒng)顯示類型,標(biāo)識你所開發(fā)設(shè)備的物理屏幕,DX/OPenGL ES/Metal/Vulkan….

EGLNativeWindowType – 系統(tǒng)窗口,渲染顯示的窗口句柄

EGLDisplay – 關(guān)聯(lián) EGLNativeDisplayType 系統(tǒng)物理屏幕的通用數(shù)據(jù)類型,是平臺上 WGL / GLX / AGL 的等價物

EGLSurface – 渲染區(qū)域,系統(tǒng)窗口或 frame buffer 句柄 ,可以理解為一個后端的渲染目標(biāo)窗口

EGLConfig – 對 EGLSurface 的 EGL 配置,可以理解為繪制目標(biāo) framebuffer 的配置屬性

EGLContext – OpenGL ES 圖形上下文

二. EGL 繪制流程簡介

  1. 獲取 EGL Display 對象:eglGetDisplay
  2. 初始化與 EGLDisplay 之間的連接:eglInitialize
  3. 獲取 EGLConfig 對象:eglChooseConfig / eglGetConfigs
  4. 創(chuàng)建 EGLContext 實(shí)例:eglCreateContext
  5. 創(chuàng)建 EGLSurface 實(shí)例:eglCreateWindowSurface
  6. 連接 EGLContext 和 EGLSurface:eglMakeCurrent
  7. 使用 OpenGL ES API 繪制圖形:gl_*
  8. 切換 front buffer 和 back buffer 顯示:eglSwapBuffer
  9. 斷開并釋放與 EGLSurface 關(guān)聯(lián)的 EGLContext 對象:eglRelease
  10. 刪除 EGLSurface 對象
  11. 刪除 EGLContext 對象
  12. 終止與 EGLDisplay 之間的連接

三.eglGetError 函數(shù)簡介

EGL 中大部分函數(shù)成功時都是返回 EGL_TRUE,失敗返回 EGL_FALSE。至于其他錯誤原因,需要調(diào)用 eglGetError 函數(shù)獲取:

// 描述:返回 EGL 錯誤號,如果返回 EGL_SUCCESS 說明沒有錯誤
EGLint eglGetError();

四.eglGetError 函數(shù)使用

調(diào)用 eglGetError 如果返回 EGL_SUCCESS 說明沒有錯誤,返回其他值表示有錯誤產(chǎn)生;例如 :eglInitialize 會初始化 EGL 內(nèi)部數(shù)據(jù),分配顯存等初始化失敗

/******************************************************************************************/
//@Author:猿說編程
//@Blog(個人博客地址): www.codersrc.com
//@File:OpenGL ES EGL eglGetError
//@Time:2022/08/04 07:30
//@Motto:不積跬步無以至千里,不積小流無以成江海,程序人生的精彩需要堅持不懈地積累!
/******************************************************************************************/

EGLint attrs[3] = { EGL_DEPTH_SIZE, 16, EGL_NONE };
EGLint num_configs;
EGLConfigs *configs_list;
// Get the display device
if ((eglDisplay = eglGetDisplay(EGL_NO_DISPLAY)) == EGL_NO_DISPLAY) {
	return eglGetError();
}
// Initialize the display
if (eglInitialize(eglDisplay, NULL, NULL) == EGL_FALSE) {
	return eglGetError();
}
// Obtain the total number of configurations that match
if (eglChooseConfig(eglDisplay, attrs, NULL, 0, &num_configs) == EGL_FALSE) {
	return eglGetError();
}
configs_list = malloc(num_configs * sizeof(EGLConfig));
if (configs_list == (EGLConfig *)0){
	return eglGetError();
}
// Obtain the first configuration with a depth buffer of 16 bits
if (!eglChooseConfig(eglDisplay, attrs, &configs_list, num_configs, &num_configs)) {
	return eglGetError();
}

五.猜你喜歡

  1. OpenGL ES 簡介
  2. OpenGL ES 版本介紹
  3. OpenGL ES 2.0 和 3.0 區(qū)別
  4. OpenGL ES 名詞解釋(一)
  5. OpenGL ES 名詞解釋(二)
  6. OpenGL ES GLSL 著色器使用過程
  7. OpenGL ES EGL 簡介
  8. OpenGL ES EGL 名詞解釋
  9. OpenGL ES EGL eglGetDisplay
  10. OpenGL ES EGL eglInitialize
  11. OpenGL ES EGL eglGetConfigs
  12. OpenGL ES EGL eglChooseConfig
  13. OpenGL ES EGL eglGetError

本文由博客 - 猿說編程 猿說編程 發(fā)布!

當(dāng)前標(biāo)題:OpenGL ES EGL eglGetError
文章來源:http://chinadenli.net/article22/dsoiecc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供微信公眾號用戶體驗(yàn)、網(wǎng)站策劃小程序開發(fā)、網(wǎng)站維護(hù)軟件開發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

搜索引擎優(yōu)化