Skip to main content

GeometryArray.COLOR_4

10 replies [Last post]
giles7777
Offline
Joined: 2004-03-10
Points: 0

I notice that COLOR_3 and COLOR_4 constants both use COLOR as there base. This means you can't just check (vertexFormat & GeometryArray.COLOR_3 != 0) as this will catch COLOR_4 as well.

Seems like most code uses this check:

(vertexFormat & GeometryArray.COLOR_4) == GeometryArray.COLOR_3)
to check for color3 verses:

if ((vertexFormat & GeometryArray.COLOR_4) == GeometryArray.COLOR_4)

for color 4.

I've discovered 2 places where a check is assuming my first idea would work:

CompressionStream.java line 435
I know this path fails as I'm playing with the GeometryCompression currently.

GeometryInfoGenerator has a few references that seem suspect but I'm not positive. Line 507 maybe.

For the CompressionStream I have a fix locally. Would you like me to file an issue and/or patch?

Is it documented someplace that you can't just do what I did? Users might also make this mistake if they rip apart a GeometryArray.

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Chien Yang

Alan,
Thanks for helping to improve the quality of Java 3D. :-) Yes,
please file an issue using Issue Tracker and also include your finding
and suggested fix. BTW, I took a quick look into
GeometryInfoGenerator.java, there are 5 places where COLOR_4 are
checked, the code logic looks right to me, though the last 2 might have
written better.

thanks,
Chien.

java3d-interest@javadesktop.org wrote:

>I notice that COLOR_3 and COLOR_4 constants both use COLOR as there base. This means you can't just check (vertexFormat & GeometryArray.COLOR_3 != 0) as this will catch COLOR_4 as well.
>
>Seems like most code uses this check:
>
>(vertexFormat & GeometryArray.COLOR_4) == GeometryArray.COLOR_3)
>to check for color3 verses:
>
>if ((vertexFormat & GeometryArray.COLOR_4) == GeometryArray.COLOR_4)
>
>for color 4.
>
>I've discovered 2 places where a check is assuming my first idea would work:
>
>CompressionStream.java line 435
> I know this path fails as I'm playing with the GeometryCompression currently.
>
>GeometryInfoGenerator has a few references that seem suspect but I'm not positive. Line 507 maybe.
>
>For the CompressionStream I have a fix locally. Would you like me to file an issue and/or patch?
>
>Is it documented someplace that you can't just do what I did? Users might also make this mistake if they rip apart a GeometryArray.
>---
>[Message sent by forum member 'giles7777' (Alan Hudson)]
>
>http://www.javadesktop.org/forums/thread.jspa?messageID=18742䤶
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
>For additional commands, e-mail: interest-help@java3d.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

kcr
Offline
Joined: 2004-03-17
Points: 0

> Alan,
>
> Thanks for helping to improve the quality of Java 3D. :-)
> Yes, please file an issue using Issue Tracker and also
> include your finding and suggested fix.

We should also fix the documentation. In retrospect, it was a mistake to define COLOR_4 as COLOR|WITH_ALPHA, especially since WITH_ALPHA isn't a public constant.

-- Kevin

giles7777
Offline
Joined: 2004-03-10
Points: 0

Sorry for the long reply, seems tracking didn't work.

I definately think the constant is a weird thing. Making WITH_ALPA public would help, but would require more documentation. Changing the constant to something seperate would require a troll through the code and more testing.

I'll file an issue for the GeometryCompression one, I think your right about the GeometryInfo stuff.

giles7777
Offline
Joined: 2004-03-10
Points: 0

I'm trying to file an issue under j3d-core-util and it doesn't have any components. I get myIssues but nothing else. Should I file all issues under the j3d-core area?

Kevin Rushforth

All issues are filed under the parent java3d project. There is a
sub-component for each sun-project, so please file this bug against the
j3d-core-utils sub-component in the java3d project.

-- Kevin

java3d-interest@javadesktop.org wrote:

>I'm trying to file an issue under j3d-core-util and it doesn't have any components. I get myIssues but nothing else. Should I file all issues under the j3d-core area?
>---
>[Message sent by forum member 'giles7777' (Alan Hudson)]
>
>http://www.javadesktop.org/forums/thread.jspa?messageID=19674䳚
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
>For additional commands, e-mail: interest-help@java3d.dev.java.net
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Russell East

Hi,
I'm unsuccessfully trying to connect with the java3d cvs server. I've
never used cvs before, so maybe there is something simple I am missing.
Can anyone suggest a path to follow? Details follow
-- Russell

My OS is Fedora Core 2. `uname -a` reveals:
Linux gumnut 2.6.6-1.435.2.3 #1 Thu Jul 1 08:25:29 EDT 2004 i686
i686 i386 GNU/Linux

`cvs -v` reveals:
Concurrent Versions System (CVS) 1.11.17 (client/server)
Copyright (c) 1989-2004 Brian Berliner, david d `zoo' zuhn, Jeff
Polk, and other authors

The problem occurs when I enter the following:
cvs -d :pserver:guest@cvs.dev.java.net:/cvs login
or
cvs -d :pserver:{my-java.net-login-name}@cvs.dev.java.net:/cvs login

I get the password prompt
CVS password:
for "guest" I enter a blank line (I think this is correct), and for my
own login account, I enter my password.

Nothing happens for about 60 seconds or so. Then I see this message:
cvs [login aborted]: connect to
cvs.dev.java.net(64.125.133.206):2401 failed: Connection timed out

I initially suspected our company firewall, and asked that our systems
manager open up port 2401 for client access, which has been done (as far
as I know) but I get the exact same result.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Kevin Rushforth

I would still suspect your firewall. We have to use ssh
tunnelling/port-forwarding to access the java.net CVS server from within
our company's (Sun's) firewall. I have some instructions on how to do
this (along with a connection program that you may or may not need) that
I could forward to the list, but I won't have time until this evening.

-- Kevin

Russell East wrote:

> Hi,
> I'm unsuccessfully trying to connect with the java3d cvs server. I've
> never used cvs before, so maybe there is something simple I am
> missing. Can anyone suggest a path to follow? Details follow
> -- Russell
>
> My OS is Fedora Core 2. `uname -a` reveals:
> Linux gumnut 2.6.6-1.435.2.3 #1 Thu Jul 1 08:25:29 EDT 2004 i686
> i686 i386 GNU/Linux
>
> `cvs -v` reveals:
> Concurrent Versions System (CVS) 1.11.17 (client/server)
> Copyright (c) 1989-2004 Brian Berliner, david d `zoo' zuhn, Jeff
> Polk, and other authors
>
> The problem occurs when I enter the following:
> cvs -d :pserver:guest@cvs.dev.java.net:/cvs login
> or
> cvs -d :pserver:{my-java.net-login-name}@cvs.dev.java.net:/cvs login
>
> I get the password prompt
> CVS password:
> for "guest" I enter a blank line (I think this is correct), and for my
> own login account, I enter my password.
>
> Nothing happens for about 60 seconds or so. Then I see this message:
> cvs [login aborted]: connect to
> cvs.dev.java.net(64.125.133.206):2401 failed: Connection timed out
>
> I initially suspected our company firewall, and asked that our systems
> manager open up port 2401 for client access, which has been done (as
> far as I know) but I get the exact same result.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
> For additional commands, e-mail: interest-help@java3d.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Russell East

Ok cool. The doc at
https://www.dev.java.net/nonav/scdocs/ddSSHGuideCygwin.html suggests we
have to generate a public key then send it to "tech support" somewhere
at your site. Is that the kind of pathway needed, otherwise I'll wait
for your doc tonight. Thanks,
-- Russell

Kevin Rushforth wrote:

> I would still suspect your firewall. We have to use ssh
> tunnelling/port-forwarding to access the java.net CVS server from
> within our company's (Sun's) firewall. I have some instructions on how
> to do this (along with a connection program that you may or may not
> need) that I could forward to the list, but I won't have time until
> this evening.
>
> -- Kevin
>
>
> Russell East wrote:
>
>> Hi,
>> I'm unsuccessfully trying to connect with the java3d cvs server.
>> I've never used cvs before, so maybe there is something simple I am
>> missing. Can anyone suggest a path to follow? Details follow
>> -- Russell
>>
>> My OS is Fedora Core 2. `uname -a` reveals:
>> Linux gumnut 2.6.6-1.435.2.3 #1 Thu Jul 1 08:25:29 EDT 2004 i686
>> i686 i386 GNU/Linux
>>
>> `cvs -v` reveals:
>> Concurrent Versions System (CVS) 1.11.17 (client/server)
>> Copyright (c) 1989-2004 Brian Berliner, david d `zoo' zuhn, Jeff
>> Polk, and other authors
>>
>> The problem occurs when I enter the following:
>> cvs -d :pserver:guest@cvs.dev.java.net:/cvs login
>> or
>> cvs -d :pserver:{my-java.net-login-name}@cvs.dev.java.net:/cvs login
>>
>> I get the password prompt
>> CVS password:
>> for "guest" I enter a blank line (I think this is correct), and for
>> my own login account, I enter my password.
>>
>> Nothing happens for about 60 seconds or so. Then I see this message:
>> cvs [login aborted]: connect to
>> cvs.dev.java.net(64.125.133.206):2401 failed: Connection timed out
>>
>> I initially suspected our company firewall, and asked that our
>> systems manager open up port 2401 for client access, which has been
>> done (as far as I know) but I get the exact same result.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
>> For additional commands, e-mail: interest-help@java3d.dev.java.net
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
> For additional commands, e-mail: interest-help@java3d.dev.java.net
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Kevin Rushforth

> Ok cool. The doc at
https://www.dev.java.net/nonav/scdocs/ddSSHGuideCygwin.html
> suggests we have to generate a public key then send it to "tech
support" somewhere at
> your site. Is that the kind of pathway needed, otherwise I'll wait
for your doc tonight.

I'm not aware of any need for generating an RSA public key, but I'm far
from an expert in this area. Here are the instructions that work for us
within our (Sun's) firewall. Note the need for a socks server if you
can't connect directly to dev.java.net via ssh. If this is needed, you
will need the attached sconnect program (or an equivalent). The md5sum
for the unzipped program is:

fb85ed4b5ef5183d0d74a2e84a9808f6 /usr/local/bin/sconnect

Good luck.

-- Kevin

------------------------------------------------------------------------

Accessing the java.net CVS Server

Overview

Each java.net project (e.g., the j3d-core project) has a CVS respository
that is accessed via the java.net CVS server. If you want to checkout
source code to read it, or if you want to modify and checkin your
changes, you first need to login to the java.net CVS server. Then you
can issue cvs commands to create a new CVS child workspace, update your
workspace to bring it in sync with the respository, and checkin any
changes that you make.

Accessing CVS from Linux behind a firewall

To access the CVS server on java.net from behind a firewall, you first
need to set up an ssh tunnel to dev.java.net. Note that steps 1 & 2 may
not be necessary if you have a direct connection to the internet (i.e.,
without needing a proxy server). Steps 1 & 2 require a socks server
within your corporate LAN:

1. Download and unzip the attached sconnect program and install it in
/usr/local/bin on your machine; make it executable:

chmod 755 /usr/local/bin/sconnect

2. Add the following two lines to your |~/.ssh/config| file (if not
already there):

Host dev.java.net
ProxyCommand /usr/local/bin/sconnect -S your-socks-server@your.domain:1080 %h %p

If you've never used ssh before, you may need to create the ~/.ssh
directory.

3. Open the ssh tunnel:

ssh -c 3des -L2401:localhost:2401 userName@dev.java.net -x -l tunnel

where |userName| is your java.net user name (and the password is
"tunnel"). If you have trouble resolving dev.java.net, you may need to
use a numerical IP address (which is currently 64.125.133.206) in the
.ssh/config file and on the ssh command line.

NOTE: if this is the first time you have connected to java.net via ssh,
you may see a message like the one below:

The authenticity of host 'dev.java.net can't be established.
RSA key fingerprint is e6:0e:34:2c:33:75:35:26:5e:ca:3e:e0:f9:11:9b:0c.
Are you sure you want to continue connecting (yes/no)?

The correct answer is "yes".

You will then be prompted for a password, which is "tunnel" (do not use
your java.net password at this point). Once the password is entered you
will see:

Tunnel established. Type ctrl-c to exit.

This window is now holding the tunnel, use another window to run your
CVS commands as described below. When you are done with CVS and have
logged off, you can kill the tunnel by typing a -c in the
window in which the ssh command is running.

Now that you have established the ssh tunnel, you are ready to run cvs
(from a shell other than the one running the tunnel). First, you need to
setenv your CVSROOT environment variable as follows:

setenv CVSROOT :pserver:userName@localhost:/cvs

where userName is your java.net user name (but localhost is literally
localhost).

Login to the cvs server:

cvs login

You will be asked for your java.net password; once entered you will get
back your shell prompt. If this is the first time you have logged into
cvs, you may see a message like the one below:

cvs login: warning: failed to open /export/home/jdemo/.cvspass for reading:
No such file or directory

Just ignore this warning message. You should only see it once.

Checkout/update/whatever your favorite project:

cvs command project

where command is the CVS command you want to perform, such as "checkout"
and project is the name of the java.net project, such as "j3d-core". So
for example:

cvs checkout j3d-core

When you are done, you can logout of the cvs server.

cvs logout

You can then kill the tunnel by typing a -c in the window in
which the ssh command is running.

Links

To learn more about CVS, read the online manual at
http://www.cvshome.org/docs/manual/ .

To learn more about using CVS with java.net, read the java.net CVS
overview at http://java-net.dev.java.net/servlets/ProjectSource .

[att1.html]
[sconnect.zip]
---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Russell East

[att1.html]