CGTalk > Development and Hardware > Graphics Programming
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
 
Thread Tools Search this Thread Display Modes
Old 07-29-2005, 08:44 PM   #1
GrahamHRoss
Frequenter
 
GrahamHRoss's Avatar
portfolio
Graham Ross Graham Ross
Graduate Student
San Francisco, USA
 
Join Date: Mar 2004
Posts: 246
Send a message via AIM to GrahamHRoss Send a message via MSN to GrahamHRoss
MayaAPI question...

Is there a command you can use in MayaAPI to write to the framebuffer? I'm trying to write scenedata to a framebuffer so I can retireve it later during the draw cycle....

Tried using OpenGL command glDrawBuffer(GLenum mode), but my compiler dosen't seem to recognize it....*leafing through header files*
 
Old 08-02-2005, 09:46 PM   #2
Robert Bateman
Lord of the posts
 
Robert Bateman's Avatar
Robert Bateman
Software Engineer
United Kingdom
 
Join Date: Aug 2004
Posts: 1,160
Quote:
Originally Posted by KungFu Hampster
Tried using OpenGL command glDrawBuffer(GLenum mode), but my compiler dosen't seem to recognize it....*leafing through header files*


well, it's a new feature in the Maya7.0 API (testing the beta at the moment). Shame it doesn't work though (hopefully thats just a beta problem). I'd suggest waiting for 7 to come out because there is lots of new HW shading stuff in there which should sort out a lot of in-evitable hacking.

The other question is do you really need to write the data to the frame buffer? could you use a texture or p-buffer instead?
 
Old 08-16-2005, 11:28 PM   #3
GrahamHRoss
Frequenter
 
GrahamHRoss's Avatar
portfolio
Graham Ross Graham Ross
Graduate Student
San Francisco, USA
 
Join Date: Mar 2004
Posts: 246
Send a message via AIM to GrahamHRoss Send a message via MSN to GrahamHRoss
Actually, I'm trying to create my own framebuffer and then write to it...kinda like in the nvidia demo "simple_framebuffer_object". I'm trying to use openGL calls in my class, but it's kinda weird...I have the calls to create my framebuffer looking like this....

Code:
easyBakeBuffer::easyBakeBuffer() { ////initialize framebuffers here... glGenFramebuffersEXT(1, &fb); //generate 1 framebuffer glGenTextures(1, &tex); //generate a texture glGenRenderbuffersEXT(1, &depth_rb); //make a renderbuffer for the framebuffer //. //. //. //more junk after here that dosen't matter if the above dosen't run! }


It compiles fine...but when I try it in Maya, all I get back is a small error message. I'm thinking it's a header file, but I'm kinda in the dark here...:(
 
Old 08-17-2005, 08:01 AM   #4
playmesumch00ns
Lord of the posts
 
playmesumch00ns's Avatar
render monkey
pretty picture maker
United Kingdom
 
Join Date: Jul 2002
Posts: 3,420
How are you getting the function pointers to those functions?

Maya's M3dView.h includes GL/gl.h itself, so maybe your include path ordering is picking up the wrong header version.

You could try compiling something that will print out the opengl version and see if that looks funky. If you get less than 2.0.0 then something's gone awry.
__________________

You can have your characters photoreal, fast or cheap. Pick two.
 
Old 08-17-2005, 04:39 PM   #5
Robert Bateman
Lord of the posts
 
Robert Bateman's Avatar
Robert Bateman
Software Engineer
United Kingdom
 
Join Date: Aug 2004
Posts: 1,160
are you doing this on linux?
 
Old 08-17-2005, 04:46 PM   #6
GrahamHRoss
Frequenter
 
GrahamHRoss's Avatar
portfolio
Graham Ross Graham Ross
Graduate Student
San Francisco, USA
 
Join Date: Mar 2004
Posts: 246
Send a message via AIM to GrahamHRoss Send a message via MSN to GrahamHRoss
Quote:
Originally Posted by Robert Bateman
are you doing this on linux?


Unfortunetly no. I wish I was. I heard errors like this are easier to troubleshoot on Linux.

I'll try including M3dView as a header file...but I think glGenFramebuffers is located in Glut.h. I know the program will spit out openGL, cause I drew a couple polys to the scene just to check to see if that was the problem.

I have some time today, so I'm going to strip it down and put in the minimum libraries and headers...see if I can isolate the problem.

BTW, Rob...thanks for those pages on MayaAPI...I haven't looked through all the examples yet but they've been very helpful.

Thanks for your suggestions. I'll keep u posted.
 
Old 08-17-2005, 10:24 PM   #7
GrahamHRoss
Frequenter
 
GrahamHRoss's Avatar
portfolio
Graham Ross Graham Ross
Graduate Student
San Francisco, USA
 
Join Date: Mar 2004
Posts: 246
Send a message via AIM to GrahamHRoss Send a message via MSN to GrahamHRoss
Hmmm...stripped everthing out and now I seem to be getting a repeat error...about an unresolved external symbol..

I seem to be getting these a lot...is there a good way to troubleshoot when you have an error in MayaAPI like this? Or any of the weird erros that come up, such as the one I had before....

Here's another good one...soemtimes I'll end up getting NULL as an undeclared variable....wtf is that crap?

PS - Rob...I hoe that avatar ur using isn't u...it's kinda freaky looking....

Last edited by GrahamHRoss : 08-17-2005 at 11:25 PM.
 
Old 08-18-2005, 08:59 AM   #8
Robert Bateman
Lord of the posts
 
Robert Bateman's Avatar
Robert Bateman
Software Engineer
United Kingdom
 
Join Date: Aug 2004
Posts: 1,160
if it's a new openGL extension you may get errors - remember to use wglGetProcAddress to initialise all extension functions (or just use a lib like glew to do it all for you).

No the avatar isn't me, it's the drummer from lightning bolt - the photo is from the a gig they did in the electric ballroom in london (though i was there)
 
Old 08-23-2005, 06:49 PM   #9
GrahamHRoss
Frequenter
 
GrahamHRoss's Avatar
portfolio
Graham Ross Graham Ross
Graduate Student
San Francisco, USA
 
Join Date: Mar 2004
Posts: 246
Send a message via AIM to GrahamHRoss Send a message via MSN to GrahamHRoss
Oh, that makes sense. Maya only supports openGL 1.1, right? I'll look into it. Thanks!
 
Old 08-23-2005, 06:49 PM   #10
CGTalk Moderation
Lord of the posts
CGTalk Forum Leader
 
Join Date: Sep 2003
Posts: 1,066,481
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 03:55 AM.


Powered by vBulletin
Copyright ©2000 - 2016, Jelsoft Enterprises Ltd.