Jump to content

  • Log In with Google      Sign In   
  • Create Account

Chozo

Member Since 21 Nov 2002
Offline Last Active May 17 2012 09:11 PM

Topics I've Started

What's wrong with my stencil shadows?

07 January 2012 - 10:59 AM

I've been following the Shadows chapter of Math for 3D Game Programming, but for some reason I'm ending up with a weird problem that I can't seem to find the cause of. Here's a screenshot of what I'm seeing:

http://i.imgur.com/At3Xa.png

The black lines are the shadow volumes for all of the objects in my scene, using a single infinite light source. They're all coming from the stencil buffer (I've dumped the depth buffer between my ambient pass, my shadowing pass, and my lighting pass and it's never modified after the ambient), but I don't understand why I'm seeing the volume instead of just shadows where they intersect geometry. Any ideas what's going on? I'm more than happy to post whatever code would be relevant if that would help. Thanks in advance!

Python for loop question

29 February 2008 - 05:36 PM

I've written parsers in C before that would do something like this:

char* str = "Hello {{name}}";
for(int i=0; i<strlen(str); ++i) {
    if(str[i] == '{') {
        if(str[i+1] == '{') {
            i++;
            do_something();
        }
    }
}

So it ends up skipping over that second character when the for loop iteration var is incremented. I'm trying to do something similar in python, but obviously it's not working because of the way I'm doing the loop over the list:

str = "Hello {{name}}"
for i in range(len(str)):
    if str[i] == '{':
        if str[i+1] == '{':
            i += 1
            do_something()

Is there a way to make this work?

Thanks in advance.

[java] RTFEditorKit

23 August 2005 - 07:07 AM

Does anyone know if it's possible to get the RTFEditorKit to not ignore codepages and language changes? I can't seem to get it to handle documents with foreign characters in them when there's a codepage or language change. Thanks in advance.

[web] Hiding table rows

31 March 2005 - 07:51 AM

I've got some HTML here:
<div style="visibility:hidden;" id="60004">
<tr>
<td align="center" valign="middle"><input type="checkbox" name="select_report" value="60005">
<td align="left">    expandWebex total sessions by domain</td>
<td align="left">-1</td>
<td align="left">-1</td>

<td align="left">-1</td>
<td align="left">-1</td>
</tr>
That I'm trying to use to hide some table rows. Basically what I have is a table of report information that I need to behave sort of like a tree view. The problem is that the div's aren't hiding the table rows (I can't even get to the point of working on the javascript because of this). I'm not sure if this is even possible, but I can't think of another solution. The data has to be in a table and it has to behave like a tree view. Did I do something wrong in the style of the div? Is there a better solution I could look at that would maintain the format of the tables? Thanks in advance for any advice or help.

g++ exceptions

08 February 2005 - 05:17 AM

Not sure if this would be better in the Unix forum or not, but maybe others here have had this experience. We've got 3 binaries that we compile here. The first 2 compile and run just fine. They catch exceptions and so on just dandily. All 3 binaries share a common source base that is where the exceptions are thrown at. The third binary, when compiled, will always call terminate() when an exception is thrown (we explicitely do NOT use exception specifications to avoid the hassle they bring, and the stack trace shows no sign of an unexpected exception). We've even tried something like this: try { throw std::exception(); } catch(...) { } and terminate() is *still* called. We're pretty much at our wits end here. We can't figure out why the first 2 binaries work just fine and the third fails. As I said, they share a common source base and they use the same compile options. Is it a bug in gcc 3.3.x or am I maybe doing something wrong somewhere? We've also thrown on -fexceptions and -fno-enforce-eh-specs but to no avail. I appreciate any help ideas anyone might have.

PARTNERS