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 #14442 is a reply to message #14441] Tue, 26 February 2008 19:44 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
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.
 
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: Fri Apr 26 22:28:33 CEST 2024

Total time taken to generate the page: 0.01622 seconds