|
||||||||||||||||||
Add Forum to Favorites | Send Topic To a Friend | View Forum FAQ | Track this topic |
Last Thread Next Thread ![]() |
| OpenGL FrameBuffer Object 201 |
|
![]() Anonymous Poster |
||||
|
||||
example 2 GLenum mrt[] = { GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT0_EXT } // typo 2x *0_EXT ?? glDrawBuffers(2, mrt); /Aki |
||||
|
||||
![]() phantom Moderator Member since: 12/15/2001 From: Ipswich, United Kingdom |
||||
|
|
||||
opps, my bad... I'll let Gaiiden know about the correction, good catch ![]() |
||||
|
||||
![]() Hybrid Member since: 7/30/2001 From: Cambridge, United Kingdom |
||||
|
|
||||
| What real world gaming examples are there for binding multiple textures to an FBO. Especially given that the textures must be the same size, and that the shaders used in the rendering are the same? Right? Thanks. |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| Using this technique on ATI drivers might be unsatisfying. I got this mail from devrel@ati.com in november '06: --- MRTs with FBOs are really slow, and it appears to be because the driver is recompiling the shader every time you switch the number of draw buffers. We have an EPR against this issue, though I cannot say when it will be addressed. The only workaround is to not change the number of draw buffers. That's not really possible with FBOs since you need a single draw buffer once you want to render to the backbuffer again. If you use pBuffers it can be worked around though in most cases since the number of draw buffers is specific to each context, and the pBuffer has a context of its own. --- I don't know whether this issue is still there. |
||||
|
||||
![]() Anonymous Poster |
||||
|
||||
| glGetIntergeri(GL_MAX_COLOR_ATTACHMENTS, &maxbuffers); glGetIntegeri you mean? :P |
||||
|
||||
![]() mziskandar Member since: 2/22/2007 From: Kuala Lumpur, Malaysia |
||||
|
|
||||
| 101 and 201 great tutorial! straight forward and simple! using latest glee and vs2005 having problem on compiling. does im the only one facing the problem? got it working anyway. just want to share.. no need for freeglut, changing #include <cstdlib> to #include <stdlib.h> (put it on top) and removing libc.lib (in configuration) and everythings compiled/run perfectly. great job rob! waiting for your tutorial on water/ocean shader and glsl shadow mapping. :) |
||||
|
||||
![]() Aph3x GDNet+ Member since: 1/7/2004 From: UK |
||||
|
|
||||
| Yer - very nice tute :) You're doing one on water shaders?! Excellent! |
||||
|
||||
![]() BenColumbus Member since: 3/26/2007 |
||||
|
|
||||
| Hi there, When I tried to use MRT, I had a warning such as 'warning C7531: global variable gl_FragData requires "#extension GL_ARB_draw_buffers : enable" before use'. Then I added "#extension GL_ARB_draw_buffers : enable" on the first line in my fragment shader, I got another warning:"warning C7508: extension GL_ARB_draw_buffers not supported". Does anyone run into the same problem? Thanks, Ben |
||||
|
||||
![]() me_here_me Member since: 9/26/2006 |
||||
|
|
||||
| I cannot download the source code of the examples due to some server error. can someone please send that to me at me_here_me@yahoo.com regards |
||||
|
||||
![]() cyrfer Member since: 12/9/2006 From: Monterey, CA, United States |
||||
|
|
||||
| BenColumbus, For the following GLSL pixel shader code: #version 110 #extension GL_ARB_draw_buffers : enable I am seeing the same warning you see. Does anyone have a fix? I'm using a Dell XPS laptop with a 6800. |
||||
|
||||
![]() ghostd0g Member since: 12/10/2004 From: Linz, Austria |
||||
|
|
||||
| hmm, i might be blind but where is the link to the sourcecode (didn't find it for the first tutorial either but then in the forum)? |
||||
|
||||
![]() jmaupay Member since: 1/2/2002 From: Grenoble, France |
||||
|
|
||||
Quote: Well, currently, there is 2 versions of the tutorial on gamedev. First one is not "formated" and you can't find any link to the source code: http://www.gamedev.net/reference/articles/article2333.asp The second one: http://www.gamedev.net/reference/programming/features/fbo2/ gives you a formated version with a nice "table of contents" on the right and an also very nice "Source code" icon (on the right too). For the second example (named "MRT example"), don't forget to modify the shader "mrt.fs" with the code: #extension GL_ARB_draw_buffers : enable at the beginning. Else on certain cards the shader don't compile and you have the 2 same images in the 2 cubes (no shader called in fact). For cyrfer and BenColumbus (too late no ?) try to update your driver. In my 6800 Go with new drivers it's ok. |
||||
|
||||
![]() ghostd0g Member since: 12/10/2004 From: Linz, Austria |
||||
|
|
||||
| aaah thx jmaupay. i realized that i was looking at the printer-friendly version ... |
||||
|
||||
![]() djamelha Member since: 5/7/2007 |
||||
|
|
||||
| Hi, thanks for the nice tutorial. I have a quick question regarding frame buffer objects. Im blending some points and disable the depth test. In this case do I still have to attach the depthbuffer or is there a more suitable renderbuffer to use? Thanks |
||||
|
||||
![]() Int19 Member since: 6/27/2006 From: Trollhattan, Sweden |
||||
|
|
||||
| hi board Im having trouble tourning MRT once i enable it. What im trying to achieve is to store my eyespace depth in a second color texture during my early-z pass and then disable the second colortexture. I do : glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbColor); GLenum buffers[] = { GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT }; glDrawBuffers(2,buffers); before the early-z and then just : GLenum buffers[] = { GL_COLOR_ATTACHMENT0_EXT }; glDrawBuffers(1,buffers); after the early-z pass. The problem is that all the subsequent passes still draw to COLOR_ATTACHMENT1, destroying my nicely formatted depth data. Any ideas? Greetz David |
||||
|
||||
![]() sonicth Member since: 6/10/2008 From: Wien, Austria |
||||
|
|
||||
| I tried to compile the code for linux or OS x (i dont have an access to a windows computer at all, sorry! :p) but the code is too customised to a particular setup, and for windows i guess, so i just gave up. I am not ranting that people should provide setup for every available platform, and what about just using universal include paths: instead of "..\fish.h" just use "../fish.h" (dont worry windows can understand it!!! ;)). Why not use as much glut.h as possible. There are usually no problems when you download a code with dsp or sln you can copy a standard makefile. Could anyone try make the code more platform independent please? also is it possible to have it without glee? |
||||
|
||||
![]() nithin19484 Member since: 4/21/2005 |
||||
|
|
||||
| Hi , Thanks for the great tutorial. Ive modified the code to work in Linux. Im not sure how to share it on gamedev. Regards nithin |
||||
|
||||
All times are ET (US)![]() |
Last Thread Next Thread ![]() |
|