NXC GL

Discussion specific to projects ideas and support.
dudmaster
Posts: 171
Joined: 06 Oct 2010, 02:38
Location: Texas, Santa Fe
Contact:

NXC GL

Post by dudmaster »

I have been working on some 3D lately, and i thought to post them. They are powered by gl in NXC.

Here you can learn about how to create 3D graphics on an NXT, watch a video of my PSP-Nx 3D in action, and download them to your NXT!

How gl Works
glInit(); Initialize the gl library, this always comes first
glBox(gl mode, gl sizeX, glsizeY, glsizeZ); create an object with the variables in sizes
glCube(gl mode, gl size); create an object with the variable in size
glPyramind(); I do not yet understand
glSet(setting type, setting value) Set
glSetAngleX(value); set the angle X to value
glSetAngleY(value); set the angle Y to value
glSetAngleZ(value); set the angle Z to value
glAddToAngleX(value); Add the angle X by value
glAddToAngleZ(value); Add the angle Z by value
glAddToAngleY(value); Add the angle Y by value
glObjectAction(Object ID, action, value); Preform an object action
glCallObject(object ID); Call object to be rendered
glBeginRender(); Begin render
glFinishRender(); Clear screen, rotate objects, finish render
More NXC Commands Guide
My PSP-Nx 3D
This is a program that uses GL and the PSP controller to operate:
[also includes example GL programs, and PSP-Nx 3D demo]
video coming soon!
gl.zip
UPDATE 1
(2.54 KiB) Downloaded 451 times
Last edited by dudmaster on 27 Dec 2010, 00:47, edited 1 time in total.
2Labz.com, My Website
enzymex
Posts: 2
Joined: 24 Dec 2010, 01:30

Re: NXC GL

Post by enzymex »

Wow, very impressive. I’ve never encountered 3D programming on the NXT, so this was an eye-opener. Thank you very much for sharing, it is definitely appreciated.
dudmaster
Posts: 171
Joined: 06 Oct 2010, 02:38
Location: Texas, Santa Fe
Contact:

Re: NXC GL

Post by dudmaster »

Your welcome. It is a great way to do graphics.
2Labz.com, My Website
dudmaster
Posts: 171
Joined: 06 Oct 2010, 02:38
Location: Texas, Santa Fe
Contact:

Re: NXC GL

Post by dudmaster »

AND- download the new version. It is an update to PSP-Nx 3D.
2Labz.com, My Website
nxtboyiii
Posts: 366
Joined: 02 Oct 2010, 07:08
Location: Everywhere

Re: NXC GL

Post by nxtboyiii »

The glPyramid is glPyramid(int glMode, int glSizeX, int glSizeY, int glSizeZ); Input the size of the X, Y, and Z axis of the pyramid. Creates a pyramid.
Thanks, and have a nice day,
nxtboy III

programnxt.com
dudmaster
Posts: 171
Joined: 06 Oct 2010, 02:38
Location: Texas, Santa Fe
Contact:

Re: NXC GL

Post by dudmaster »

Yes, i have already tried that. I forgot what it did. I think it gave me a "File Error" It gave me an error in NXTDefs.h
2Labz.com, My Website
stryker001
Posts: 125
Joined: 29 Sep 2010, 18:07
Contact:

Re: NXC GL

Post by stryker001 »

I could use some help, I'm getting errors when I use the glObjectAction(0, GL_ROTATE_OBJECT...) function (SCALE and TRANSLATE work, but ROTATE crashes the NXT....)
dudmaster
Posts: 171
Joined: 06 Oct 2010, 02:38
Location: Texas, Santa Fe
Contact:

Re: NXC GL

Post by dudmaster »

Really? I never tried the ROTATE command... :?
2Labz.com, My Website
stryker001
Posts: 125
Joined: 29 Sep 2010, 18:07
Contact:

Re: NXC GL

Post by stryker001 »

yes really.
dimasterooo
Posts: 135
Joined: 29 Apr 2011, 21:53
Contact:

Re: NXC GL

Post by dimasterooo »

Hey idk/ don't have NXC, so I can't try it :(. Could someone upload a video of it, cuz it sounds really cool :)
- Leon Overweel (aka. dimastero/ dimasterooo)

My blog: http://www.leonoverweel.com
Twitter: http://twitter.com/LayOn_OverWhale
Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests