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 » GLCtrl questions
Re: GLCtrl questions [message #28717 is a reply to message #28706] Mon, 13 September 2010 20:01 Go to previous messageGo to previous message
281264 is currently offline  281264
Messages: 272
Registered: June 2010
Location: Spain
Experienced Member
Hi cbpporter,

Not being an OpenGL expert (I am currently using a limited portion of it and not for games, btw) these are my answers:

1.- GLCTrl is a way to create a substratum for the usage of OpenGL in Windows: i.e. specification of pixelformatdescriptor, creation of an OpenGL rendering context (by using wglCreateContext(), and so on. These features are easily recognizable in the code. I suggest you to have a look to the well known “Red book”, available for free in the internet(not the latest version, but it is ok: http://fly.cc.fer.hr/~unreal/theredbook/). Also have a lookt at the example included in the reference assembly of TheIde.

Yes, you can create anything in OpenGL by using GLCTrl. For example, the function in GLCTrl.cpp:
void GLCtrl::StdView()
{
	glShadeModel(GL_SMOOTH);
	glClearColor(0.0f, 0.0f, 0.0f, 0.5f);
	glClearDepth(1.0f);
	glEnable(GL_DEPTH_TEST);
	glDepthFunc(GL_LEQUAL);
	glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);

	Size sz = GetSize();
	glViewport(0, 0, (GLsizei)sz.cx, (GLsizei)sz.cy);
	glMatrixMode(GL_PROJECTION);
	glLoadIdentity();
	gluPerspective(45.0f, (GLfloat)(sz.cx)/(GLfloat)(sz.cy), 1.0f, 100.0f);
	glMatrixMode(GL_MODELVIEW);
	glLoadIdentity();
}

sets up the basic features you need: viewport, type of perspective projection (gluPerspective in this case, although I am currently using glOrtho), etc..

Yes, you can have more than one OpenGL views at the same time. Just generate a second drawing/geometry and “project” it in a different viewport within the main window. You can use docking and dock a different windows adjacent to the “central” window.

2.- I have never tried that for I never needed it.

3.- As long as you are able to create a window without borders, capable to occupy the whole screen (which is not related with OpenGL), then OpenGL will occupy the full screen.

BTW I am interested in working with a TopWindow in U++ capable to occupy the full screen, i.e. to use the screen space used by the lower Windows toolbar; any hint how to do it?
 
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
Read Message
Previous Topic: DHCtrl changes for SDLCtrl
Next Topic: Window move virtual function
Goto Forum:
  


Current Time: Sun Jun 08 10:01:24 CEST 2025

Total time taken to generate the page: 0.04856 seconds