Page 1 of 2

White image

Posted: Fri Mar 16, 2007 13:37
by Vetal_28
Hello!!!

I have one BIG problem:
We write game, in her we use 2 renders OpenGL and DirectX8.1.
So, when use DirectX8.1 it's all normal, but when use OpenGL all images is white, at all I do not know.

Beforehand thanks for the help :!:
Best regards,
Vitaliy

Posted: Tue Mar 20, 2007 15:03
by Vetal_28
PEOPLE, HELP, PLEEEEEEEEEEEEEEEAAAAAAAAAAASE ;)

I must decide this problem!!!

Posted: Wed Mar 21, 2007 08:32
by scriptkid
Hi,

do you mean the standard CEGUI renderers? Can there be an issue with texture sizes (power of 2) or something, which might cause drivers to behave differently? Or do the problems also occur when you run default CEGUI samples?

HTH!

Posted: Wed Mar 21, 2007 12:34
by Vetal_28
scriptkid wrote:Hi,

do you mean the standard CEGUI renderers? Can there be an issue with texture sizes (power of 2) or something, which might cause drivers to behave differently? Or do the problems also occur when you run default CEGUI samples?

HTH!


Yes, I mean standart CEGUI renderers. Yesterday I take old builds and has noticed that a problem in converting at preservation images (me recently have put on the project, the man which worked earlier has left, to consult is not present with whom) if I take old images (which made not I) it's OK, I mean simply incorrectly I save tga format, can there is any special adjustments (I has tried all in AdobePhotoshop CS2 and ASDSee)? You can tell as correctly save it, and where? I has rummaged all of the help and forums, I can not find anywhere.

Thanks that you have responded :wink:

Posted: Wed Mar 28, 2007 14:41
by Pompei2
Simple question: Do you catch CEGUI exceptions ? And did you already look in the CEGUI.log file ? I think it sounds like CEGUI couldn't load all the pictures (maybe wrong path, wrong codec, ...).

Posted: Fri Mar 30, 2007 10:41
by Vetal_28
Pompei2 wrote:Simple question: Do you catch CEGUI exceptions ? And did you already look in the CEGUI.log file ?


Yes, but there is no exeptions!!

Pompei2 wrote: (maybe wrong path, wrong codec, ...)


As I already spoke, problem in convertation. Most likely wrong path or codec, or.... And what correct? Through what program it is necessary to convert?

Please, help, because I have gone to "impasse"!!!!!!!!!!!

Posted: Fri Mar 30, 2007 15:42
by Levia
..Try to convert the picture you are loading to another format.

Posted: Fri Mar 30, 2007 18:58
by Pompei2
In OpenGl, everything is white when the texture hasn't been correctly loaded. In most cases, when a OpenGL call failed, glError returns the last error. As CEGUI generates no exception, I believe that CEGUI doesn't check the OpenGL error state (but I'm not sure !), so you could try to see if there happened a OpenGL error after CEGUI loaded all your data (using glError function). If it is so, it might help you to find your error. If there is no OpenGL error, you can try to debug the CEGUI code :?

Posted: Mon Apr 02, 2007 16:11
by Vetal_28
Levia wrote:..Try to convert the picture you are loading to another format.


OpenGLTexture::tImageTGA* OpenGLTexture::LoadTGA(const unsigned char* buffer, size_t buffer_size) - Support of other formar necessary to finish manually :roll:

Posted: Mon Apr 02, 2007 16:46
by Vetal_28
Pompei2 wrote:In OpenGl, everything is white when the texture hasn't been correctly loaded. In most cases, when a OpenGL call failed, glError returns the last error. As CEGUI generates no exception, I believe that CEGUI doesn't check the OpenGL error state (but I'm not sure !), so you could try to see if there happened a OpenGL error after CEGUI loaded all your data (using glError function). If it is so, it might help you to find your error. If there is no OpenGL error, you can try to debug the CEGUI code :?


I don't see glError function, it's not present. Or I blind :? ?

Posted: Tue Apr 03, 2007 15:21
by Pompei2
no, it's not present, you're right, and that's probably why you get no error from cegui.

Whant I mean is that YOU call it in YOUR code part, to see if the CEGUI code part had an error. you know what i mean ? :)

Posted: Wed Apr 04, 2007 13:10
by Vetal_28
Pompei2 wrote:no, it's not present, you're right, and that's probably why you get no error from cegui.

Whant I mean is that YOU call it in YOUR code part, to see if the CEGUI code part had an error. you know what i mean ? :)


To tell the truth is not strong...

Posted: Thu Apr 05, 2007 19:14
by Pompei2
hmm ok a sample:

Code: Select all

// Here you initialise CEGUI (and it loads the textures)
...
// Right after it, you call glGetError to see if opengl reported an error.
if( GL_NO_ERROR != glGetError( ) ) {
    // OpenGl reported an error, now you just have to look what error it is
    // and think a bit about it, maybe you will find what's up :)
}


see all possible return values and a detailed description in the man page.

Posted: Fri Apr 06, 2007 10:04
by Vetal_28
Pompei2 wrote:hmm ok a sample:

Code: Select all

// Here you initialise CEGUI (and it loads the textures)
...
// Right after it, you call glGetError to see if opengl reported an error.
if( GL_NO_ERROR != glGetError( ) ) {
    // OpenGl reported an error, now you just have to look what error it is
    // and think a bit about it, maybe you will find what's up :)
}


see all possible return values and a detailed description in the man page.


There is no error! glGetError( ) return GL_NO_ERROR. Problem only in convertation of the image now is precisely clear that.
I heard that in tga format there are special bits indicating, whether is turned image or is reflected, only as well as than them to specify I do not know, and find I can not.
Can a problem be in it? :?: :?

Posted: Mon Apr 09, 2007 13:51
by Pompei2
no, I have no more idea how to help you. Try GIMP to save the pictures, you can choose these 2 flags while saving. else, why don't you use png images ? using the SILLY lib ?