HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 最近項目當(dāng)中需要使用到ICMP協(xié)議,如果不使用Ping命令,使用NDK實現(xiàn),請問如何實現(xiàn)。(本人剛接觸 不到一個月,見笑啦?。?/div>
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 從其他電腦拷過來的安卓工程,在用到R.layout或者R.id時就會找不到東西,報錯如圖,怎么解決呢?導(dǎo)包不對還是設(shè)置的問題?
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> eclipse真機機調(diào)試的時候 怎么能實現(xiàn)讓eclipse連接其他電腦上面的手機 而不是自己電腦上的手機,我們公司推出一套 遠程服務(wù)平臺 方便的幫助用戶管理大量的手機,避免企業(yè)大量手機在開發(fā)人員中來回傳遞,難以管理 , 用戶可以通過遠程服務(wù)平臺查看在機房中所有手機的信息,并選擇一款自己需要測試的手機,進行遠程安裝,測試自己的應(yīng)用程序?,F(xiàn)在我們希望開發(fā)人員也能隨時的調(diào)試自己的程序,在開發(fā)的代碼階段,在eclipse中選擇USB真機調(diào)試的時候ECLIPSE可以自動的啟動我們的平臺并且將程序安裝在我們遠程服務(wù)器上面的手機上,現(xiàn)在我們的平臺已經(jīng)完成,但是必須手動的上傳應(yīng)用到平臺才可以安裝在遠程手機上,不能用ECLIPES直接安裝,有誰知道解決辦法的請聯(lián)系我Q235923744
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
Eclipse中的DDMS中看不到Android的data文件夾下的內(nèi)容
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> apk 在Eclipse 上調(diào)試開發(fā)運行在手機上正常,但是打包簽名后就會apk異常退出,什么原因? 異常如下: thread exiting with uncaught exception (group=0x410fc360) 各位請幫忙解決一下
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
使用uploadify上傳文件,限制文件個數(shù)為3個,設(shè)置為自動上傳,
3個文件上傳成功后,在上傳會提示限制為3個文件。
請問如何解決上傳成功后刪除文件,繼續(xù)刪除?
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
大家好,我使用uploadify v2.1.4 + vs 2008,測試代碼在本機運行一切正常,但是發(fā)布到服務(wù)器上面就無法使用。我定位不出錯誤的根源,似乎的.swf文件無法動態(tài)生成出來。通過調(diào)試腳本,告訴我一個這樣的錯誤:Error calling method on NPObject!
我在項目里面使用了URL重寫組件——Intelligencia.UrlRewriter。我不知道是否和這個組件有關(guān)系。因為我單獨建立了一個測試程序來測試uploadify,發(fā)布后并沒有上述的問題。
同時,我也猜測是否是因為Flash跨域訪問的問題?我不知道為什么會發(fā)生這樣的問題,也就是在本機運行正常,發(fā)布到服務(wù)器后無法運行。
不知道大家是否遇到過這樣的問題,或者給我給我任何的建議和幫助。非常感謝!
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
uploadify版本使用的是3.2的,在使用uploadify插件上傳大文件成功之后,無法接受服務(wù)器返回的數(shù)據(jù),代碼如下: 'onUploadSuccess': function(file, data, response){ //上傳成功后觸發(fā) videoState = '2';//修改上傳狀態(tài)為成功 $('#rNameOfVideo').val(data); $.messager.alert('溫馨提示', "文件 '" + file.name + "'上傳成功!", 'info',function(){ $('#rNameOfVideo').val(data); $('#videoQueue').html(file.name); $('#uploadify').uploadify('settings','buttonText','重新選擇'); }); },
data參數(shù)為空,可是后臺有給前臺數(shù)據(jù),并且在上傳小文件時data有值,有人知道什么原因嗎?
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
寫一個關(guān)于“OpenGL”的demo,運行后定義的東西沒有顯示出來,程序沒有報錯,根據(jù)LOGCAT顯示就報了一下問題(在Anroid Studio上開發(fā)的), 請高人幫我指點一下?
01-06 23:23:47.401 5121-5146/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Bytes : 512 1024 2048 4096 8192 16384 32768 65536 131072 01-06 23:23:47.401 5121-5146/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: ---------------|-------|-------|-------|-------|-------|-------|-------|-------|01-06 23:23:47.402 5121-5146/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: H -> VB: 221.98 1627.89 2170.52 1627.89 1817.18 1860.44 1894.27 1871.58 1830.48 01-06 23:23:47.404 5121-5146/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: H -> H: 49.83 3255.77 3255.77 1698.67 2367.84 2480.59 2500.44 2315.22 2446.61 01-06 23:23:49.577 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Bytes : 512 1024 2048 4096 8192 16384 32768 65536 131072 01-06 23:23:49.577 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: ---------------|-------|-------|-------|-------|-------|-------|-------|-------| 01-06 23:23:49.579 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: H -> VB: 93.92 1627.86 1953.43 1627.86 1775.85 1838.53 1860.41 1871.55 1894.24 01-06 23:23:49.580 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: H -> H: 101.74 3255.72 3255.72 1698.64 2367.80 2441.79 2520.56 2385.87 2437.03 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total Frames 787 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Profiled Frames (0-787) 787 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Average Elapsed Time per Profiled Frame (ms) 16.5529 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Average Driver Time per Profiled Frame (ms) 13.1405 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Estimated FPS 60.4123 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: Statistics per profiled frame [Calls/Time(ms)] 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total Prepare to draw 1/ 13.0116 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total RGXKickTA 1/ 0.8993 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total RGXKickCDM 0/ 0.0000 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: BindFramebuffer kick : 0/ - 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: FlushAttachable kick : 1/ - 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: BufferData kick (TA) : 0/ - 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: BufferData kick (CDM): 0/ - 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total Renders 1.0000/ - 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total glFinish 0/ 0.0000 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total Wait for 3D 0/ 0.0000 01-06 23:24:02.759 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total Wait for TA 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total Wait for CDM 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total ValidateState() 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - Setup_VAO_AttribStreams() 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - Setup_VAO_AttribPointers() 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - Setup_TextureState() 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - Setup_VertexShader() 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - Setup_RenderState() 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - Setup_FragmentShader() 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total EmitState() 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - WritePDSPixelShaderProgram() 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - WritePDSVertexShaderProgram() 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - WritePDSCommonStoreLoad(Frag) 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - WritePDSCoefficientLoadingProgram 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - WritePDSCommonStoreLoad(Vert) 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - WritePPPState() 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - WriteVDMControlStream() 1/ 0.0018 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total CDM EmitState() 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - WriteCDMControlStream() 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - WritePDSCommonStoreLoad(Compute) 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: USC Codeheap Alloc - Fragment 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: USC Codeheap Alloc - Vertex 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: PDS Codeheap Alloc - Fragment 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: USC Codeheap Alloc - Compute 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: PDS Codeheap Alloc - Compute 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total NamesArray operations 0/ 0.0005 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total Frame Resource Manager ops. 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total Frame Resource Manager Waits 0/ 0.0000 01-06 23:24:02.760 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total Code Heap operations 0/ 0.0000 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total Primitive Draw 1/ 0.0064 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total Vertex Data Copy 0/ 0.0000 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Total Index Data Generate/Copy 0/ 0.0000 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Array Triangles 1/ 0.0032 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: PDS Variant hit/miss totals 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: PDSPixelShaderProgram - variant hit 0 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: PDSPixelShaderProgram - variant miss 0 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Early 3D kicks per frame 0.00 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Depth attachment renders skipped 0 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: Statistics per call [Maximum time (ms) in a single call] 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Max Prepare to draw 56.508076 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Max KickTA 5.645108 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Max KickCDM 0.000000 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Max Wait for 3D 0.001000 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Max Wait for TA 0.000000 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Max Wait for CDM 0.000000 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Max ValidateState() 0.000000 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Max EmitState() 0.000000 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Max NamesArray operation 0.317950 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Max Frame Resource Manager op. 0.000000 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Max Frame Resource Manager Wait 0.000000 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Max Code Heap operation 0.000000 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Buffer Statistics [ kB/kB per Profiled Frame ] 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: VDM Control 21.5195/ 0.0273 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Vertex data 27.6680/ 0.0352 01-06 23:24:02.761 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Index data 0.0000/ 0.0000 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: PDS vertex data 24.5938/ 0.0312 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: PDS fragment data 43.1094/ 0.0548 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: USC fragment data 0.0000/ 0.0000 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: PPP State 86.0781/ 0.1094 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Compute PDS data 0.0000/ 0.0000 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Compute constant data 0.0000/ 0.0000 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Compute CDM data 0.0000/ 0.0000 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Vertex constants 0.0000/ 0.0000 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Vertex image state 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - static image state miss ratio nan% 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - non static image state 0.0000/ 0.0000 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Vertex sampler state 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - static sampler state miss ratio nan% 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - non static sampler state 0.0000/ 0.0000 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Vertex other non static tex state 0.0000/ 0.0000 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Vertex PDS code 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - static PDS code miss ratio nan% 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - non static PDS code 0.0000/ 0.0000 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Fragment constants 0.0000/ 0.0000 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Fragment image state 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - static image state miss ratio nan% 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - non static image state 0.0000/ 0.0000 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Fragment sampler state 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - static sampler state miss ratio nan% 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - non static sampler state 0.0000/ 0.0000 01-06 23:24:02.762 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Fragment other non static tex state 0.0000/ 0.0000 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Fragment PDS code 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - static PDS code miss ratio nan% 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - non static PDS code 0.0000/ 0.0000 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Fragment PDS data section for texture state 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - static PDS data miss ratio nan% 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - non static PDS data 0.0000/ 0.0000 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Compute constants 0.0000/ 0.0000 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Compute image state 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - static image state miss ratio nan% 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - non static image state 0.0000/ 0.0000 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Compute sampler state 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - static sampler state miss ratio nan% 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - non static sampler state 0.0000/ 0.0000 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Compute other non static tex state 0.0000/ 0.0000 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Compute PDS code 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - static PDS code miss ratio nan% 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: - non static PDS code 0.0000/ 0.0000 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: USC Codeheap - Fragment 0.1406/ 0.0002 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: USC Codeheap - Vertex 0.0000/ 0.0000 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: PDS Codeheap - Fragment 0.0000/ 0.0000 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: USC Codeheap - Compute 0.0000/ 0.0000 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: PDS Codeheap - Compute 0.0000/ 0.0000 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: Texture Statistics [ Calls/perCall-Time|Texels / perFrame-Time/Texels ] 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: TexImage 0/ 0.0000/ 0/ 0.0000/ 0.00 01-06 23:24:02.763 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: TexSubImage 0/ 0.0000/ 0/ 0.0000/ 0.00 01-06 23:24:02.764 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.764 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: Texture Statistics [ Calls/Time per Call/Time per Frame (ms)/Max Time] 01-06 23:24:02.764 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: CopyImage 0/ 0.0000/ 0.0000/ 0.0000 01-06 23:24:02.764 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: CopySubImage 0/ 0.0000/ 0.0000/ 0.0000 01-06 23:24:02.764 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: AllocateTexture 0/ 0.0000/ 0.0000/ 0.0000 01-06 23:24:02.764 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: TranslateLoadTexture 0/ 0.0000/ 0.0000/ 0.0000 01-06 23:24:02.764 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Load Ghost Texture 0/ 0.0000/ 0.0000/ 0.0000 01-06 23:24:02.764 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Texture Readback 0/ 0.0000/ 0.0000/ 0.0000 01-06 23:24:02.764 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.764 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: Shader Statistics [ Calls/Avg time per Call/Max time per call/Time per Profiled Frame (ms)] 01-06 23:24:02.764 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: CompileShader 2/ 17.9727/ 27.3397/ 0.0457 01-06 23:24:02.770 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: LinkProgram 1/ 0.0510/ 0.0510/ 0.0001 01-06 23:24:02.770 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: ShaderSource 2/ 0.0075/ 0.0110/ 0.0000 01-06 23:24:02.770 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: 01-06 23:24:02.771 5121-5143/com.example.lijiegu.myfirstopengl E/IMGSRV: PVR: Texture allocation HWM = 1048592 bytes
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
本人電腦為聯(lián)想臺式機。配置:CPU為雙核雙線程的E5400 頻率2.7Hz ,沒有獨顯,只有核顯,型號為G31/G33。原來系統(tǒng)為xp系統(tǒng),使用的是OpenGL1.0.然而重裝了win 7系統(tǒng)后,OpenGL就無法正常使用了。在網(wǎng)上查說要驅(qū)動,但是核顯又不支持驅(qū)動?,F(xiàn)在想要再次弄出OpenGL,應(yīng)該如何操作。且只要打開需要OpenGL的軟件,就會有OpenGL的出錯報告,現(xiàn)應(yīng)如何安裝OpenGL或如何修復(fù)。
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
同樣兩個數(shù)組,只不過一個是在程序語句中賦值的,一個是從文件導(dǎo)入數(shù)值的。已經(jīng)用測試類確定了他們是相同的:
但是一個渲染的結(jié)果是這樣的(正常版本) :
導(dǎo)入的數(shù)組渲染出來的是這樣的(失敗版):
WTF?會是哪出了問題?
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
如何在Qt下使用獨立的OpenGL庫在Qt控件上進行繪圖?求指導(dǎo)
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 請問Adroid的GLsurfaceView能在xml中配置嗎,還有GLsurfaceView在幫助文檔上說它是繼承View的,那怎么不能通過設(shè)置它的寬高屬性來改變它在手機屏幕上的尺寸呢,我試過,不論怎么設(shè)置它的屬性它依然還是占滿全屏,求大神指點
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
類似與網(wǎng)吧計費軟件,賬戶余額不足的時候在屏幕中央寫字
用戶玩lol等全屏游戲的時候不能夠影響用戶
如上效果圖。我用c#做的,全屏游戲顯示不出來。求大神賜教
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
代碼如下: #define __STDC_WANT_LIB_EXT1__ 1 #include #include // GLEW #include #include // GLFW #include #pragma comment(lib, "glew32.lib") // Other Libs #include // GLM Mathematics #include #include #include // Other includes #include #include // Function prototypes void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode); void mouse_callback(GLFWwindow* window, double xpos, double ypos); void scroll_callback(GLFWwindow* window, double xoffset, double yoffset); void do_movement(); // Window dimensions const GLuint WIDTH = 800, HEIGHT = 600; // Camera Camera camera(glm::vec3(0.0f, 0.0f, 3.0f)); GLfloat lastX = WIDTH / 2.0; GLfloat lastY = HEIGHT / 2.0; bool keys[1024]; // Light attributes glm::vec3 lightPos(1.2f, 1.0f, 2.0f); // Deltatime GLfloat deltaTime = 0.0f; // Time between current frame and last frame GLfloat lastFrame = 0.0f; // Time of last frame // The MAIN function, from here we start the application and run the game loop int main() { // Init GLFW glfwInit(); // Set all the required options for GLFW glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3); glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3); glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE); glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); // Create a GLFWwindow object that we can use for GLFW's functions GLFWwindow* window = glfwCreateWindow(WIDTH, HEIGHT, "LearnOpenGL", nullptr, nullptr); glfwMakeContextCurrent(window); // Set the required callback functions glfwSetKeyCallback(window, key_callback); glfwSetCursorPosCallback(window, mouse_callback); glfwSetScrollCallback(window, scroll_callback); // GLFW Options glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED); // Set this to true so GLEW knows to use a modern approach to retrieving function pointers and extensions glewExperimental = GL_TRUE; // Initialize GLEW to setup the OpenGL Function pointers glewInit(); // Define the viewport dimensions glViewport(0, 0, WIDTH, HEIGHT); // OpenGL options glEnable(GL_DEPTH_TEST); // Build and compile our shader program Shader lightingShader("basic_lighting.vs", "basic_lighting.frag"); Shader lampShader("lamp.vs", "lamp.frag"); // Set up vertex data (and buffer(s)) and attribute pointers GLfloat vertices[] = { -0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 0.5f, 0.5f, -0.5f, 0.0f, 0.0f, -1.0f, 0.5f, 0.5f, -0.5f, 0.0f, 0.0f, -1.0f, -0.5f, 0.5f, -0.5f, 0.0f, 0.0f, -1.0f, -0.5f, -0.5f, -0.5f, 0.0f, 0.0f, -1.0f, -0.5f, -0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 0.5f, -0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, 1.0f, 0.5f, 0.5f, 0.5f, 0.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.5f, 0.0f, 0.0f, 1.0f, -0.5f, -0.5f, 0.5f, 0.0f, 0.0f, 1.0f, -0.5f, 0.5f, 0.5f, -1.0f, 0.0f, 0.0f, -0.5f, 0.5f, -0.5f, -1.0f, 0.0f, 0.0f, -0.5f, -0.5f, -0.5f, -1.0f, 0.0f, 0.0f, -0.5f, -0.5f, -0.5f, -1.0f, 0.0f, 0.0f, -0.5f, -0.5f, 0.5f, -1.0f, 0.0f, 0.0f, -0.5f, 0.5f, 0.5f, -1.0f, 0.0f, 0.0f, 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 0.0f, 0.5f, 0.5f, -0.5f, 1.0f, 0.0f, 0.0f, 0.5f, -0.5f, -0.5f, 1.0f, 0.0f, 0.0f, 0.5f, -0.5f, -0.5f, 1.0f, 0.0f, 0.0f, 0.5f, -0.5f, 0.5f, 1.0f, 0.0f, 0.0f, 0.5f, 0.5f, 0.5f, 1.0f, 0.0f, 0.0f, -0.5f, -0.5f, -0.5f, 0.0f, -1.0f, 0.0f, 0.5f, -0.5f, -0.5f, 0.0f, -1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, -1.0f, 0.0f, 0.5f, -0.5f, 0.5f, 0.0f, -1.0f, 0.0f, -0.5f, -0.5f, 0.5f, 0.0f, -1.0f, 0.0f, -0.5f, -0.5f, -0.5f, 0.0f, -1.0f, 0.0f, -0.5f, 0.5f, -0.5f, 0.0f, 1.0f, 0.0f, 0.5f, 0.5f, -0.5f, 0.0f, 1.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 1.0f, 0.0f, 0.5f, 0.5f, 0.5f, 0.0f, 1.0f, 0.0f, -0.5f, 0.5f, 0.5f, 0.0f, 1.0f, 0.0f, -0.5f, 0.5f, -0.5f, 0.0f, 1.0f, 0.0f }; // First, set the container's VAO (and VBO) GLuint VBO, containerVAO; glGenVertexArrays(1, &containerVAO); glGenBuffers(1, &VBO); glBindBuffer(GL_ARRAY_BUFFER, VBO); glBufferData(GL_ARRAY_BUFFER, sizeof(vertices), vertices, GL_STATIC_DRAW); glBindVertexArray(containerVAO); // Position attribute glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (GLvoid*)0); glEnableVertexAttribArray(0); // Normal attribute glVertexAttribPointer(1, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (GLvoid*)(3 * sizeof(GLfloat))); glEnableVertexAttribArray(1); glBindVertexArray(0); // Then, we set the light's VAO (VBO stays the same. After all, the vertices are the same for the light object (also a 3D cube)) GLuint lightVAO; glGenVertexArrays(1, &lightVAO); glBindVertexArray(lightVAO); // We only need to bind to the VBO (to link it with glVertexAttribPointer), no need to fill it; the VBO's data already contains all we need. glBindBuffer(GL_ARRAY_BUFFER, VBO); // Set the vertex attributes (only position data for the lamp)) glVertexAttribPointer(0, 3, GL_FLOAT, GL_FALSE, 6 * sizeof(GLfloat), (GLvoid*)0); // Note that we skip over the normal vectors glEnableVertexAttribArray(0); glBindVertexArray(0); // Game loop while (!glfwWindowShouldClose(window)) { // Calculate deltatime of current frame GLfloat currentFrame = glfwGetTime(); deltaTime = currentFrame - lastFrame; lastFrame = currentFrame; // Check if any events have been activiated (key pressed, mouse moved etc.) and call corresponding response functions glfwPollEvents(); do_movement(); // Clear the colorbuffer glClearColor(0.1f, 0.1f, 0.1f, 1.0f); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); // Use cooresponding shader when setting uniforms/drawing objects lightingShader.Use(); GLint objectColorLoc = glGetUniformLocation(lightingShader.Program, "objectColor"); GLint lightColorLoc = glGetUniformLocation(lightingShader.Program, "lightColor"); GLint lightPosLoc = glGetUniformLocation(lightingShader.Program, "lightPos"); GLint viewPosLoc = glGetUniformLocation(lightingShader.Program, "viewPos"); glUniform3f(objectColorLoc, 1.0f, 0.5f, 0.31f); glUniform3f(lightColorLoc, 1.0f, 1.0f, 1.0f); glUniform3f(lightPosLoc, lightPos.x, lightPos.y, lightPos.z); glUniform3f(viewPosLoc, camera.Position.x, camera.Position.y, camera.Position.z); // Create camera transformations glm::mat4 view; view = camera.GetViewMatrix(); glm::mat4 projection = glm::perspective(camera.Zoom, (GLfloat)WIDTH / (GLfloat)HEIGHT, 0.1f, 100.0f); // Get the uniform locations GLint modelLoc = glGetUniformLocation(lightingShader.Program, "model"); GLint viewLoc = glGetUniformLocation(lightingShader.Program, "view"); GLint projLoc = glGetUniformLocation(lightingShader.Program, "projection"); // Pass the matrices to the shader glUniformMatrix4fv(viewLoc, 1, GL_FALSE, glm::value_ptr(view)); glUniformMatrix4fv(projLoc, 1, GL_FALSE, glm::value_ptr(projection)); // Draw the container (using container's vertex attributes) glBindVertexArray(containerVAO); glm::mat4 model; glUniformMatrix4fv(modelLoc, 1, GL_FALSE, glm::value_ptr(model)); glDrawArrays(GL_TRIANGLES, 0, 36); glBindVertexArray(0); // Also draw the lamp object, again binding the appropriate shader lampShader.Use(); // Get location objects for the matrices on the lamp shader (these could be different on a different shader) modelLoc = glGetUniformLocation(lampShader.Program, "model"); viewLoc = glGetUniformLocation(lampShader.Program, "view"); projLoc = glGetUniformLocation(lampShader.Program, "projection"); // Set matrices glUniformMatrix4fv(viewLoc, 1, GL_FALSE, glm::value_ptr(view)); glUniformMatrix4fv(projLoc, 1, GL_FALSE, glm::value_ptr(projection)); model = glm::mat4(); model = glm::translate(model, lightPos); model = glm::scale(model, glm::vec3(0.2f)); // Make it a smaller cube glUniformMatrix4fv(modelLoc, 1, GL_FALSE, glm::value_ptr(model)); // Draw the light object (using light's vertex attributes) glBindVertexArray(lightVAO); glDrawArrays(GL_TRIANGLES, 0, 36); glBindVertexArray(0); // Swap the screen buffers glfwSwapBuffers(window); } // Terminate GLFW, clearing any resources allocated by GLFW. glfwTerminate(); return 0; } // Is called whenever a key is pressed/released via GLFW void key_callback(GLFWwindow* window, int key, int scancode, int action, int mode) { if (key == GLFW_KEY_ESCAPE && action == GLFW_PRESS) glfwSetWindowShouldClose(window, GL_TRUE); if (key >= 0 && key < 1024) { if (action == GLFW_PRESS) keys[key] = true; else if (action == GLFW_RELEASE) keys[key] = false; } } void do_movement() { // Camera controls if (keys[GLFW_KEY_W]) camera.ProcessKeyboard(FORWARD, deltaTime); if (keys[GLFW_KEY_S]) camera.ProcessKeyboard(BACKWARD, deltaTime); if (keys[GLFW_KEY_A]) camera.ProcessKeyboard(LEFT, deltaTime); if (keys[GLFW_KEY_D]) camera.ProcessKeyboard(RIGHT, deltaTime); } bool firstMouse = true; void mouse_callback(GLFWwindow* window, double xpos, double ypos) { if (firstMouse) { lastX = xpos; lastY = ypos; firstMouse = false; } GLfloat xoffset = xpos - lastX; GLfloat yoffset = lastY - ypos; // Reversed since y-coordinates go from bottom to left lastX = xpos; lastY = ypos; camera.ProcessMouseMovement(xoffset, yoffset); } void scroll_callback(GLFWwindow* window, double xoffset, double yoffset) { camera.ProcessMouseScroll(yoffset); }
錯誤信息:
Error 20 error LNK2019: unresolved external symbol __imp___CrtDbgReportW referenced in function "public: char const & __thiscall std::_String_const_iterator > >::operator*(void)const " (??D?$_String_const_iterator@V?$_String_val@U?$_Simple_types@D@std@@@std@@@std@@QBEABDXZ) C:
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
已知世界坐標系上同一平面四點的三維坐標和這四點在圖像上的橫縱坐標,能否標定攝像機相對這一平面 的坐標和角度?如何計算?
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 剛接觸OpenGL,不是太清楚QT上的OpenGL跟原生的OpenGL之間的關(guān)系,想問下是不是QT里面的OpenGL能夠?qū)崿F(xiàn)所有的OpenGL里面的所有功能。我現(xiàn)在需要獲取3D模型的投影圖像庫,希望哪位大神給解答下,我到現(xiàn)在都不是太清楚用什么方法?剛剛在網(wǎng)上看到OpenGL能夠?qū)崿F(xiàn),不知道只用QT里面的OpenGL能不能實現(xiàn),如果能夠給我提供這方面的文檔,萬分感謝
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 我文件-》新建-》工程-》multMedia-》OpenGL,直接編譯老出錯 $(CPP) $(LINKOBJ) -o $(BIN) $(LIBS)這地方老報錯,一些配置的文件也下了啊,不知道為什么, 誰能幫我解釋下嗎
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 請告訴一個除了glDrawPixels之外可以顯示圖像的openGL 函數(shù)或者方法. 我的圖像數(shù)據(jù)是在內(nèi)存中的.glDrawPixels可以畫出, 但是顏色有點點不對. 而且據(jù)說比較慢, 我想用其它的.圖像就是普通的RGB圖像.
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
剛學(xué)OpenGL,當(dāng)使用多重采樣和顏色索引的時候,就會出現(xiàn)這種情況,我也到網(wǎng)上查了下,無果?。√貋碚埥谈魑淮笊癜?
這里附上代碼和問題的描述,勞駕各位呢?。?! #include #include #include #include static int bgtoggle=1; void Init() { GLint buf,sbuf; int i,j; glClearColor(0.0,0.0,0.0,0.0); glGetIntegerv(GL_SAMPLE_BUFFERS,&buf); printf("number of sample buffers is %d \n",buf); glGetIntegerv(GL_SAMPLES,&sbuf); printf("number of samples is %d \n",sbuf); glNewList(1,GL_COMPILE); for(i=0;i<19;i++){ glPushMatrix(); glRotatef(360.0*(float)i/19.0,0.0,0.0,1.0); glColor3f(1.0,1.0,1.0); glLineWidth((i/3)+1.0); glBegin(GL_LINES); glVertex2f(0.25,0.25); glVertex2f(0.9,0.2); glEnd(); glColor3f(0.0,1.0,1.0); glBegin(GL_TRIANGLES); glVertex2f(0.25,0.0); glVertex2f(0.9,0.0); glVertex2f(0.875,0.10); glEnd(); glPopMatrix(); } glEndList(); glNewList(2,GL_COMPILE); glColor3f(1.0,0.5,0.0); glBegin(GL_QUADS); for(i=0;i<16;i++) for(j=0;j<16;j++) if((i+i)%2==0){ glVertex2f(-2.0+(i*0.25),-2.0+(j*0.25)); glVertex2f(-2.0+(i*0.25),-1.75+(j*0.25)); glVertex2f(-1.75+(i*0.25),-1.75+(j*0.25)); glVertex2f(-1.75+(i*0.25),-2.0+(j*0.25)); } glEnd(); glEndList(); } void display() { glClear(GL_COLOR_BUFFER_BIT); if(bgtoggle) glCallList(2); glEnable(GL_MULTISAMPLE); glPushMatrix(); glTranslatef(-1.0,0.0,0.0); glCallList(1); glPopMatrix(); glDisable(GL_MULTISAMPLE); glPushMatrix(); glTranslatef(1.0,0.0,0.0); glCallList(1); glPopMatrix(); glutSwapBuffers(); } void keyboard(unsigned char key,int x,int y) { switch(key){ case 'b': bgtoggle=!bgtoggle; glutPostRedisplay(); break; case 27: exit(0); break; default: break; } } void reshape(int w,int h) { glViewport(0,0,(GLsizei)w,(GLsizei)h); glMatrixMode(GL_PROJECTION); glLoadIdentity(); glOrtho(0.0,(GLdouble)w,0.0,(GLdouble)h,-1.0,1.0); glMatrixMode(GL_MODELVIEW); glLoadIdentity(); } int main(int argc,char **argv) { glutInit(&argc,argv); glutInitDisplayMode(GLUT_RGBA | GLUT_DOUBLE | GL_MULTISAMPLE); glutInitWindowPosition(100,100); glutInitWindowSize(600,600); glutCreateWindow("自己動手,豐衣足食"); Init(); glutDisplayFunc(display); glutReshapeFunc(reshape); glutKeyboardFunc(keyboard); glutMainLoop(); return 0; //這些都是紅寶書上的代碼,本人彩筆,還望各位表笑話咱!?。?}
剛學(xué)OpenGL,當(dāng)使用多重采樣和顏色索引的時候,就會出現(xiàn)這種情況,我也到網(wǎng)上查了下,無果?。√貋碚埥谈魑淮笊癜?
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>> 官方網(wǎng)上找不到!有沒有老兄直接給個鏈接啊?
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
現(xiàn)在需要從視頻流中取出圖像,然后用openGL來顯示出來,取出部分已經(jīng)完成,現(xiàn)在我是直接用
glDrawPixels
來顯示的,這個函數(shù)似乎性能不好.
現(xiàn)在考慮使用紋理,我將以下代碼,放在GUI OnPaint消息處理函數(shù)下,似乎不能顯示出圖像來.請教問題出在哪里?
glEnable(GL_TEXTURE_2D); glTexImage2D(GL_TEXTURE_2D,0,3,image_width,image_height,0,GL_RGB,GL_UNSIGNED_BYTE,image_data); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); glBindTexture(GL_TEXTURE_2D, m_texID); SwapBuffers(hdc); glDisable(GL_TEXTURE_2D);
像素格式是對的,使用 glDrawPixels(..., GL_RGB,GL_UNSIGNED_BYTE,image_data)是可以輸出圖像的.
另外,m_texID已經(jīng)通過glGenTextures初始化過了.
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
最近在做一個關(guān)于在C++中實現(xiàn)對3Dmax中的人物進行導(dǎo)入和控制的程序,可是,做了好幾天,都沒有頭緒啊,不知道該怎么做,所以,請大家?guī)蛶兔Π~
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
首先先看示例程序的執(zhí)行結(jié)果如下圖所示:
Introduction:
Lets quote wikipedia first:
Quote: OpenGL
ES (OpenGL for Embedded Systems) is a subset of the OpenGL 3D graphics
API designed for embedded devices such as mobile phones, PDAs, and
video game consoles. It is defined and promoted by the Khronos Group, a
graphics hardware and software industry consortium interested in open
APIs for graphics and multimedia.
Description:
What we will do is, create a custom view and using OpenGL ES in it to draw a colored cube.
The Main steps are: 1. Setup the view and create a cube
(1.1. Start/Stop the animation if we are (not) viewing it)
2. Do some trigonometry (rotation)
3. Make the Cube paint itself
Most interesting:
What the heck do those values in the Cube-Constructor mean...
Java: int one = 0x10000;
/* Every vertex got 3 values, for
* x / y / z position in the kartesian space.
*/
int vertices[] = {
-one, -one, -one, // Vertex Zero
one, -one, -one, // Vertex Two
one, one, -one, // Vertex ...
-one, one, -one,
-one, -one, one,
one, -one, one,
one, one, one,
-one, one, one, // Vertex Seven
};
That is pretty easy, each row stands for a single vertex, consisting of
three values (x,y,z) which simply result in a point in the cartesian
space.
So if you think of each codeline as one vertex you get something like this:
(Note: We only created the vertices, not the edges. I just added them, that the cube-structure becomes better visible.)
(Note2: You will see that the blue coordinate-system is located right in the middle of the cube)
Java: /* Every vertex has got its own color, described by 4 values
* R(ed)
* G(green)
* B(blue)
* A(lpha)
int colors[] = {
0, 0, 0, one,
one, 0, 0, one,
one, one, 0, one,
0, one, 0, one,
0, 0, one, one,
one, 0, one, one,
one, one, one, one,
0, one, one, one,
};
In this code-block the color of all the 8 vertices are described, as '4' each: R(ed) G(reen) B(lue) A(lpha). (Alpha means Opticacy)
OpenGL SE will create the color-flows automatically!
Java: /* The last thing is that we need to describe some Triangles.
* A triangle got 3 vertices.
* The confusing thing is, that it is important in which order
* the vertices of each triangle are described.
* So describing a triangle through the vertices: "0, 4, 5"
* will not result in the same triangle as: "0, 5, 4"
* You probably ask: Why the hell isn't that the same ???
* The reason for that is the call of: "gl.glFrontFace(gl.GL_CW);"
* which means, that we have to describe the "visible" side of the
* triangles by naming its vertices in a ClockWise order!
* From the other side, the triangle will be 100% lookthru!
* You can create a kind of magic mirror with that
.
*/
byte indices[] = {
0, 4, 5,
0, 5, 1,
1, 5, 6,
1, 6, 2,
2, 6, 7,
2, 7, 3,
3, 7, 4,
3, 4, 0,
4, 7, 6,
4, 6, 5,
3, 0, 1,
3, 1, 2
};
This is the tricky part. I think that I described it good enough in them comment.
Lets take a look at two example triangles:
The Code
Original Source:
code.google.com
Modified by: Nicolas 'plusminus' Gramlich
Java: /*
* Copyright (C) 2007 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.samples.graphics;
import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.OpenGLContext;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.os.SystemClock;
import android.view.View;
import java.nio.ByteBuffer;
import java.nio.ByteOrder;
import java.nio.IntBuffer;
import javax.microedition.khronos.opengles.GL10;
/**
* Example of how to use OpenGL|ES in a custom view
*
*/
public class GLView1 extends Activity {
@Override
protected void onCreate(Bundle icicle)
{
super.onCreate(icicle);
setContentView(new GLView( getApplication() ));
}
@Override
protected void onResume()
{
super.onResume();
//android.os.Debug.startMethodTracing("/tmp/trace/GLView1.dmtrace",
// 8 * 1024 * 1024);
}
@Override
protected void onStop()
{
super.onStop();
//android.os.Debug.stopMethodTracing();
}
}
class GLView extends View
{
/**
* The View constructor is a good place to allocate our OpenGL context
*/
public GLView(Context context)
{
super(context);
/*
* Create an OpenGL|ES context. This must be done only once, an
* OpenGL contex is a somewhat heavy object.
*/
mGLContext = new OpenGLContext(0);
mCube = new Cube();
mAnimate = false;
}
/*
* Start the animation only once we're attached to a window
* @see android.view.View#onAttachedToWindow()
*/
@Override
protected void onAttachedToWindow() {
mAnimate = true;
Message msg = mHandler.obtainMessage(INVALIDATE);
mNextTime = SystemClock.uptimeMillis();
mHandler.sendMessageAtTime(msg, mNextTime);
super.onAttachedToWindow();
}
/*
* Make sure to stop the animation when we're no longer on screen,
* failing to do so will cause most of the view hierarchy to be
* leaked until the current process dies.
* @see android.view.View#onDetachedFromWindow()
*/
@Override
protected void onDetachedFromWindow() {
mAnimate = false;
super.onDetachedFromWindow();
}
/**
* Draw the view content
*
* @see android.view.View#onDraw(android.graphics.Canvas)
*/
@Override
protected void onDraw(Canvas canvas) {
if (true) {
/*
* First, we need to get to the appropriate GL interface.
* This is simply done by casting the GL context to either
* GL10 or GL11.
*/
GL10 gl = (GL10)(mGLContext.getGL());
/*
* Before we can issue GL commands, we need to make sure all
* native drawing commands are completed. Simply call
* waitNative() to accomplish this. Once this is done, no native
* calls should be issued.
*/
mGLContext.waitNative(canvas, this);
int w = getWidth();
int h = getHeight();
/*
* Set the viewport. This doesn't have to be done each time
* draw() is called. Typically this is called when the view
* is resized.
*/
gl.glViewport(0, 0, w, h);
/*
* Set our projection matrix. This doesn't have to be done
* each time we draw, but usualy a new projection needs to be set
* when the viewport is resized.
*/
float ratio = (float)w / h;
gl.glMatrixMode(gl.GL_PROJECTION);
gl.glLoadIdentity();
gl.glFrustumf(-ratio, ratio, -1, 1, 2, 12);
/*
* dithering is enabled by default in OpenGL, unfortunattely
* it has a significant impact on performace in software
* implementation. Often, it's better to just turn it off.
*/
gl.glDisable(gl.GL_DITHER);
/*
* Usually, the first thing one might want to do is to clear
* the screen. The most efficient way of doing this is to use
* glClear(). However we must make sure to set the scissor
* correctly first. The scissor is always specified in window
* coordinates:
*/
gl.glClearColor(1,1,1,1);
gl.glEnable(gl.GL_SCISSOR_TEST);
gl.glScissor(0, 0, w, h);
gl.glClear(gl.GL_COLOR_BUFFER_BIT);
/*
* Now we're ready to draw some 3D object
*/
gl.glMatrixMode(gl.GL_MODELVIEW);
gl.glLoadIdentity();
gl.glTranslatef(0, 0, -3.0f);
gl.glScalef(0.5f, 0.5f, 0.5f);
gl.glRotatef(mAngle, 0, 1, 0);
gl.glRotatef(mAngle*0.25f, 1, 0, 0);
gl.glColor4f(0.7f, 0.7f, 0.7f, 1.0f);
gl.glEnableClientState(gl.GL_VERTEX_ARRAY);
gl.glEnableClientState(gl.GL_COLOR_ARRAY);
gl.glEnable(gl.GL_CULL_FACE);
mCube.draw(gl);
mAngle += 1.2f;
/*
* Once we're done with GL, we need to flush all GL commands and
* make sure they complete before we can issue more native
* drawing commands. This is done by calling waitGL().
*/
mGLContext.waitGL();
}
}
// ------------------------------------------------------------------------
private static final int INVALIDATE = 1;
private final Handler mHandler = new Handler() {
@Override
public void handleMessage(Message msg) {
if (mAnimate && msg.what == INVALIDATE) {
invalidate();
msg = obtainMessage(INVALIDATE);
long current = SystemClock.uptimeMillis();
if (mNextTime ) {
mNextTime = current + 20;
}
sendMessageAtTime(msg, mNextTime);
mNextTime += 20;
}
}
};
private OpenGLContext mGLContext;
private Cube mCube;
private float mAngle;
private long mNextTime;
private boolean mAnimate;
}
class Cube
{
public Cube()
{
int one = 0x10000;
/* Every vertex got 3 values, for
* x / y / z position in the kartesian space.
*/
int vertices[] = {
-one, -one, -one,
one, -one, -one,
one, one, -one,
-one, one, -one,
-one, -one, one,
one, -one, one,
one, one, one,
-one, one, one,
};
/* Every vertex has got its own color, described by 4 values
* R(ed)
* G(green)
* B(blue)
* A(lpha)
int colors[] = {
0, 0, 0, one,
one, 0, 0, one,
one, one, 0, one,
0, one, 0, one,
0, 0, one, one,
one, 0, one, one,
one, one, one, one,
0, one, one, one,
};
/* The last thing is that we need to describe some Triangles.
* A triangle got 3 vertices.
* The confusing thing is, that it is important in which order
* the vertices of each triangle are described.
* So describing a triangle through the vertices: "0, 4, 5"
* will not result in the same triangle as: "0, 5, 4"
* You probably ask: Why the hell isn't that the same ???
* The reason for that is the call of: "gl.glFrontFace(gl.GL_CW);"
* which means, that we have to describe the "visible" side of the
* triangles by naming its vertices in a ClockWise order!
* From the other side, the triangle will be 100% lookthru!
* You can create a kind of magic mirror with that
.
*/
byte indices[] = {
0, 4, 5,
0, 5, 1,
1, 5, 6,
1, 6, 2,
2, 6, 7,
2, 7, 3,
3, 7, 4,
3, 4, 0,
4, 7, 6,
4, 6, 5,
3, 0, 1,
3, 1, 2
};
// Buffers to be passed to gl*Pointer() functions
// must be direct, i.e., they must be placed on the
// native heap where the garbage collector cannot
// move them.
//
// Buffers with multi-byte datatypes (e.g., short, int, float)
// must have their byte order set to native order
ByteBuffer vbb = ByteBuffer.allocateDirect(vertices.length*4);
vbb.order(ByteOrder.nativeOrder());
mVertexBuffer = vbb.asIntBuffer();
mVertexBuffer.put(vertices);
mVertexBuffer.position(0);
ByteBuffer cbb = ByteBuffer.allocateDirect(colors.length*4);
cbb.order(ByteOrder.nativeOrder());
mColorBuffer = cbb.asIntBuffer();
mColorBuffer.put(colors);
mColorBuffer.position(0);
mIndexBuffer = ByteBuffer.allocateDirect(indices.length);
mIndexBuffer.put(indices);
mIndexBuffer.position(0);
}
public void draw(GL10 gl)
{
gl.glFrontFace(gl.GL_CW);
gl.glVertexPointer(3, gl.GL_FIXED, 0, mVertexBuffer);
gl.glColorPointer(4, gl.GL_FIXED, 0, mColorBuffer);
gl.glDrawElements(gl.GL_TRIANGLES, 36, gl.GL_UNSIGNED_BYTE, mIndexBuffer);
}
private IntBuffer mVertexBuffer;
private IntBuffer mColorBuffer;
private ByteBuffer mIndexBuffer;
}
I hope you succeeded and understood this tutorial.
代碼下載: http://www.anddev.org/download.php?id=107
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
有人說OpenGL是一套標準,有不同的實現(xiàn),那么API不是各語言通用的嗎?
OPenCL我看了幾遍沒看懂是做什么的,OpenCV是圖型算法,OPenAL是音效API,那OpenCL又是什么呢?
HDC調(diào)試需求開發(fā)(15萬預(yù)算),能者速來!>>>
java selenium3.1 chromedriver2.25 chrome54 ChromeOptions options = new ChromeOptions(); options.addArguments("user-data-dir=E:\