Is 3D limited to triangles? Any other traps to trip me up?

Previous topic - Next topic

mars_chaos89

tq for your help....i try to copy down the coding and download the library file...
but when i try to compile the program there is some error which i dont know how to fix it....

"3d viewer v3(objfile).gbas"(52) error : wrong argument type : TYPE OBJModel is not declared

or maybe i havent call the library yet.how to call the library?..i just put it in the same folder as the project...

Slydog

Did you add the library to your project?
(Right click in the 'File' pane and select 'Add' and browse to the library file).
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

mars_chaos89

i tried adding the library put this message popup saying that "loadobj.gbal is glbasic library that cannot be edited"...



Slydog

Did you try compiling again since you tried adding the library?
I think that was just a warning that you can't edit a library file, but it was still added.

Here's the help file info on this:  (but "open file" I think is wrong, and it should says "Add File")

QuoteIf you want to have multiple source files for your program, open your project in the editor and click on the "files" tab at the bottom of the right pane.
Right click it in the right hand pane, and select either "New file" to create a new file for your project, or "open file" to include an existing file.

GLBasic library files (.gbal) can also be added in this way.
My current project (WIP) :: TwistedMaze <<  [Updated: 2015-11-25]

mars_chaos89

it is added...the error popup not when i add the file but it happen when i try to build it...

Cliff3D

Quote from: mars_chaos89 on 2010-Sep-17
it is added...the error popup not when i add the file but it happen when i try to build it...


....? I'm on tinterhooks here!

mars_chaos89

or maybe i added it wrongly here...next time i upload the snapshot for you guys to see it...

Cliff3D

Here - in the animation attached - I have created a new project and pasted in the main part to MarsOBJ ;)

If you try building that, the build will fail :(

However, if you switch to the "Files" tab and right-click to bring up a context-menu, you can select "Add File". Add the LoadOBJ GLBasic library that I provided - as shown - and then try compiling. You will get a couple of warnings:

Code (glbasic) Select
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.8.044 SN:1fd6eb1b - 2D, WIN32
"MarsOBJ.gbas"(0) warning : note : TYPE OBJModel is not declared

"MarsOBJ.gbas"(0) warning : note : TYPE OBJModel is not declared

"MarsOBJ.gbas"(41) warning : Demo mode: This command would require "GLBasic SDK premium"  : X_OBJSTART


which are a GLBasic issue (which will hopefully be resolved soon) but the build will complete, and you can run the program :D


mars_chaos89

i try to compile it again...but it's still happen....huhuu :(

[attachment deleted by admin]


mars_chaos89

i try to upload it again

[attachment deleted by admin]

Cliff3D

Ah! Well that central "cannot be edited" message is reasonable and not something to worry about. That syntax error mentioned in the debug window though (line 74?). That's odd. Sadly, my code has changed significantly since then so it would be effectively impossible for me to track down why it might be giving that error for that line. Curious indeed :(

Your best bet is probably to try and push forward with the *.ddd format for your model, as that is the format directly supported by GLBasic. One thing to bear in mind - tick the "1 Frame" tick box in the 3D file converter.

Cliff3D

Quote from: mars_chaos89 on 2010-Sep-20
tq cliff.... :good:

or maybe i can give the file that i downlaod from you...maybe u can see what is the problem...

I would appreciate it if you would remove that attachment, as I have from my post. In any case it is an uneditable GLBasic library files - you can't edit it, I can't edit it, it isn't editable. I can't see what's on line 74!!!