realbasic-games
[Top] [All Lists]

Re: RB3D visibility and crash

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: RB3D visibility and crash
From: Franco Vaccari <vaccari at dst dot units dot it>
Date: Wed, 12 Jul 2006 17:20:29 +0200
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <20060712141203 dot 07240EB6F3 at swarthymail-a2 dot dreamhost dot com>

On 12 Jul 2006, at 16:12, joe at strout dot net wrote:

On Jul 12, 2006, at 10:54 UTC, Franco Vaccari wrote:

- place a RB3Dspace in a window
- uncheck its visible property in the properties palette
- place a pushButton in the window
- in the Action event of the pushButton have

   dim v as new Vector3D
   Rb3DSpace1.Visible=true
   v=Rb3DSpace1.FindPoint(10,10)

I can imagine that under these circumstances, the Rb3DSpace isn't yet fully set up.

What do you mean exactly by "yet"? That it's a matter of being too quick in using the RB3Dspace after making it visible?

Hmm, yes, in the small project it looks like this is the case. I just tested by adding a separate button to call FindPoint. In the large app I think it was not so, but I might be wrong. For sure after making RB3Dspace visible I could immediately draw a trimesh, with success, while the subsequent call to FindPoint (immediately after the trimesh was plotted) lead to the crash.

Most Rb3DSpace methods check that before doing anything, but it sounds like FindPoint fails to do that. (Not that I would necessarily expect it to work anyway -- but it should refrain from crashing.)


One comment: if I start with the invisible RB3Dspace, then set its
visibility to true in code and show it, it's impossible to hide it
again by setting Rb3DSpace1.Visible=false. It still remains visible.
Is this expected?

Yes, at least on the Mac. Once an OpenGL context is created on a window, it doesn't seem to want to let go of that window. Under the hood, Rb3D is telling the OpenGL context to go away, but it refuses to do so. Nor will it accept being told to move off the window (in case you were going try that next).

So, unfortunately, about the best you can do is shrink your Rb3DSpace control down to 1x1 pixel.

Ok. I'll also try to position the RB3Dspace off the window and see if it works.

Thanks Joe!

Franco


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


From  Wed 12 Jul 2006 10:15:28 -0600
Return-Path: <realbasic-games-bounces at lists dot realsoftware dot com>
X-Original-To: listarchive at realsoftware dot com
Delivered-To: listarchive at realsoftware dot com
Received: by xmail.realsoftware.com (Postfix, from userid 1037)
        id 222A580477F; Wed, 12 Jul 2006 09:15:37 -0700 (PDT)
X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on www.realsoftware.com X-Spam-Level: X-Spam-Status: No, score=-1.5 required=4.5 tests=AWL,BAYES_00,NO_REAL_NAME autolearn=no version=3.1.1
Received: from lists.realsoftware.com (lists.realsoftware.com [209.198.132.125])
        by xmail.realsoftware.com (Postfix) with ESMTP id 68874804777;
        Wed, 12 Jul 2006 09:15:36 -0700 (PDT)
Received: from lists.realsoftware.com (localhost [127.0.0.1])
        by lists.realsoftware.com (Postfix) with ESMTP
        id 1044B1376B4E; Wed, 12 Jul 2006 11:15:31 -0500 (CDT)
X-Original-To: realbasic-games at lists dot realsoftware dot com
Delivered-To: realbasic-games at lists dot realsoftware dot com
Received: from swarthymail-a3.dreamhost.com (sd-green-bigip-62.dreamhost.com
        [208.97.132.62])
        by lists.realsoftware.com (Postfix) with ESMTP id 56C011376B3B
        for <realbasic-games at lists dot realsoftware dot com>;
        Wed, 12 Jul 2006 11:15:28 -0500 (CDT)
Received: from [10.0.1.2] (c-67-174-105-26.hsd1.co.comcast.net [67.174.105.26])
        by swarthymail-a3.dreamhost.com (Postfix) with ESMTP id E13AB7F084
        for <realbasic-games at lists dot realsoftware dot com>;
        Wed, 12 Jul 2006 09:15:27 -0700 (PDT)
Date: Wed, 12 Jul 2006 10:15:28 -0600
From: joe at strout dot net
To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
In-Reply-To: <478BA5C3-A531-468F-9FCD-A76D2718CF00 at dst dot units dot it>
X-Mailer: VerEx Email Gateway
Content-type: text/plain;
Content-transfer-encoding: 7bit
Message-Id: <20060712161527 dot E13AB7F084 at swarthymail-a3 dot dreamhost dot 
com>
Subject: Re: RB3D visibility and crash
X-BeenThere: realbasic-games at lists dot realsoftware dot com
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Sender: realbasic-games-bounces at lists dot realsoftware dot com
Errors-To: realbasic-games-bounces at lists dot realsoftware dot com

On Jul 12, 2006, at 15:20 UTC, Franco Vaccari wrote:

What do you mean exactly by "yet"? That it's a matter of being too quick in using the RB3Dspace after making it visible?

Yes; visibility changes (to controls in general) may not actually take place 
until the next time through the event loop.

> Yes, at least on the Mac. Once an OpenGL context is created on a > window, it doesn't seem to want to let go of that window. Under > the hood, Rb3D is telling the OpenGL context to go away, but it > refuses to do so. Nor will it accept being told to move off the > window (in case you were going try that next).
>
> So, unfortunately, about the best you can do is shrink your > Rb3DSpace control down to 1x1 pixel.

Ok. I'll also try to position the RB3Dspace off the window and see if it works.

It does not (as noted above).

Best,
- Joe

--
Joe Strout -- joe at strout dot net
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>