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   |
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?
|
|
|
 |
|
GLCtrl questions
By: cbpporter on Mon, 13 September 2010 11:52
|
 |
|
Re: GLCtrl questions
By: 281264 on Mon, 13 September 2010 20:01
|
 |
|
Re: GLCtrl questions
By: cbpporter on Mon, 13 September 2010 20:53
|
 |
|
Re: GLCtrl questions
By: koldo on Mon, 13 September 2010 22:30
|
 |
|
Re: GLCtrl questions
By: mrjt on Tue, 14 September 2010 16:35
|
 |
|
Re: GLCtrl questions
By: cbpporter on Tue, 14 September 2010 16:53
|
 |
|
Re: GLCtrl questions
By: cbpporter on Thu, 16 September 2010 14:28
|
 |
|
Re: GLCtrl questions
By: mrjt on Thu, 16 September 2010 18:23
|
 |
|
Re: GLCtrl questions
By: mrjt on Thu, 16 September 2010 18:35
|
 |
|
Re: GLCtrl questions
By: cbpporter on Wed, 22 September 2010 13:53
|
 |
|
Re: GLCtrl questions
By: cbpporter on Fri, 24 September 2010 12:22
|
 |
|
Re: GLCtrl questions
By: 281264 on Mon, 27 September 2010 12:27
|
 |
|
Re: GLCtrl questions
By: cbpporter on Wed, 29 September 2010 13:02
|
 |
|
Re: GLCtrl questions
|
 |
|
Re: GLCtrl questions
By: mrjt on Mon, 04 October 2010 12:00
|
 |
|
Re: GLCtrl questions
By: dolik.rce on Mon, 13 September 2010 21:01
|
 |
|
Re: GLCtrl questions
By: cbpporter on Mon, 13 September 2010 21:12
|
Goto Forum:
Current Time: Sun Jun 08 10:01:24 CEST 2025
Total time taken to generate the page: 0.04856 seconds
|