0
A
回答
1
讀完代碼後:暫時不能。初始化着色器類沒有公開,但我向Haehn提出了一個問題,將其導出爲公共,以便可以實例化一個着色器。此外,它需要2個設置片段和頂點源的setter,並刪除在着色器源中使用的所有屬性/制服的測試。
請注意,使用當前代碼,您無法將參數添加到着色器(順便說一句,應該有足夠的任何用途,您可以在「屬性」和「制服」中看到它們here)。
要使用它,在這之後,我會說:
var r = new X.renderer3D(); //create a renderer
r.init(); //initiate it
var sh = new X.shaders(); // create a new par of shaders
/* here use the futur setters to set sources from a string or a file */
r.addShaders(sh); // this set the shaders for the renderer and try to compile them
// DO NOT call init anymore or it would erase the current shaders and replace them by default ones
/*
Any code to fill the scene, etc...
*/
r.render();
但需要等待3個改變我在這篇文章開始時所說的。我在等Haehn的消息。
0
@ Ricola3D是對的。
對此的討論是在這裏:
https://github.com/xtk/X/issues/69
但是,如果你想爲頂點的alpha通道,您可以使用X.object.opacity。
相關問題
- 1. 需要示例用例圖
- 2. 使用JQuery示例需要的圖像顯示需要
- 3. 需要例如如何使用
- 4. 使用XTK進行對象實例化?
- 5. 需要示例使用boost :: fusion :: filter_if metafunction
- 6. 需要使用TypeWatch的示例
- 7. 需要更多關於如何使用Spreadsheet :: ParseExcel的示例
- 8. 需要一些更新的示例如何使用QListView
- 9. 需要幫助maven示例
- 10. 需要示例實現MessageHeaders.WriteHeaderContents
- 11. 需要AvalonDock ILayoutUpdateStrategy示例
- 12. 需要richfaces拖放示例
- 13. 需要Android ProtoBuf RPC示例?
- 14. 需要Mono Zeroconf示例
- 15. 需要MUMPS示例代碼
- 16. 需要幫助Rspec示例
- 17. Antlr符號 - 需要示例
- 18. Greendroid GDExpandableListActivity示例需要
- 19. 需要Vaadin ExcelExport示例
- 20. 需要AES解密示例
- 21. threejs AnimationClip示例需要
- 22. RESTful MongoDB需要Nodejs示例
- 23. 需要MCAPI.Net的C#示例
- 24. System.Linq.Dynamic庫 - 需要Count()示例
- 25. OSMDroid簡單示例需要
- 26. 需要例如使用CounterDelta32的PerformanceCounter
- 27. 需要代碼示例展示如何使用Codeigniter發佈到Wordpress
- 28. 如何引用去旗IsSet,功能的代碼示例需要
- 29. HTML示例使用非編譯開發版本的xtk不起作用
- 30. 需要顯示如何執行異步HTTP請求的示例