View Full Version : minimal enables for gl_MultiTexCoord0?
12-06-2005, 10:36 AM
I'm trying to get the mandelbrot shader to work in my GL demosystem, but am still getting a black texture...the brick shader works fine, and the only real difference in the vertex shaders is the usage of gl_MultiTexCoord0 to setup the Position variable for the fragment shader...
...so, I'm wondering if there is something I'm not glEnable'ing or otherwise missing in setup? Do I need GL_TEXTURE_2D or GL_TEXTURE_RECTANGLE_EXT, or do I also need to have a texture loaded (even tho there's not exactly a texture lookup)? Or is it ok to just make sure I'm drawing to a screen aligned quad?
12-06-2005, 10:06 PM
Check the compile and link results and the compiler's infolog.
The Mandelbrot shader source I saw has a dynamic loop in a fragment shader. This is not going to compile on implementations without shader model 3.0 support, e.g. GeForce 6xxx and up.
12-07-2005, 10:19 AM
Hey tigital, you might not remember me, but I met you at the Apple game summit a few years back I sat in the front row with you and Chris. Anyway if you are on your PB still then your screwed, for you have no SM3.0 support unless you get yourself a PM with a 6800 series VC. Good luck.
12-07-2005, 11:40 AM
hey mars! of course I 'member ya: I actually saw chris at wwdc this summer...how are you doing?
...anyway, I'm on an alBook, which does support glsl since 10.4.3 in hardware...I've even checked the logs on linking the shaders (show no problem), and then used the cgl api to check where it's running:
CGLGetParameter (CGLGetCurrentContext(), kCGLCPGPUVertexProcessing, &vertexGPUProcessing);
CGLGetParameter (CGLGetCurrentContext(), kCGLCPGPUFragmentProcessing, &fragmentGPUProcessing);
...so, it works in /Developer/examples/opengl/cocoa/GLSLShowcase, but still no go in my app...really pulling out my hair here, because I'd like to get this going as a proof of concept first-step toward gpu streaming...I'm trying to re-examine all of my gl setup/preconceptions, and currently am looking at depth buffer (mine is only 24, whereas the original is 32)? OpenGL Profiler has actually been very helpful in this, as I can compare traces from one to the other, and at this point, they are basically the same, with the exception that I'm not drawing the "podium"...
12-07-2005, 02:10 PM
I haven't looked at the code, but does the shader use dynamic loop? Like Relic said you will need SM3.0 hardware. GLSL is ok on 9600 and newer hardware but the features you might need aren't there. Post some code of the shader so we can take a look. Good to see ya around. Chris just told me he seen you at WWDC...
12-08-2005, 10:51 AM
Are you using the code from the Orange book? If so try and change the
MaxIterations to a constant in the FS code... Not sure if that will work???
12-08-2005, 04:13 PM
hmm, that's a good idea, because I've seen lots of references to limitations of looping in glsl in the 10.4.3 drivers...but, the orange book shader isn't the exact shader I'm using (very similar, tho)...if you have xcode 2.x installed (possibly even 1.5?), you should have a copy of the shader in /Developer/Examples/OpenGL/Cocoa/GLSLShowpiece/Exhibits/Mandelbrot
...this example code works fine here on my laptop, but doesn't show up anything when I try it in my demosystem: so, I've been going thru the setup code to make sure everything's ok, but still haven't got it right...actually been using the gl profiler to match the gl call trace between the glslshowpiece and my app, and they're about the same so far...
12-15-2005, 02:39 PM
Oops, I forgot to tell you. As of now I am Mac less until the Intel based ones come out... So if you want send me the shader files or whatever you think I might need so I can take a look... I will give it a shot.
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.