![]() Return DefWindowProc(hWnd,msg,wParam,lParam) LRESULT CALLBACK WindowFunc(HWND hWnd,UINT msg, WPARAM wParam, LPARAM lParam) Int PixelFormat = ChoosePixelFormat(pdcDIB, &pfd) īOOL bResult = SetPixelFormat(pdcDIB, PixelFormat, &pfd) Pfd.nSize = sizeof(PIXELFORMATDESCRIPTOR) Memset(&pfd,0, sizeof(PIXELFORMATDESCRIPTOR)) Verify(BitBlt(pdcDest, 0, 0, w, h, pdcDIB, 0, 0, SRCCOPY)) ĭWORD dwFlags = PFD_SUPPORT_OPENGL | PFD_DRAW_TO_BITMAP GlColor3f(0.0f,0.0f,1.0f) // Set The Color To Blue GlColor3f(0.0f,1.0f,0.0f) // Set The Color To Green GlBegin(GL_TRIANGLES) // Drawing Using Triangles GlClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ) GlBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA) Sky with translucent background windows 8.1#The code has been tested on Windows XP (32-bits) and Windows 8.1 (32-bits).Ĭonst TCHAR szAppName=_T("TransparentGL") Ĭonst TCHAR wcWndName=_T("WS_EX_LAYERED OpenGL") The end result can be seen in the image below: The code itself is a slight modification of an application presented here (big thanks to Andrei Sapronov Y.). ![]() To close this thread permanently, the source code below implements that technique. ![]() One of the most interesting ones is AeroGL, and it shows snippets of code using a technique that was not mentioned so far, which is rendering the graphics to a device-independent bitmap (DIB). During my research I found different ways to achieve what I was looking for. The few individuals that have accomplished this task don't share much. After spending some reputation on a unsuccessful bounty to get some help on this issue, I finally realized how complex was the problem I was interested in. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |