Author Topic: How to use codeblocks for Cg programing  (Read 8494 times)

Offline themean

  • Multiple posting newcomer
  • *
  • Posts: 14
How to use codeblocks for Cg programing
« on: April 25, 2012, 04:21:28 pm »
Hello I want to use codeblocks for Cg programing
But i don't know how
If i must use some plugins i don't know names of these plugins

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: How to use codeblocks for Cg programing
« Reply #1 on: April 25, 2012, 05:03:18 pm »
C::B is mainly a C++ IDE, there are not direct capabilities to develop Cg shaders.
If you want to develop Cg shaders and then see the results, C::B is not your tool, search the internet for other more suitable tools.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline themean

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: How to use codeblocks for Cg programing
« Reply #2 on: April 25, 2012, 08:30:20 pm »
I found info in net that i can use code blocks for cg programing

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: How to use codeblocks for Cg programing
« Reply #3 on: April 25, 2012, 08:33:41 pm »
You can write the shaders in the editor and we have syntax highlight, but this is all you'll get.

If you want to see a preview of your shaders you have to write a c/c++ program.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline themean

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: How to use codeblocks for Cg programing
« Reply #4 on: April 26, 2012, 08:51:17 am »
I don't have a better offer
What i must do to have templates for cg program ( or give me another offer )

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: How to use codeblocks for Cg programing
« Reply #5 on: April 26, 2012, 09:03:55 am »
You are joking, aren't you?
http://lmgtfy.com/?q=cg+ide
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline themean

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: How to use codeblocks for Cg programing
« Reply #6 on: April 26, 2012, 09:38:37 am »
No i don't
All info in google is from 4-5 years
and FX composer work with COLLADA FX Cg and CgFX that may not compatible with Ogre 3d

Offline benkenobi01

  • Multiple posting newcomer
  • *
  • Posts: 64
Re: How to use codeblocks for Cg programing
« Reply #7 on: April 26, 2012, 03:35:04 pm »
download the cg kit here: (Windows 32/64-bit )    http://developer.nvidia.com/cg-toolkit-download

add the folder include/Cg  to    MinGW/include

go to c::b menu : settings > compiler and debugger > linker settings  :  link libraries  > add  >   C:\Program Files (x86)\CodeBlocks\MinGW\lib\cg.lib  and    C:\Program Files (x86)\CodeBlocks\MinGW\lib\cgGL.lib



download from here :   http://www.codesampler.com/oglsrc/oglsrc_10.htm#ogl_cg_simple       ,    Simple Vertex Shader (Cg), this is a simple cg shader in a windows environment.

make a workspace with this files in c::b. (GUI application)

all this work if your building cg for openGL

« Last Edit: April 26, 2012, 04:13:52 pm by benkenobi01 »

Offline themean

  • Multiple posting newcomer
  • *
  • Posts: 14
Re: How to use codeblocks for Cg programing
« Reply #8 on: April 26, 2012, 04:06:21 pm »
10x a lot  :)