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++ Widgets - General questions or Mixed problems » openGL and texture
Re: openGL and texture [message #14443 is a reply to message #14442] Tue, 26 February 2008 20:06 Go to previous messageGo to previous message
forlano is currently offline  forlano
Messages: 1185
Registered: March 2006
Location: Italy
Senior Contributor
mrjt wrote on Tue, 26 February 2008 19:44

In that case the problem is that in the Win32 version GLInit doesn't get called by GLCtrl for some reason.

You need to add the following function to the GLExample class:
virtual void State(int reason) 
{
   GLCtrl::State(reason);
   if (reason == Ctrl::OPEN) {
      wglMakeCurrent(GLCtrl::GetDC(), GLCtrl::GetHGLRC());
      GLInit();
      wglMakeCurrent(NULL, NULL);
   }
}

You can remove the wglMake current calls from GLInit. Also double check that the file is being loaded. If GLTexture example is successful then texture should be non-zero.


It works! Very Happy
Thanks a lot!
Now I can procede to the next tutorial hoping do not disturb again... Smile

Luigi

PS:
GLInit(); should be InitGL(); in the code I posted above
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: OpenGL and continous animation
Next Topic: Get, modify and set text of RichEdit(WithToolBar)
Goto Forum:
  


Current Time: Thu Apr 25 22:01:14 CEST 2024

Total time taken to generate the page: 0.02446 seconds