Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (impfunc GetModuleHandleA
- (conv stdcall)
- (ret intptr)
- (arg intptr)
- )
- (class WNDCLASS
- (var style u32) // UINT
- (var lpfnWndProc intptr) // WNDPROC
- (var cbClsExtra i32) // INT
- (var cbWndExtra i32) // INT
- (var hInstance intptr) // HINSTANCE
- (var hIcon intptr) // HICON
- (var hCursor intptr) // HCURSOR
- (var hbrBackground intptr) // HBRUSH
- (var lpszMenuName intptr) // LPCTSTR
- (var lpszClassName intptr) // LPCTSTR
- )
- (impfunc DefWindowProcA
- (conv stdcall)
- (ret intptr) // LRESULT
- (arg intptr) // HWND
- (arg u32) // UINT msg
- (arg intptr) // WPARAM
- (arg intptr) // LPARAM
- )
- (func WndProc
- (conv stdcall)
- (ret intptr) // LRESULT
- (arg intptr hwnd) // HWND
- (arg u32 uMsg) // UINT msg
- (arg intptr wParam) // WPARAM
- (arg intptr lParam) // LPARAM
- (body
- (return (call DefWindowProcA hwnd uMsg wParam lParam))
- )
- )
- (class OpenGLWindow
- (var hInstance intptr (call GetModuleHandleA null))
- (func __construct (body
- (var wc (call WNDCLASS))
- (set (getprop wc style) 0x23) /* CS_HREDRAW | CS_VREDRAW | CS_OWNDC */
- (set (getprop wc lpfnWndProc) WndProc)
- (set (getprop wc hInstance) hInstance)
- /*
- wc.hIcon = LoadIcon(NULL, IDI_WINLOGO); // Load The Default Icon
- wc.hCursor = LoadCursor(NULL, IDC_ARROW); // Load The Arrow Pointer
- */
- (set (getprop wc lpszClassName) (getprop "OpenGL Test" cStringPtr))
- ))
- )
- (func main
- (ret void)
- (body
- (var window (call OpenGLWindow))
- )
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement