Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Cliff3D

Pages: [1] 2
1
Hi - after a long time away I'm trying to return to GLBasic. Finding version 8.078 to be a little flaky/intermittent on Windows 10 64 bit I thought I'd update to a newer version - 14.001 specifically.

Now, not unexpectedly, I am finding that there have been changes between version 8 and version 14 (no, it's true!) and on trying to recompile my pretty small program I am getting a bunch of warnings and a fatally uncompiled program. Since at the end it says:

*** FATAL ERROR - Please post this output in the forum

I thought I'd try and post an edited version of the warnings and ask for help. So, I get something very much like...


_______________________________________
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.10.037 SN:30a82950 - 2D, WIN32
"ReadOBJ.gbas"(156) warning : GPC1003 Demo mode: This command would require "GLBasic SDK premium"  : X_OBJSTART
Wordcount:715 commands
compiling:
In file included from C:\Users\cliff\AppData\Local\Temp\glbasic\gpc_tempg.cpp:2:
C:\Users\cliff\AppData\Local\Temp\glbasic\gpc_temp.h: In member function `virtual void __GLBASIC__::Facet3D::dbg() const':
C:\Users\cliff\AppData\Local\Temp\glbasic\gpc_temp.h:78: error: ambiguous overload for 'operator+' in 'DGStr(((const char*)"VIndex:")) + ((const __GLBASIC__::Facet3D*)this)->__GLBASIC__::Facet3D::VIndex'
Q:/Compiler/platform/Include/glb.h:278: note: candidates are: __GLBASIC__::DGStr __GLBASIC__::operator+(int, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int64) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, float) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, double) <near match>
C:\Users\cliff\AppData\Local\Temp\glbasic\gpc_temp.h:79: error: ambiguous overload for 'operator+' in 'DGStr(((const char*)"VTIndex:")) + ((const __GLBASIC__::Facet3D*)this)->__GLBASIC__::Facet3D::VTIndex'

and so on and so forth

Q:/Compiler/platform/Include/glb.h:278: note: candidates are: __GLBASIC__::DGStr __GLBASIC__::operator+(int, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int64) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, float) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, double) <near match>
C:\Users\cliff\AppData\Local\Temp\glbasic\gpc_temp.h:566: error: ambiguous overload for 'operator+' in 'DGStr(((const char*)"smoothgroup_Str:")) + ((const __GLBASIC__::OBJModel*)this)->__GLBASIC__::OBJModel::smoothgroup_Str'
Q:/Compiler/platform/Include/glb.h:278: note: candidates are: __GLBASIC__::DGStr __GLBASIC__::operator+(int, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int64) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, float) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, double) <near match>
C:\Users\cliff\AppData\Local\Temp\glbasic\gpc_temp.h:574: error: ambiguous overload for 'operator+' in 'DGStr(((const char*)"Bitmap_Str:")) + ((const __GLBASIC__::OBJModel*)this)->__GLBASIC__::OBJModel::Bitmap_Str'
Q:/Compiler/platform/Include/glb.h:278: note: candidates are: __GLBASIC__::DGStr __GLBASIC__::operator+(int, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(int64, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(float, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(double, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, const __GLBASIC__::DGStr&) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, int64) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, float) <near match>
Q:/Compiler/platform/Include/glb.h:278: note:                 __GLBASIC__::DGStr __GLBASIC__::operator+(const __GLBASIC__::DGStr&, double) <near match>
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 8.4 sec. Time: 11:52
Build: 0 succeeded.
*** 1 FAILED ***


Although my project includes two source files, without references to which source file and/or what line I'm currently stumped. Any suggestions to speed me on my way?

Cheers,

Cliff3D

2
These old eyes of mine aren't what they once were, and I'd really like to be able to increase the font size and have the printout reformatted - do I have to print my listings using somehting else to achieve this, or is there A Way to get GLBasic to format my pages with larger text?

Thanks :)

3
While looking for a command to help sharpen up PolyVector, I noticed ZoomSprite would probably do what my ResizeSprite function did, but presumably faster and (I hoped) POSSIBLY sharper. But if I feed this code:

Code: (glbasic) [Select]
LOADSPRITE "Checker.png", 1
CREATESCREEN 0, 2, 512, 512 // create temporary workscreen of desired resolution
USESCREEN 0
ZOOMSPRITE 1, 0, 0, 2, 2
SAVESPRITE "resized.png",2
USESCREEN -1

the same 256 * 256 bitmap that I fed ResizeSprite, I get a 384 * 384 image on a 512 * 512 bitmao, not a 512 * 512 image on a 512 * 512 bitmap. What am I doing wrong, please?



[attachment deleted by admin]

4
I would like to use something like PolyVector to resize/reshape sprites without getting the blur effect that otherwise smoothes the sprite/bitmap out on my machine. As a crude example, take this code to resize a sprite "Checker.Png":

Code: (glbasic) [Select]
main:
LOADSPRITE "Checker.png", 1
ResizeSprite(1, 2, 512, 512)
SAVESPRITE "Blurry.png",2
END

// ------------------------------------------------------------- //
// ---  RESIZESPRITE  ---
// ------------------------------------------------------------- //
FUNCTION ResizeSprite: SourceSprite%, TargetSprite%, destWidth%, destHeight%
// Uses "virtual screen" 0
// These values are defined LOCAL:
// SourceSprite%,  TargetSprite%,  Width%,  Height%

LOCAL spritewidth%, spriteheight%
GETSPRITESIZE SourceSprite%, spritewidth%, spriteheight%

CREATESCREEN 0, TargetSprite%, destWidth%, destHeight% // create temporary workscreen of desired resolution

USESCREEN 0

//Copy sprite #0 to target sprite and stretch to fit
STARTPOLY SourceSprite% // Bitmap = No.SourceSprite%
  POLYVECTOR  0,   0,  0,  0, RGB(255, 255, 255) // top left
  POLYVECTOR   0, destHeight%-1,  0, spriteheight%-1, RGB (255, 255, 255) // bottom left
  POLYVECTOR destWidth%-1, destHeight%-1, spritewidth%-1, spriteheight%-1, RGB(255, 255, 255) // bottom right
  POLYVECTOR destWidth%-1,  0, spritewidth%-1,  0, RGB(  255, 255,   255) // top right
ENDPOLY

USESCREEN -1 // switch back to main screen
LOADSPRITE "", SourceSprite% // empty source sprite/release memory/resources
ENDFUNCTION // RESIZESPRITE

As you can see from the attached images, the result is slightly blurry - scaling up by more increases the blur factor quite a lot. I beleive this is the cause of some tiling issues in other posts lately.

I'm pretty confident that for just resizing a rectangular area there must be a simple solution, but I'd really like to use PolyVector simply because I relaly REALLY want to be able to resize/reshape random triangles. Any bright ideas? Is there a "set sharpness" function I can use somewhere to effectively turn blurring off?

[attachment deleted by admin]

5
Greetings and salutations.

If anyone cared to extract the .exe attached to a folder and put some .OBJ and other files (.mtl? textures? .jpgs?) in there and test it, I'd love to hear how you get on. Do .JPGs make it crash? Does it fail to texture some parts? Are there holes in the mesh? Whatever... it SHOULD handle .OBJ files with multiple texture sprites (the record so far is 24 for one .OBJ model), and should sortof handle ambient and diffuse materials by choosing the brightest setting (I can't see how to do ambient on a per-material basis rather than a lighting basis in GLB). No transparency or wireframe views yet. Quads are handled. I think that's about it...

It seems to be working pretty well here for the stage it's at, but I've been up too many hours now and need to go lie down! Looking forward to a complete lack of problems cropping up... :D

:D

[attachment deleted by admin]

6
As per the title, if I declare a type in library (or even just a second source) file I get warnings like:

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

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

"ReadOBJ.gbas"(136) warning : Demo mode: This command would require "GLBasic SDK premium"  : X_OBJSTART
Wordcount:472 commands
compiling:
IncrediBuild skips: ReadOBJ.gbas,

linking:
success

Even though the comiple completes and the program runs correctly, this is disconcerting - and I may overlook a "real" warning if those "false" warnings are there, not noticing a REAL problem :(

As you can see in the image below, the type IS declared... the main program relies heavily on it (it wouldn't work at all if the TYPE wasn't there)

I believe this is a "known issue", I just wanted to formerly report it.



[attachment deleted by admin]

7
This code compiles without any warning or error and runs (quite quickly!):

Code: (glbasic) [Select]
// --------------------------------- //
// Project: forNext
// Start: Thursday, September 16, 2010
// IDE Version: 8.085


// FREE-VERSION:
// Need Premium for Features:
// 3D Graphics
// Network Commands
// INLINE C/C+++ code

// SETCURRENTDIR("Media") // seperate media and binaries?

FOR temp% = 1 TO 3
NEXT

even though the variable "temp%" has not been declared/defined.

Add a line that uses the FOR...NEXT variable (temp%) outsid eof the loop though, like this:

Code: (glbasic) [Select]
FOR temp% = 1 TO 3
NEXT
DEBUG temp%

...and you get the standard "variable not declared" error when you try to compile:

Quote
*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.8.044 SN:1fd6eb1b - 2D, WIN32
"forNext.gbas"(17) warning : probably unassigned variable : temp
"forNext.gbas"(17) error : variable is not explicitly defined : temp

this isn't a critical error, but does seem rather odd to me that you can use a variable tha tisn't defined in some instances, but not in others :(

8
GLBasic - en / Polyvector confusion :(
« on: 2010-Sep-13 »
Hi - I'm trying to resize a random bitmap loaded into Sprite 0 to a known size - in this isntance, for testing, I have chosen a 640 * 480 screen to resize to.

If I resize a 950 * 950 .png using this code:

Code: (glbasic) [Select]
LOCAL spritewidth, spriteheight
LOADSPRITE "P4 woman texture.png", 0 // load texture to use into sprite #0
GETSPRITESIZE 0, spritewidth, spriteheight
DEBUG spritewidth+"\n"
DEBUG spriteheight+"\n"

//Copy sprite #0 to screen and stretch to fit
STARTPOLY 0 // Bitmap = No.0
  POLYVECTOR  0,   0,  0,  0, RGB(255, 255, 255) // top left
  POLYVECTOR   0, 479,  0, spriteheight-1, RGB (255, 255, 255) // bottom left
  POLYVECTOR 639, 479, spritewidth-1, spriteheight-1, RGB(255, 255, 255) // bottom right
  POLYVECTOR 639,  0, spritewidth-1,  0, RGB(  255, 255,   255) // top right
ENDPOLY
SHOWSCREEN
MOUSEWAIT

It all looks good, looks like it fills the window nicely without becoming too large or remaining too small. Yet using much the same code on a 2048 * 2048 .bmp:

Code: (glbasic) [Select]
LOCAL spritewidth, spriteheight
LOADSPRITE "tCube.bmp", 0 // load texture to use into sprite #0
GETSPRITESIZE 0, spritewidth, spriteheight
DEBUG spritewidth+"\n"
DEBUG spriteheight+"\n"

//Copy sprite #0 to screen and stretch to fit
STARTPOLY 0 // Bitmap = No.0
  POLYVECTOR  0,   0,  0,  0, RGB(255, 255, 255) // top left
  POLYVECTOR   0, 479,  0, spriteheight-1, RGB (255, 255, 255) // bottom left
  POLYVECTOR 639, 479, spritewidth-1, spriteheight-1, RGB(255, 255, 255) // bottom right
  POLYVECTOR 639,  0, spritewidth-1,  0, RGB(  255, 255,   255) // top right
ENDPOLY
SHOWSCREEN
MOUSEWAIT

Does not seem to resize at all, and I only get part of the bitmap shown on-screen. Any ideas?



Thanks :)

[attachment deleted by admin]

9
When you resize the GLBasic window width down, toolbars reposition automatically in order to fit on the screen. when you resize the window back up, the toolbars do not return to their original positions.

This is particularly noticeable when using "Restore" and "Maximise".

10
There's a square representing an unknown characte rin various tooltips. For example:





but not in others - for example, this one looks fine:


ALSO - in the File menu, the Paste shortcut is given as "Strg+V". I assume "Strg" means "Ctrl" in English? Cut and Copy are correct

EDIT the images are not showing up here, so here's some links if they don't show up for you either:

http://wiki.just-do-i-t.com/index.php?title=File:Toolbar_Debug_Mode.png
http://wiki.just-do-i-t.com/index.php?title=File:Toolbar_Stop.png
http://wiki.just-do-i-t.com/index.php?title=File:Toolbar_Sub.png

http://wiki.just-do-i-t.com/index.php?title=File:Toolbar_Func.png

11
So if there's no white space at the end of your program, just...


Code: (glbasic) [Select]
main:
code...
more code...
even more code...
END

before your subroutine, afterwards there will be:

Code: (glbasic) [Select]
main:
code...
more code...
even more code...
// ------------------------------------------------------------- //
// ---  MYSUBROUTINE  ---
// ------------------------------------------------------------- //
SUB ShowPlayField:



ENDSUB // MYSUBROUTINE


END

which fails to compile with this error:

*** Configuration: WIN32 ***
precompiling:
GPC - GLBasic Precompiler V.8.044 SN:1c15d767 - 2D, WIN32
"OneMore.gbas"(41) error : command not inside function or sub

12
As it says - basic "Help? What am I doing?" from the Help menu is greyed out when there's no file loaded!

13
GLBasic - en / Documentation?
« on: 2010-Sep-06 »
I have to agree with FutureCow's long-past comments that the documentation for GLBasic is not welcoming to me. I'm struggling to find things. While the community is great and has been pointing me in the right direction, I'd rather the information I want was easier to find.

As a typical and timely example, take my current frustration - multiple files. I've just fought my way into getting Multiple Sourc eFiles working because even the intern does not lead one by the hand to making it WORK - there seem to be missing steps and information.

I'd love to see a Wikki (maybe I have just missed that too?) which users could manage to extend and update the documentation :)

14
3D / Wavefront .OBJ support?
« on: 2010-Sep-02 »
I'd love native built-in support for WaveFront.OBJ support, with material libraries and multiple textures (using bmp, png, and jpeg). :D

15
music/sound / BEEP
« on: 2010-Sep-02 »
Is there a simple "Beep" or "Bleep" command? Nothing complicated like playing an orhestral-quality symphony, just a simple "Beep - I'm done!" noise that can be called from a single command?

If not - could we maybe have one?

Pages: [1] 2