Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Using CG  (Read 1592 times)
0 Members and 1 Guest are viewing this topic.
Offline DavidYazel

Junior Member




Java games rock!


« Posted 2003-07-15 23:51:32 »

I am interested in CG, in particular vertex programs.  for example:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
struct appin
{
    float3 position  : POSITION;
    float3 normal    : NORMAL;
    float2 texcoord0 : TEXCOORD0;
};

struct vertout
{
      float4 position  : POSITION;
      float4 color0    : COLOR0;
    float2 texcoord0 : TEXCOORD0;
};

//-----------------------------------------------------------------------------
// IN                  = Incoming per-vertex data to be processed
// modelViewProjection = Combined model-view-projection matrix
// currentAngle        = A value that goes from 0 to 360 and repeats
//-----------------------------------------------------------------------------
vertout main( appin IN,
              uniform float4x4 modelViewProjection,
              uniform float4 currentAngle )
{
      vertout OUT;

      float4 v = float4( IN.position.x, IN.position.y, IN.position.z, 1.0f );
   
   
    v.y  = sin( IN.position.x + currentAngle.x );
    v.y += sin( IN.position.z + currentAngle.x );
    v.y *= IN.position.x * 0.08f;

      OUT.position = mul( modelViewProjection, v );

    OUT.color0    = float4( 1.0f, 1.0f, 1.0f, 1.0f );
      OUT.texcoord0 = IN.texcoord0;

      return OUT;
}


So question.. what platforms are CG supported?  What versions of opengl is it supported?

Is this something I can hope to use on win, linux and max across a variety of cards which are Geforce II and equivelent ATI?

Anyone have any experience using CG?

David Yazel
Xith3D Project Founder
http://xith3d.dev.java.net

It may look complicated, but in the end it is just a bunch of triangles
Offline gregorypierce

Senior Member




I come upon thee like the blue screen of death....


« Reply #1 - Posted 2003-07-16 01:04:15 »

With certainty I can say that the Mac platform currently has no Cg runtime and nVidia has been dragging their feet about it. Last I checked, there was fairly strong support for Cg under Linux.

http://www.gregorypierce.com

She builds, she builds oh man
When she links, she links I go crazy
Cause she looks like good code but she's really a hack
I think I'll run upstairs and grab a snack!
Offline aNt

Senior Member




AFK


« Reply #2 - Posted 2003-07-16 10:19:01 »

well i been messing with the Cg. all abit mad if u ask me. i wouldnt make anything at this time - unless its just messing around.

Cg on my PC laptop GF2Go 460 has only a handful of Cg power. My DeskTop PC has a stack load but not all of um and thats a GFTi48000 so i guess thats abit poor. i havnt got a GFFX coss it sucks. but i bet it can do the Cg action to the max. ATI is not in the Cg as far as i can tell. When it comes to Apple Mac - i thought all u needed was a GF Card?

so all in a Cg rocks - but noone has the the cool effects u would want on there cards cap yet. worth a look mind. if u want to play with um- get the CgSDK it has a cool Browser where u can check out what your card can do. and see the Cg code that did there effects.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline elias

Senior Member





« Reply #3 - Posted 2003-07-16 17:01:03 »

To avoid relying on Cg you could just offline compile your programs and use ARB_vertex_program, available in newer drivers. It's only hardware supported from gf3 and up, not sure about ati.

- elias

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (12 views)
2014-07-24 01:59:36

Riven (10 views)
2014-07-23 21:16:32

Riven (11 views)
2014-07-23 21:07:15

Riven (12 views)
2014-07-23 20:56:16

ctomni231 (43 views)
2014-07-18 06:55:21

Zero Volt (38 views)
2014-07-17 23:47:54

danieldean (32 views)
2014-07-17 23:41:23

MustardPeter (34 views)
2014-07-16 23:30:00

Cero (50 views)
2014-07-16 00:42:17

Riven (50 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!