發表文章

目前顯示的是 1月, 2021的文章

OpenGL各函式意思

本篇文章是記錄我在OpenGL中,曾使用到的函式及各代表的意思 glEnable此函式在Opengl中的功能是:用於啟用各種功能 參數 用法 GL_LIGHT0 用默認的0號燈 GL_LIGHTING 使用燈光 GL_COLOR_MATERIAL 使用顏色材質 注意: GL_COLOR_MATERIAL可以用顏色來貼物體。如果沒有這行代碼,紋理將始終保持原來的顏色,glColor3f(r,g,b)就沒有用了。激活GL_COLOR_MATERIAL可以在激活光照的情況下用glColor函數給物體上色。這個方法又稱為顏色追踪 glClearColor此函式在Opengl中的功能是:設置底色,只起到Set的作用,並不Clear任何東西。 void glClearColor(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);

用於Blogger的表格

要在blogger文章中插入表格(table),可以使用HTML切換功能,放入表格的程式碼。  這裡是我在部落格使用的樣式   這裡是程式碼 <style> #customers {   font-family: Arial, Helvetica, sans-serif;   border-collapse: collapse;   width: 100%; } #customers td, #customers th {   border: 1px solid #ddd;   padding: 8px; } #customers tr:nth-child(even){background-color: #f2f2f2;} #customers tr:hover {background-color: #ddd;} #customers th {   padding-top: 12px;   padding-bottom: 12px;   text-align: left;   background-color: #4CAF50;   color: white; } </style> <table id="customers">   <tr>     <th></th>     <th></th>     <th></th>     <th></th>   </tr>     <tr>     <td></td>     <td></td>     <td>...

Windows Form 加入顯示OpenGL的元件步驟 HKOGLPanel.dll

圖片
  1.加入顯示OpenGL的元件 2.在一般上按右鍵 3.選擇.NET Framework元件把HKOGLPanel.dll載入即可使用 完成囉😊😊😊 HKOGLPanel download

Visual Studio 2015 2017 2019 CLR Windows Form 6步驟設定及空專案下載 download

圖片
目前可以這方法可以用於Visual Stuido 2015、2017,但在2019會在第三部找不到UI,可以用Visual Stuido 2015、2017設定好再2019開啟 最下方有空專案可以下載 1.這裡使用Visual Stuido2017開啟新專案 2.開啟CLR空白專案 3.在專案→加入新項目→選UI→加入Windows Form元件 4.屬性→連結器→系統→子系統選 Windows (/SUBSYSTEM:WINDOWS) 5.屬性→連結器→系統→進階→進入點 寫main 6.在MyForm.cpp貼上程式碼 #include "MyForm.h" using namespace System; using namespace System::Windows::Forms; [STAThread] void main(array ^ args) { Application::EnableVisualStyles(); Application::SetCompatibleTextRenderingDefault(false); Example::MyForm myForm; Application::Run(%myForm); } 完成了😊😊😊 Visual Stuido 2017 Windows Form download Visual Stuido 2019 Windows Form download