Dear Carsten and co. I have been tracking down the problem further. It turns out that OpenSG samples run OK on the Win2003 server. Thus my problem is probably not directly related to OpenGL. By debugging I found that on my development PC. if (!getFboOn() || !extensionCheck())
both returns true, thus the else brance is executed.
But on my win2003 server extensionCheck() returns false and thus the if branch
is executed.
In the if branch the following two lines both return 0
Int32 winWidth = getParent()->getWidth ();
Int32 winHeight = getParent()->getHeight();
Thus the following two for loops become an infinite loop.
-------------------------------
for (y1=0; y1 < totalHeight; y1 += winHeight)
{
y2 = osgMin((float)(y1+winHeight-1), (float)(totalHeight-1));
th = y2 - y1 + 1;
for (x1=0; x1 < totalWidth; x1 += winWidth)
{
x2 = osgMin((float)(x1+winWidth-1), (float)(totalWidth-1));
tw = x2 - x1 + 1;
-------------------
My question is:
Even though I try to render the thumbnail image in the background I have setup
the window of the SimpleScreenManager to a GLUTWindow, which is set to size
640x480.
But still the getParent()->getWidth (); return 0.
Where should I set this Parent window to avoid that the getWidth() returns 0?
-------------------
Suggestion for code improvement:
To avoid that someone else has to do a lot of work to track down a similar
problem.
I suggest that you add some appropriate error handling, e.g. throw an
exception.
.... or at minimum add this code arround the two for loops in
OSGFBOViewport.cpp, function
FBOViewport::render(RenderActionBase* action)
if(winWidth > 0 && winHeight > 0) {
// place the two forloops here
}else{
FWARNING(("FBOViewport::render() failed bacause window width = 0 or height
= 0"));
}
Best regards,
Thomas
________________________________
Fra: [EMAIL PROTECTED] på vegne af Carsten Neumann
Sendt: on 23-07-2008 05:53
Til: [email protected]
Emne: Re: [Opensg-users] FBOViewportPtr->render() crash on Windows 2003
Hello Thomas,
Thomas Jam Pedersen wrote:
> After setting up the debug log I get the below output, when my code call
> FBOViewportPtr->render()
>
> -------------------- debug log content -------------
>
> WARNING: I need GL_EXT_framebuffer_object-Extension!
> INFO: Window::getFunction: function "glDrawRangeElementsEXT" is NULL!
> INFO: Window::getFunction: function "glTexImage3DEXT" is NULL!
> INFO: Window::getFunction: function "glTexSubImage3DEXT" is NULL!
> INFO: Window::getFunction: function "glCompressedTexImage1DARB" is NULL!
> INFO: Window::getFunction: function "glCompressedTexSubImage1DARB" is NULL!
> INFO: Window::getFunction: function "glCompressedTexImage2DARB" is NULL!
> INFO: Window::getFunction: function "glCompressedTexSubImage2DARB" is NULL!
> INFO: Window::getFunction: function "glCompressedTexImage3DARB" is NULL!
> INFO: Window::getFunction: function "glCompressedTexSubImage3DARB" is NULL!
> INFO: FBOViewport::render: (Re)Allocating image for read-back.
> INFO: Window::getFunction: function "glTexSubImage3DEXT" is NULL!
> INFO: Window::getFunction: function "glCompressedTexSubImage1DARB" is NULL!
> INFO: Window::getFunction: function "glCompressedTexSubImage2DARB" is NULL!
> INFO: Window::getFunction: function "glCompressedTexSubImage3DARB" is NULL!
> WARNING: Texture-Creation OpenGL Error: invalid enumerant!
> WARNING: Texture-Creation OpenGL Error: invalid enumerant!
> WARNING: Texture-Creation OpenGL Error: invalid enumerant!
> WARNING: Texture-Creation OpenGL Error: invalid enumerant!
> WARNING: Texture-Creation OpenGL Error: invalid enumerant!
> WARNING: Texture-Creation OpenGL Error: invalid enumerant!
> WARNING: Texture-Creation OpenGL Error: invalid enumerant!
> WARNING: Texture-Creation OpenGL Error: invalid enumerant!
> WARNING: Texture-Creation OpenGL Error: invalid enumerant!
> WARNING: Texture-Creation OpenGL Error: invalid enumerant!
> WARNING: Texture-Creation OpenGL Error: invalid enumerant!
> WARNING: Texture-Creation OpenGL Error: invalid enumerant!
>
> --------------------------------------------
>
> I summarize from the above that the graphics card on the Win2003 server does
> not support OpenGL.
> And thus my code fails.
yes, or maybe just a generic VGA driver instead of one that matches the
card ?
> But my application is a dll, which can generate a thumbnail image of a 3D
> model. I don't want to render it to any display, only render to file.
>
> My new question:
> Is it possible to setup OpenSG such that it can render a thumbnail of a 3D
> model, even on computers where no OpenGL drivers are installed.
no, sorry that is not possible. All rendering, whether to be shown in a
window or stored in a file goes through OpenGL. You can think of OpenSG
as a higher level interface to OpenGL, it does not have a (software)
rasterizer of its own.
Hope it helps,
Carsten
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users
<<winmail.dat>>
------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
