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 » Community » Newbie corner » OpenGL example
Re: OpenGL example [message #27357 is a reply to message #27355] Wed, 14 July 2010 12:17 Go to previous messageGo to previous message
mrjt is currently offline  mrjt
Messages: 705
Registered: March 2007
Location: London
Contributor
1. GLCtrl is undocumented, it's not really a core component of Upp. But it doesn't do anything too complicated, just creates a GL context bound to a native window (normally Upp ctrls aren't attached to native windows)
2. GLCtrl::StdView() contains the viewport definition code. In the example this is called in GLPaint, though you would normally override GLResize() and call it there.
3. Remove the line Ctrl::GlobalBackPaint() from the Main function in main.cpp. I don't know why that line is there, it's clearly incorrect.
4. The version of OpenGL you use is just which extensions you use. The version of you GL libs is defined somewhere in gl.h. I'd recommend using Glew if you want to use extensions, it makes it much easier.

The GLCtrl is really just a starting point, if you want to do anything serious you will need to modify it considerably. One thing that you will probably need is a public method to activate the drawing context since in a GUI app things like opening a Prompt window can change the context. You will also want your own viewport/perspective code and a whole lot of other stuff.

[Updated on: Wed, 14 July 2010 12:18]

Report message to a moderator

 
Read Message
Read Message
Read Message
Previous Topic: Conceptual Query: widget functions access
Next Topic: Implementation of ColorPopUp ctrl
Goto Forum:
  


Current Time: Wed May 22 17:25:29 CEST 2024

Total time taken to generate the page: 0.02204 seconds