#246209 - 09/22/08 04:14 AM
Render to texture using FBO on ATI Radeon 9550
|
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 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]
|
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
|
|
|
|
#246227 - 09/22/08 09:33 AM
Re: Render to texture using FBO on ATI Radeon 9550
[Re: V-man]
|
Frequent Contributor
 
Registered: 12/19/05
Posts: 520
Loc: Italy
|
Yes V-man, It simply calls the following: public static uint GenFramebuffersEXT()
{
uint[] result = new uint[1];
glGenFramebuffersEXT(1, result);
return result[0];
}Thanks, Alberto
|
|
Top
|
|
|
|
|
|
3 registered (DmitryM, Koter, Irena),
38
Guests and
92
Spiders online. |
|
Key:
Admin,
Global Mod,
Mod
|
|
24934 Members
12 Forums
52392 Topics
271540 Posts
Max Online: 482 @ 08/11/08 06:19 PM
|
|
|