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)
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>
闇€瑕佹敞鎰忕殑鏄紝鍦∣penGL4.3鍓嶏紝濡傛灉鎯冲湪鐗囧厓鐫€鑹插櫒涓娇鐢╣l_ViewportIndex 涓?gl_Layer闇€瑕佽嚜琛屽畾浼犻€掋€?/span>
以上是关于OpenGL 缂栫▼鎸囧崡 (9.2)的主要内容,如果未能解决你的问题,请参考以下文章
涓€鐧剧鐪嬫噦2020鐗圫crum鎸囧崡涓冨ぇ鏍稿績鍙樺寲 闄勪腑鏂囩増PDF涓嬭浇
銆奣hree.js 鍏ラ棬鎸囧崡銆? Three JS 鍔熻兘棰勮
鍒繖鐫€鎾掓鍎夸簡锛岄€佷綘涓€鏈€婂墠绔嚱鏁板紡鏀诲煄鎸囧崡銆嬪彲濂斤紵