Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (683)
Games in Android Showcase (196)
games submitted by our members
Games in WIP (751)
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 2025 times)
0 Members and 1 Guest are viewing this topic.
Offline DavidYazel

Junior Devvie

Java games rock!

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

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

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

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

Senior Devvie

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

« Reply #1 - Posted 2003-07-15 23: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.

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 Devvie


« Reply #2 - Posted 2003-07-16 08: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 Devvie

« Reply #3 - Posted 2003-07-16 15: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.

orrenravid (227 views)
2016-07-16 03:57:23

theagentd (295 views)
2016-07-11 14:28:54

Hydroque (382 views)
2016-07-06 05:56:57

Hydroque (533 views)
2016-07-03 08:52:54

GrandCastle (403 views)
2016-07-01 09:13:47

GrandCastle (396 views)
2016-07-01 09:09:45

CopyableCougar4 (449 views)
2016-06-25 16:56:52

Hydroque (422 views)
2016-06-22 02:17:53

SwampChicken (387 views)
2016-06-20 13:22:57

SwampChicken (306 views)
2016-06-20 13:22:49
Making a Dynamic Plugin System
by Hydroque
2016-06-25 00:13:25

Java Data structures
by BinaryMonkL
2016-06-13 21:22:09

Java Data structures
by BinaryMonkL
2016-06-13 21:20:42

FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17 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‑
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!