Page 1 of 3 1 2 3 >
Topic Options
Rate This Topic
#246209 - 09/22/08 04:14 AM Render to texture using FBO on ATI Radeon 9550
devdept Offline
Frequent Contributor
***

Registered: 12/19/05
Posts: 520
Loc: Italy
Hi All,


Now I have a perfect working FBO based render to texture (on the developing machine) but can't see it working on the ATI Radeon 9550 / X1050 mentioned in the subject of this post. Of course all the necessary extensions are present on the second machine and OpenGL version is 2.1.7873.

I attach the code to see if somebody discover something that can be improved.

I wanted also to ask:

1) if I can expect a bug/missing functionality on the driver for this trivial FBO implementation
2) if there is a tool to analyze FBOs


Thanks,

Alberto

 Code:
glBindTexture(GL_TEXTURE_2D, textureName);            
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, textureSize, textureSize, 0, GL_RGBA, GL_UNSIGNED_BYTE, null);
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
                           
fbo = glGenFramebuffersEXT();
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, textureName, 0);

// Checks FBO status
int status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
ReportFboStatus(status);
                 
// Draws on texture
DrawShadow();


Top
#246212 - 09/22/08 05:05 AM Re: Render to texture using FBO on ATI Radeon 9550 [Re: devdept]
sqrt[-1] Offline
Frequent Contributor
*****

Registered: 06/05/02
Posts: 910
Loc: Australia
I keep saying this to almost everyone that comes here (see previous posts)

ENSURE, that you specify the third parameter of glTexImage2D as a known type, otherwise the driver will pick a format for you. (On ATI - it has a habit of choosing a 16bit texture format - which is probably not a good render target)

So change your code to:
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, textureSize, textureSize, 0, GL_RGBA, GL_UNSIGNED_BYTE, null);

If that does not work, I don't know what is wrong...

Top
#246215 - 09/22/08 05:57 AM Re: Render to texture using FBO on ATI Radeon 9550 [Re: sqrt[-1]]
devdept Offline
Frequent Contributor
***

Registered: 12/19/05
Posts: 520
Loc: Italy
sqrt[-1],


Unfortunately it does not help.

I was wondering if the choice to use:

gl.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR);

and not generating mipmaps can someway be a "non-standard" approach because the result is exacly like the one we obtained when forgot to use the gl.TexParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR) call.

Thanks,

Alberto

Top
#246225 - 09/22/08 09:22 AM Re: Render to texture using FBO on ATI Radeon 9550 [Re: devdept]
V-man Offline

OpenGL Guru
*****

Registered: 02/21/00
Posts: 3440
Loc: Montreal, Canada
This is not standard
fbo = glGenFramebuffersEXT();

It should be
glGenFramebuffersEXT(1, &fb);

Just try the example from which will work on every driver and GPU
http://www.opengl.org/wiki/index.php/GL_EXT_framebuffer_object

Top
#246227 - 09/22/08 09:33 AM Re: Render to texture using FBO on ATI Radeon 9550 [Re: V-man]
devdept Offline
Frequent Contributor
***

Registered: 12/19/05
Posts: 520
Loc: Italy
Yes V-man,

It simply calls the following:

 Code:
public static uint GenFramebuffersEXT()
{
   uint[] result = new uint[1];
   glGenFramebuffersEXT(1, result);
   return result[0];
}


Thanks,

Alberto

Top
#246234 - 09/22/08 12:22 PM Re: Render to texture using FBO on ATI Radeon 9550 [Re: devdept]
Ilian Dinev Offline
Frequent Contributor
****

Registered: 01/26/08
Posts: 822
Loc: Bulgaria
This is one of the many reasons I abandoned that generation of ATi cards. RTT on R9600 never worked (be it opengl or dx9c), shaders were reported to be version 2.0a but even 2.0 did not work without crashes

Top
#246241 - 09/22/08 02:19 PM Re: Render to texture using FBO on ATI Radeon 9550 [Re: Ilian Dinev]
devdept Offline
Frequent Contributor
***

Registered: 12/19/05
Posts: 520
Loc: Italy
Thanks Ilian,

This is a good news for me, I was getting crazy aroung this issue.

Thanks again,

Alberto

Top
#246256 - 09/22/08 06:26 PM Re: Render to texture using FBO on ATI Radeon 9550 [Re: devdept]
sqrt[-1] Offline
Frequent Contributor
*****

Registered: 06/05/02
Posts: 910
Loc: Australia
I don't know what to say except I don't seem to have any troubles with FBO on ATI 9550 (last tested around January when I did my Light Indexed demo)

Perhaps have a look at the Humus framework and see if he does something you don't? http://www.humus.name/ (I used his framework code)

Top
#246259 - 09/22/08 08:27 PM Re: Render to texture using FBO on ATI Radeon 9550 [Re: sqrt[-1]]
Ilian Dinev Offline
Frequent Contributor
****

Registered: 01/26/08
Posts: 822
Loc: Bulgaria
Thanks for the info, sqrt[-1].
I had almost given-up FBO in some software of mine, as R9550 is a minimum target. I hadn't tested new drivers for it in almost 2 years, as it's been collecting dust in discrete form.

Top
#246261 - 09/23/08 02:03 AM Re: Render to texture using FBO on ATI Radeon 9550 [Re: sqrt[-1]]
devdept Offline
Frequent Contributor
***

Registered: 12/19/05
Posts: 520
Loc: Italy
sqrt[-1],

We are talking about RTT (render to texture) using FBO not FBO offscreen rendering.

Where you using RTT with Humus?

Thanks,

Alberto

Top
Page 1 of 3 1 2 3 >


Moderator:  dorbie, Eric, Tom Nuydens, Zengar 
Who's Online
3 registered (DmitryM, Koter, Irena), 38 Guests and 92 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
Nonozor, Maire Nicolas, minakshee, Koter, pixelwrangler
24934 Registered Users
Top Posters (30 Days)
Alfonse Reinheart 152
ZbuffeR 92
Dark Photon 73
marshats 47
Brolingstanz 44
Ilian Dinev 41
Iulian B 38
Stephen A 37
Kip Warner 28
devdept 26
Pierre 23
DarkShadow44 23
igorgiv 23
skynet 23
Yann LE PETITCORPS 22
scratt 21
Abdallah DIB 21
Aleksandar 20
mikeynovemberoscar 20
Pierre Boudier 19
Forum Stats
24934 Members
12 Forums
52392 Topics
271540 Posts

Max Online: 482 @ 08/11/08 06:19 PM