Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
Xemuth is currently offline  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.

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: SSH Exec output truncated
Next Topic: Changing default standard from c++14 to c++17 (2020.2 Release)
Goto Forum:
  


Current Time: Sun May 12 20:54:48 CEST 2024

Total time taken to generate the page: 0.02206 seconds