Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (636)
Games in Android Showcase (178)
games submitted by our members
Games in WIP (688)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / JOGL Development / [SOLVE] [CgFx] Load effect error on: 2006-01-26 12:26:40

I'm trying to load effect from a simple cgFx file.
This is my code :
       CGcontext context = CgGL.cgCreateContext();
      CGeffect cgeffect = CgGL.cgCreateEffectFromFile(context, file, null);
      int error = CgGL.cgGetError();
      String str= CgGL.cgGetErrorString(error);

File is a String pointing to a correct cgFx file. The return of the function cgCreateEffectFromFile is always null and the report error is "CG ERROR : The compile returned an error."
I'll try to compile the cgFx file using cgc and everything is ok.
I'll try to put this code inside and outside the jogl GLEventListener init function but the result is the same.
I need your help... I don't understand what's wrong...

edit: I found a reference to a cg function (cgGLRegisterStates(context)) that is not bind in jogl. Did the call to this function is already made when I create a context?

solve: that's it. The function cgGLRegisterStates is missing. I've had it inside my own jogl repositorie and everything works kown.
2  Java Game APIs & Engines / JOGL Development / Re: Shader Eclipse Plugin: Second Release (with GLSL) on: 2005-12-19 18:16:19
I'm sorry, i didn't post the new link.

First, the source code is released on sourceforge here:
You can get a zip version of the plugin.

For a web update version, add the site to your eclipse update site.

Have fun

3  Java Game APIs & Engines / JOGL Development / Re: JSR-231 buildnight problem on: 2005-11-23 10:06:43
Unfortunately, this is not a rewind problem. I do all the necessery rewind. And also, my data are mapper using the glMapBufferARB function and unmap when I finish my edition.
It's work perfectly if I don't use VBO for indices...
4  Java Game APIs & Engines / JOGL Development / Re: JSR-231 buildnight problem on: 2005-11-21 19:39:46
I have made some test, and the problem seems to be in the VBO, when you put the indices inside in graphic memory...
any idea Ken?
5  Java Game APIs & Engines / JOGL Development / JSR-231 buildnight problem on: 2005-11-21 07:26:05

I've got a strange problem with the today buildnight of JSR-231. It's about VBO.
I made some code to display some big triangulatedSurface, using VBO and index.
It's work perfectly on JOGL, and I port it under JSR. I've got a strange problem: in some case, the display crash.
It's crashing in glDrawElements, but not all the time. I suppose it's crashing when I used big vertex pointer/indices.
My surface is composed of 230961 vertices and 460000 triangles.

Any idea?
6  Java Game APIs & Engines / JOGL Development / Re: center of triangle on: 2005-11-18 18:39:43
It's a well know formula:
to find the center of a triangle (gravity center in this case), we used the relathionship: (ABC is the triangle, G, the center, and GX the vector from G to X)

GA = [G] - [A]
3[G] = [A] + +[C];

and bingo!
7  Java Game APIs & Engines / JOGL Development / Re: center of triangle on: 2005-11-18 18:10:53
just adding the 3 vertex coordinate and divide by 3...
8  Java Game APIs & Engines / JOGL Development / Re: Shader Eclipse Plugin: Second Release (with GLSL) on: 2005-11-17 22:49:05
A new version is released. It's my buildnight version, but it seems to work enough to be distribute.
GLSL editor and Compiler. The support is made by using the 3DLab's front end compiler. see 3Dlab web site for source.
You can download a binary version for windows here:

The new plugin files are there:

As always, send me an email if you have question/suggestion.

Markus_Persson, rexguo, you can breath now!
9  Java Game APIs & Engines / JOGL Development / Re: Cg Eclipse Plugin: Work In Progress on: 2005-11-15 09:16:08
CgPlugin for eclipse, first release:



download and unzip the plugin file into your eclipse' plugin directory. Then, run eclipse.

To active the runtine compilation of the Cg file, you have to activate this mode via a new popupmenu on the project.

Go into the eclipse preferences and find Cg Preferences. Set the location of your cgc file as:

You can also change the editor prefrences:

After that, rename or create new cg file. To run properly the editor and the compiler, the vertex program files must have the ".vp" extension and the fragment program ".fp"
You can used new file command.

For any question and suggestion, send me an email at

In next release, I'll try to add some cool features: auto-completion, auto-indent, GLSL support...
10  Java Game APIs & Engines / JOGL Development / Re: Cg Eclipse Plugin: Work In Progress on: 2005-11-10 16:08:45
However 3dLabs have a 'verifier' available for free from their website. This is basically a compiler just for checking syntax, so that should be good enough. Not sure if it comes with source but it's a command line tool so I suppose you could always parse the output.

That's the way I do for cgc compiler. I only found the source code of the GLSL compiler, and I don't have any C/C++ compiler. I've got only a 56k modem so I can't download a full cygwin/gcc distribution for windows.
Someone can send me the compiler binarys please?

11  Java Game APIs & Engines / JOGL Development / Re: Cg Eclipse Plugin: Work In Progress on: 2005-11-10 14:13:10
It's not an hard work to add an editor or a compiler to eclipse, but it can be just a long work...
In order to add GLSL support, I need:
 - an GLSL compiler
 - the full keywords allowed for editor coloring.

Right now, I prefer first finish the Cg Editor (I work on auto-completion, boring work too...) and in a second pass, see GLSL.
If you have any docs, files... give it to me.

Just a question for the Cg users: do you want to keep the asm file generate by the compiler or no? For the moment, I just compile the cg code with -nocode options, because I never keep the asm file.
What about you?
12  Java Game APIs & Engines / JOGL Development / Shader Eclipse Plugin: Second Release (with GLSL) on: 2005-11-09 09:33:53
I'm currently coding a cg Eclipse plugin in order to create, compile and edit the cg shaders inside the eclipse IDE.
Ritght now, the compiler and the editor is almost finished.

Some prefrences are ready:

I have to work on new Project and New file action, in order to make it easier to use, but the first realesed will be on the week end.

if you are interessed to see and test it, send me an email


Vincent Martinez aka Trevidos
Pages: [1]
Dwinin (74 views)
2015-11-07 13:29:08

Rems19 (81 views)
2015-10-31 01:36:56

Rems19 (79 views)
2015-10-31 01:32:37

williamwoles (107 views)
2015-10-23 10:42:59

williamwoles (93 views)
2015-10-23 10:42:45

Jervac_ (111 views)
2015-10-18 23:29:12

DarkCart (137 views)
2015-10-16 00:58:11

KaiHH (118 views)
2015-10-11 14:10:14

KaiHH (158 views)
2015-10-11 13:26:18

BurntPizza (173 views)
2015-10-08 03:11:46
Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48

Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11 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!