OpenGL 缂栫▼鎸囧崡 (9.2)

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OpenGL 缂栫▼鎸囧崡 (9.2)相关的知识,希望对你有一定的参考价值。

鏍囩锛?a href='http://www.mamicode.com/so/1/ati' title='ati'>ati   鍒嗗眰   text   鎵ц   open   vat   澧炲姞   raw   鍒囩墖   

1銆佷娇鐢╣lDrawArraysInstanced涓巊lDrawElementsInstanced杩欑被鐨勫嚱鏁颁娇鐢╣l_InstanceID杩涜涓嶅悓鍙樺寲鐨勫疄渚嬪寲锛屽疄璐ㄤ笂鏄娇鐢ㄤ竴鎵归《鐐规暟鎹墽琛屽娆℃暣涓覆鏌撶绾匡紝濡傛灉鍚敤缁嗗垎鍙兘缁橤PU澧炲姞娼滃湪(涓哄暐鏄綔鍦紵涓嶆槸鐩存帴鐨勫悧锛岃繕鏈夊暐涓滀笢娌℃湁get鍒?璐熸媴銆傚嚑浣曞疄渚嬪寲锛屽彲浠ヨ妭鐪佸嚑浣曠潃鑹插櫒涔嬪墠鐨勬祦绋嬶紝杩欎袱绉嶅疄渚嬪寲鍙互鍚屾椂浣跨敤銆?/span>鍦╯hader涓€氳繃invocations甯冨眬闄愬畾绗︽潵鎸囧畾鎵ц娆℃暟锛屽唴寤哄彉閲廹l_InvocationID浠h〃鐫€鎵ц绱㈠紩锛屾敮鎸佺殑鏈€澶у€奸€氳繃GL_MAX_GEOMETRY_SHADER_INVOCATIONS鏉ヨ幏鍙栵紝涓嶅皬浜?2

  layout (triangles, incovations = 4) in;

 

2銆佸瑙嗗彛浣跨敤鐨勫唴寤哄彉閲廹l_ViewportIndex锛屽绐楀彛杩涜鎸囧畾鍙傛暟鍚庣殑鍒嗗壊銆傚綋绋嬪簭瀛樺湪鍑犱綍鐫€鑹插櫒鏃跺畠浠細琚瓨鍌ㄥ埌gl_ViewportIndex瀵瑰簲鐨勬暟缁勪腑鍘?gl_ViewportIndex鍙槸鏁扮粍瀵瑰簲鐨勭储寮曡€屽凡锛屽綋瑕佷娇鐢ㄧ浜屼釜瑙嗗彛鏄墽琛実l_ViewportIndex = 1鍚庤繘琛屾暟鎹搷浣滃嵆鍙?锛屼笉瀛樺湪鏄娇鐢ㄧ涓€涓鍙d俊鎭€?/span>

  void glViewportIndexedf(GLuint index, GLfloat x, GLfloat y, GLfloat w, GLfloat h)

  void glViewportIndexedfv(GLuint index, const GLfloat* values)

  void glDepthRangeIndexed(GLuint index, GLclampd n, GLclampd f)//鎸囧畾绐楀彛z鍧愭爣鐨勮寖鍥达紝杩戝钩闈笌杩滃钩闈?/span>

  void glViewportArrayv(GLuint first, GLsizei count, const GLfloat* values)

  void glDepthRangeArrayv(GLuint first, GLsizei count, const GLdouble* values)

鎶€鏈浘鐗? src=

 

 

 

3銆佽鍙e閲嶅壀鍒?/span>

  void glScissorIndexed(GLuint index, GLint x, GLint y, GLsizei width, GLsizei height)

  viod glScissorIndexedv(GLuint index, const GLint* values)

  void glScissorArrayv(GLuint first, GLsizei count, const GLint* values)

 

4銆佸垎灞傛覆鏌?/span>

  娓叉煋甯х紦鍐叉椂锛屽彲浠ヤ娇鐢?D鏁扮粍绾圭悊浣滀负棰滆壊闄勪欢鐒跺悗浣跨敤geometry shader娓叉煋鍒版暟缁勪腑鐨勪竴涓垏鐗囦笂銆備娇鐢ㄥ抚缂撳啿鐨勫垎灞傞檮浠舵湁涓€涓檺鍒讹紝鎵€鏈夐檮浠堕兘蹇呴』鍒嗗眰涓斿悓灞傛崲鎴愮殑闄勪欢蹇呴』鐩稿悓鐨勬枃鐞嗙被鍨嬨€傞偅涔堝浜?D绾圭悊鏁扮粍涓巆ube map绾圭悊闇€瑕佸悓鏃朵娇鐢ㄧ殑鎯呭喌涓嬪氨鏃犺兘涓哄姏浜嗐€傚洜姝ゅ彲浠ヤ娇鐢?D绾圭悊鏁扮粍鍦╣lFramebufferTextureLayer鐨勫府鍔╀笅瀹屾垚宸ヤ綔锛屾鏃堕渶瑕佸悜鍐呭缓鍙橀噺gl_Layer鍐欏叆闇€瑕佸啓鍏ユ暟鎹殑鍒囩墖绱㈠紩銆?/span>

鎶€鏈浘鐗? src=

 

 

 

闇€瑕佹敞鎰忕殑鏄紝鍦∣penGL4.3鍓嶏紝濡傛灉鎯冲湪鐗囧厓鐫€鑹插櫒涓娇鐢╣l_ViewportIndex 涓?gl_Layer闇€瑕佽嚜琛屽畾浼犻€掋€?/span>

 

以上是关于OpenGL 缂栫▼鎸囧崡 (9.2)的主要内容,如果未能解决你的问题,请参考以下文章

銆恓s銆慞romise.all椋熺敤鎸囧崡

涓€鐧剧鐪嬫噦2020鐗圫crum鎸囧崡涓冨ぇ鏍稿績鍙樺寲 闄勪腑鏂囩増PDF涓嬭浇

銆奣hree.js 鍏ラ棬鎸囧崡銆? Three JS 鍔熻兘棰勮

鍒繖鐫€鎾掓鍎夸簡锛岄€佷綘涓€鏈€婂墠绔嚱鏁板紡鏀诲煄鎸囧崡銆嬪彲濂斤紵

鑵捐 Git 瑙勮寖鍑虹倝锛屽啓缁欏紑鍙戣€呯殑 Git 鎸囧崡!

銆婅吘璁伐绋嬪笀鎬荤粨JAVA闈㈣瘯鎸囧崡銆?PDF