Re: Glad and WGL

2016-01-15 Thread Josh Phillips via Digitalmars-d-learn
On Friday, 15 January 2016 at 07:37:27 UTC, Josh Phillips wrote: However I (of course) ran into new errors. Gl functions like glGetString and glGetIntegerv cause the program to crash. It appears that an opengl context is being created so I'm not sure whats causing the problem For anyone else

Re: Glad and WGL

2016-01-14 Thread Dav1d via Digitalmars-d-learn
On Thursday, 14 January 2016 at 02:35:28 UTC, Josh Phillips wrote: On Wednesday, 13 January 2016 at 20:08:55 UTC, Dav1d wrote: Link with opengl32.lib How? Everywhere I looked it says this cannot be done due to conflicting formats between the dmd compiler and the windows one. Welcome to D

Re: Glad and WGL

2016-01-14 Thread Dav1d via Digitalmars-d-learn
On Thursday, 14 January 2016 at 09:25:50 UTC, Dav1d wrote: On Thursday, 14 January 2016 at 02:35:28 UTC, Josh Phillips wrote: On Wednesday, 13 January 2016 at 20:08:55 UTC, Dav1d wrote: Link with opengl32.lib How? Everywhere I looked it says this cannot be done due to conflicting formats

Re: Glad and WGL

2016-01-14 Thread Josh Phillips via Digitalmars-d-learn
On Thursday, 14 January 2016 at 09:42:50 UTC, Dav1d wrote: On Thursday, 14 January 2016 at 09:25:50 UTC, Dav1d wrote: On Thursday, 14 January 2016 at 02:35:28 UTC, Josh Phillips wrote: Welcome to D and Windows. You can use GDC or LDC or try

Glad and WGL

2016-01-13 Thread Josh Phillips via Digitalmars-d-learn
So I started using Glad but I can't get WGL to work with it, though I think this is more of a Win32 issue than WGL. wndclass.lpfnWndProc = Gives me an error no matter what: Error: cannot implicitly convert expression (& WndProc) of type int function(void* hWnd, uint message, uint wParam,

Re: Glad and WGL

2016-01-13 Thread Adam D. Ruppe via Digitalmars-d-learn
On Wednesday, 13 January 2016 at 18:34:14 UTC, Josh Phillips wrote: extern(Windows) LRESULT WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) You just need to explicitly mark it nothrow in the signature. Add `nothrow` to the end of the param list: extern(Windows) LRESULT

Re: Glad and WGL

2016-01-13 Thread Dav1d via Digitalmars-d-learn
On Wednesday, 13 January 2016 at 18:34:14 UTC, Josh Phillips wrote: So I started using Glad but I can't get WGL to work with it, though I think this is more of a Win32 issue than WGL. wndclass.lpfnWndProc = Gives me an error no matter what: Error: cannot implicitly convert expression (&

Re: Glad and WGL

2016-01-13 Thread Josh Phillips via Digitalmars-d-learn
On Wednesday, 13 January 2016 at 18:37:09 UTC, Adam D. Ruppe wrote: You just need to explicitly mark it nothrow in the signature. Add `nothrow` to the end of the param list: extern(Windows) LRESULT WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) nothrow and then you'll be

Re: Glad and WGL

2016-01-13 Thread Dav1d via Digitalmars-d-learn
On Wednesday, 13 January 2016 at 19:05:30 UTC, Josh Phillips wrote: On Wednesday, 13 January 2016 at 18:37:09 UTC, Adam D. Ruppe wrote: [...] Oh wow that's easy. They should really make that more clear in the dlang reference. They way it sounds there made me think that if a function doesn't

Re: Glad and WGL

2016-01-13 Thread userABCabc123 via Digitalmars-d-learn
On Wednesday, 13 January 2016 at 19:05:30 UTC, Josh Phillips wrote: Oh wow that's easy. They should really make that more clear in the dlang reference. They way it sounds there made me think that if a function doesn't throw any errors it automatically is 'nothrow' No, because actually you

Re: Glad and WGL

2016-01-13 Thread Josh Phillips via Digitalmars-d-learn
On Thursday, 14 January 2016 at 02:16:40 UTC, userABCabc123 wrote: On Wednesday, 13 January 2016 at 19:05:30 UTC, Josh Phillips wrote: Oh wow that's easy. They should really make that more clear in the dlang reference. They way it sounds there made me think that if a function doesn't throw any

Re: Glad and WGL

2016-01-13 Thread Josh Phillips via Digitalmars-d-learn
On Wednesday, 13 January 2016 at 20:08:55 UTC, Dav1d wrote: Link with opengl32.lib How? Everywhere I looked it says this cannot be done due to conflicting formats between the dmd compiler and the windows one.