Home » U++ Library support » U++ Library : Other (not classified elsewhere) » Updating GLEW to version 2.2.0 for 2020.2 Release (March 2020)
Re: Updating GLEW to version 2.2.0 for 2020.2 Release [message #54666 is a reply to message #54664] |
Sat, 29 August 2020 20:00 |
|
Xemuth
Messages: 387 Registered: August 2018 Location: France
|
Senior Member |
|
|
First I have changed the "uppsrc/plugin/glew" by the glew you provided, then I have launch the example : Reference->OpenGL
Compilation error: C:\Upp\upp\uppsrc\plugin\glew\glew.c (34): fatal error: 'GL/glew.h' file not found
Comparing the glew you provided with the one Upp had, it should be #include "glew.h"
Same for line 53 in glew.c it should be #include "wglew.h" instead of #include <GL/wglew.h>
Same for....
You will find the patch file bellow.
Also, GLCtrl have a strange behavior concerning context (A behavior I changed in my own GLCtrl) :
When ExecuteGL is call, in original version it do this :
void GLCtrl::GLPane::ExecuteGL(HDC hDC, Event<> paint, bool swap_buffers){
/**** CODE ****/
wglMakeCurrent(hDC, s_openGLContext); //Hooking the OpenGL Context
/***** Code / Swap buffer etc .... *****/
wglMakeCurrent(NULL, NULL); //Releasing the current OpenGL Context
}
This aquisition then releasing is problematique since it prevent you to execute some OpenGL code outside of GLPaint function.
It mean I can't do OpenGL when button is pressed or fenetre resized or even when my application is starting etc... To fix this issue, in my own Ctrl I just changed the fonction like this :
void GLCtrl::GLPane::ExecuteGL(HDC hDC, Event<> paint, bool swap_buffers)
{
ONCELOCK{
wglMakeCurrent(hDC, s_openGLContext); //Creating the context one time
}
/**** CODE .... ****/
//wglMakeCurrent(NULL, NULL); //no release
}
Since I encoutered no problem with my version and I don't see (maybe I'm wrong) any problem with it, I would be happy it become so official behavior of GLCtrl. So I could migrate my surfaceCtrl package to this GLCtrl.
With all this, my application and OpenGL Example (in reference) work perfectly.
|
|
|
|
|
Updating GLEW to version 2.2.0 for 2020.2 Release
By: Klugier on Sat, 29 August 2020 18:41
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: Xemuth on Sat, 29 August 2020 19:25
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: Xemuth on Sat, 29 August 2020 20:00
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: mirek on Sun, 30 August 2020 19:42
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: Klugier on Sun, 30 August 2020 22:04
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: mirek on Mon, 31 August 2020 00:01
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: Klugier on Mon, 31 August 2020 00:23
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: Xemuth on Mon, 31 August 2020 00:35
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: Xemuth on Sat, 29 August 2020 20:22
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: Klugier on Sat, 29 August 2020 21:06
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: Xemuth on Mon, 31 August 2020 01:58
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: Xemuth on Mon, 31 August 2020 02:28
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: Klugier on Mon, 31 August 2020 22:30
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: Xemuth on Tue, 01 September 2020 02:58
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: Novo on Wed, 02 September 2020 01:03
|
|
|
Re: Updating GLEW to version 2.2.0 for 2020.2 Release
By: Klugier on Wed, 02 September 2020 01:14
|
Goto Forum:
Current Time: Sun May 12 20:54:48 CEST 2024
Total time taken to generate the page: 0.02206 seconds
|