Render to texture, opengl


Topic related to current development efforts on the core engine and demos

User avatar

Veteran

Posts: 127

Joined: Fri Apr 17, 2009 7:38 am

Location: Finland

Post Tue Nov 03, 2009 9:06 am

Render to texture, opengl

Hi,
There is a ticket https://sourceforge.net/apps/trac/axiom ... ticket/103 (closed)
that render to texture doesnt work on opengl. I downloaded latest svn but it still crashes.
User avatar

Site Admin

Posts: 1252

Joined: Thu Mar 02, 2006 11:29 pm

Location: Boston, MA, USA

Post Tue Nov 03, 2009 10:35 am

Re: Render to texture, opengl

migel wrote:Hi,
There is a ticket https://sourceforge.net/apps/trac/axiom ... ticket/103 (closed)
that render to texture doesnt work on opengl. I downloaded latest svn but it still crashes.

Open it back up with details. I tested it before I closed it and it works on Win7 x64. If you configuration is different, the ticket didn't specify those conditions.
Borrillis
The Steward of Axiom
User avatar

Veteran

Posts: 127

Joined: Fri Apr 17, 2009 7:38 am

Location: Finland

Post Wed Nov 04, 2009 12:06 pm

Re: Render to texture, opengl

Ok, I re-opened it.

Im using XP and tried this two different computers (two different graphics cards, both using XP), same problem.
I looked it a bit and figured that props.Modes.Count is 0 in GLFBORTTManager.cs and thats the why it crashes at line 285.
User avatar

Site Admin

Posts: 1252

Joined: Thu Mar 02, 2006 11:29 pm

Location: Boston, MA, USA

Post Fri Nov 13, 2009 12:35 pm

Re: Render to texture, opengl

Can you paste your log file ? There should be a line in there like :
  Code:
[GL] : Valid FBO targets


followed by a list of targets.
Borrillis
The Steward of Axiom
User avatar

Veteran

Posts: 127

Joined: Fri Apr 17, 2009 7:38 am

Location: Finland

Post Sat Nov 14, 2009 3:43 pm

Re: Render to texture, opengl

Ok, now tried just it with W7(x32), does not work (with 4870). And my second computer has x1650 but even on linux I cant get it to work (unless I removed these lines which causes problem). But here is piece of log:

[10:36:58] [GL] : Valid FBO targets PF_UNKNOWN PF_A8
[10:36:58] ---RenderSystem capabilities---
[10:36:58] -Adapter Name:
[10:36:58] -Driver Version:
[10:36:58] -Available texture units: 16
[10:36:58] -Maximum lights available: 8
[10:36:58] -Hardware generation of mip-maps: yes
[10:36:58] -Texture blending: yes
[10:36:58] -Anisotropic texture filtering: yes
[10:36:58] -Dot product texture operation: yes
[10:36:58] -Cube Mapping: yes
[10:36:58] -Hardware stencil buffer: yes
[10:36:58] -Stencil depth: 8 bits
[10:36:58] -Two sided stencil support: no
[10:36:58] -Wrap stencil values: yes
[10:36:58] -Hardware vertex/index buffers: yes
[10:36:58] -Vertex programs: yes
[10:36:58] -Max vertex program version: arbvp1
[10:36:58] -Fragment programs: yes
[10:36:58] -Max fragment program version: arbfp1
[10:36:58] -Texture compression: yes
[10:36:58] -DXT: yes
[10:36:58] -VTC: no
[10:36:58] -Scissor rectangle: yes
[10:36:58] -Hardware Occlusion Query: no
[10:36:58] -User clip planes: yes
[10:36:58] -VertexElementType.UBYTE4: yes
[10:36:58] -Infinite far plane projection: yes
[10:36:58] -Max Point Size: 8192
[10:36:58] -Vertex texture fetch: yes
[10:36:58] -Max vertex textures: 16
[10:36:58] -Vertex textures shared: yes
[10:36:58] Registering ResourceManager for type Texture


(dont know why adapter name and driver version dont show anything, I didnt remove these)


-
I have newest ATI's drivers.
User avatar

Site Admin

Posts: 1252

Joined: Thu Mar 02, 2006 11:29 pm

Location: Boston, MA, USA

Post Sun Nov 15, 2009 6:43 am

Re: Render to texture, opengl

I am going to go out on a limb here and guess that both of the cards you tested on were ATI? According to Axiom, your card does not support FBO and only ARB vertex and pixel shaders, which after looking up your card is obviously not the case.
Borrillis
The Steward of Axiom
User avatar

Veteran

Posts: 127

Joined: Fri Apr 17, 2009 7:38 am

Location: Finland

Post Sun Nov 15, 2009 8:26 am

Re: Render to texture, opengl

Yes, both are ATI cards. But they support FBO because if I set manually depthFormat and stencilFormat by changing these lines (285 and 286)

  Code:
         
  depthFormat = _depthFormats[ props.Modes[ bestmode ].Depth ];
  stencilFormat = _stencilFormats[ props.Modes[ bestmode ].Stencil ];


to
  Code:
         depthFormat = 8;
         stencilFormat =8;


then it works with opengl (because props.Modes causes the crash (props.Modes.Count==0)).
User avatar

Site Admin

Posts: 1252

Joined: Thu Mar 02, 2006 11:29 pm

Location: Boston, MA, USA

Post Mon Nov 16, 2009 11:18 am

Re: Render to texture, opengl

Please paste your entire log file for me, thanks.

And if you are using SVN, get the latest and see if my latest commit fixed your problem.

Otherwise this was the change :
  Code:
if ( fmt != Gl.GL_NONE && _atiMode && ( depths[ 0 ] == 0 || depths[ 1 ] == 0 || depths[ 2 ] == 0 ) )


in GLFBORTTManager.cs Line 416.
Borrillis
The Steward of Axiom
User avatar

Veteran

Posts: 127

Joined: Fri Apr 17, 2009 7:38 am

Location: Finland

Post Tue Nov 17, 2009 12:14 pm

Re: Render to texture, opengl

Downloaded the lastest version from svn and now it works (both computers, w7 & xp).

In case you still like to see the log, it's http://axiom.pastebin.com/m49c78e83
User avatar

Site Admin

Posts: 1252

Joined: Thu Mar 02, 2006 11:29 pm

Location: Boston, MA, USA

Post Tue Nov 17, 2009 12:45 pm

Re: Render to texture, opengl

migel wrote:Downloaded the lastest version from svn and now it works (both computers, w7 & xp).

In case you still like to see the log, it's http://axiom.pastebin.com/m49c78e83


Excellent, in that case I will close the bug for good now ;)
Borrillis
The Steward of Axiom

Return to Engine Development

Who is online

Users browsing this forum: No registered users and 1 guest

cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software for PTF.