Welcome, Guest |
You have to register before you can post on our site.
|
Latest Threads |
another variation of "10 ...
Forum: Programs
Last Post: JRace
9 hours ago
» Replies: 35
» Views: 513
|
QBJS v0.9.0 - Release
Forum: QBJS, BAM, and Other BASICs
Last Post: hsiangch_ong
11 hours ago
» Replies: 8
» Views: 77
|
Extended KotD #22: _MOUSE...
Forum: Keyword of the Day!
Last Post: SMcNeill
11 hours ago
» Replies: 0
» Views: 40
|
micro(A)v11
Forum: QBJS, BAM, and Other BASICs
Last Post: aurel
Yesterday, 09:10 PM
» Replies: 111
» Views: 5,572
|
QB64PE v4.0 is now live!!
Forum: Announcements
Last Post: Kernelpanic
Yesterday, 04:08 PM
» Replies: 44
» Views: 2,224
|
Next small EQ step - EQ D...
Forum: Petr
Last Post: Petr
Yesterday, 02:52 PM
» Replies: 11
» Views: 595
|
Chr$(135) and _Keyhit
Forum: Help Me!
Last Post: SMcNeill
Yesterday, 02:29 PM
» Replies: 3
» Views: 53
|
New QBJS Samples Site
Forum: QBJS, BAM, and Other BASICs
Last Post: DANILIN
Yesterday, 12:55 PM
» Replies: 32
» Views: 1,259
|
Might not be able to be o...
Forum: Announcements
Last Post: Pete
Yesterday, 03:26 AM
» Replies: 0
» Views: 30
|
Aloha from Maui guys.
Forum: General Discussion
Last Post: Pete
Yesterday, 03:00 AM
» Replies: 13
» Views: 296
|
|
|
Simple 3D morphing with _MAPTRIANGLE |
Posted by: RokCoder - 01-10-2023, 11:41 PM - Forum: Programs
- Replies (6)
|
|
I went on a complete tangent from what I was intending to do this evening when I stumbled upon _MAPTRIANGLE!
First this project creates the vertices of a cube - but it does this based on a hard-coded TESSELATION constant. If this is set to one then each face of the cube has four vertices, if it's set to two then each face has nine vertices, 16 vertices for a value of 4, etc.
The reason for allowing the tessellation is that the project continually morphs between a cube and a sphere (while rotating on three axes). The higher the tessellation value, the better the quality of the sphere but also the greater the number of vertices, calculations, triangles to render, etc. I wanted the code to be clear and well commented so it isn't optimised at all (which is why I've set the tessellation value quite low).
The ZIP file containing the project and its assets is attached. As always, you can also find the code over at my GitHub.
morph.zip (Size: 419.28 KB / Downloads: 58)
On a side note, does anyone know if _CLOCKWISE and _ANTICLOCKWISE actually do anything at the moment in _MAPTRIANGLE? I tried using it to do the back-face culling but it didn't seem to have any effect so I ended up using cross-products for the culling.
On a second side note, is there any command for altering the brightness while rendering? I had a brief go with _SETALPHA for each triangle being rendered but (a) it didn't seem to affect _MAPTRIANGLE and (b) the performance impact was horrendous.
|
|
|
_MAPTRIANGLE face culling |
Posted by: RokCoder - 01-10-2023, 07:29 PM - Forum: Help Me!
- No Replies
|
|
I stumbled on _MAPTRIANGLE and thought I'd take it out for a spin. It's got me wondering whether _CLOCKWISE/_ANTICLOCKWISE are implemented?
Unless I'm reading it wrong, they should allow automatic back face culling but I'm finding that, with a test triangle, I can apply the coordinates in any order and it will render regardless of whether I add _CLOCKWISE or _ANTICLOCKWISE.
Any insights on this?
|
|
|
setSlash$ |
Posted by: SMcNeill - 01-10-2023, 06:45 PM - Forum: SMcNeill
- No Replies
|
|
One function to set the direction of your slashes for the proper OS. It's just that simple.
Code: (Select All) foo$ = "./mydir/foo.txt"
Print foo$
Print setSlash$(foo$)
foo2$ = ".\mydir\foo.txt"
Print foo2$
Print setSlash$(foo2$)
foo3$ = "./mydir\foo.txt"
Print foo3$
Print setSlash$(foo3$)
Function setSlash$ (text$)
temp$ = text$
$If WIN Then
desiredSlash$ = "\"
badSlash$ = "/"
$Else
desiredSlash$ ="/"
badSlash$ = "\"
$End If
Do
p = InStr(temp$, badSlash$)
If p Then Mid$(temp$, p, 1) = desiredSlash$
Loop Until p <= 0
setSlash$ = temp$
End Function
|
|
|
Backslash versus foreslash |
Posted by: TerryRitchie - 01-10-2023, 05:40 PM - Forum: General Discussion
- Replies (17)
|
|
I was under the impression that at some point QB64 had the ability added to change the backslash character in path strings to foreslashes if it detected it was running within Linux.
For example, this line of code:
MySprite& = _LOADIMAGE(".\assets\sprite.png", 32)
would be seen as
MySprite& = _LOADIMAGE("./assets/sprite.png", 32)
when running in Linux. Was or is this still the case or is my age showing again?
I really need to get another Linux box up and running so I can test these things out.
|
|
|
3.5.0 can't compile on my iMac |
Posted by: Fifi - 01-10-2023, 01:50 AM - Forum: General Discussion
- Replies (3)
|
|
Hello,
Unfortunately, the last version 3.5.0 doesn't compile on my iMac 27 under macOS High Sierra.
I get the following error message:
Code: (Select All) c++ -w -std=gnu++11 -I./internal/c/libqb/include -I./internal/c/parts/core/src/ -I./internal/c/parts/core/glew/include/ -DDEPENDENCY_SOCKETS -DDEPENDENCY_NO_PRINTER -DDEPENDENCY_ICON -DDEPENDENCY_NO_SCREENIMAGE -DDEPENDENCY_LOADFONT internal/c/libqb/src/http.cpp -c -o internal/c/libqb/src/http.o
Code: (Select All) internal/c/libqb/src/http.cpp:98:51: error: use of undeclared identifier 'CURLINFO_CONTENT_LENGTH_DOWNLOAD_T'; did you mean
Code: (Select All) 'CURLINFO_CONTENT_LENGTH_DOWNLOAD'?
Code: (Select All) CURLcode res = curl_easy_getinfo(handle->con, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T, &cl);
Code: (Select All) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Code: (Select All) CURLINFO_CONTENT_LENGTH_DOWNLOAD
Code: (Select All) /usr/include/curl/curl.h:2546:69: note: expanded from macro 'curl_easy_getinfo'
Code: (Select All) #define curl_easy_getinfo(handle,info,arg) curl_easy_getinfo(handle,info,arg)
Code: (Select All) /usr/include/curl/curl.h:2274:3: note: 'CURLINFO_CONTENT_LENGTH_DOWNLOAD' declared here
Code: (Select All) CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15,
Code: (Select All) 1 error generated.
Code: (Select All) make: *** [internal/c/libqb/src/http.o] Error 1
Code: (Select All) make: *** Waiting for unfinished jobs....
Code: (Select All) Compilation of QB64-PE failed!
logout
Saving session...
...copying shared history...
...saving history...truncating history files...
...completed.
[Opération terminée]
And before you ask, yes curl is installed on my system as shown bellow:
Code: (Select All) LLast login: Tue Jan 10 02:37:43 on ttys001
Code: (Select All) i-Mac-27:~ Philippe$ curl -V
Code: (Select All) curl 7.87.0 (x86_64-apple-darwin17.7.0) libcurl/7.87.0 (SecureTransport) OpenSSL/1.1.1s zlib/1.2.11 brotli/1.0.9 zstd/1.5.2 libidn2/2.3.4 libssh2/1.10.0 nghttp2/1.51.0 librtmp/2.3
Code: (Select All) Release-Date: 2022-12-21
Code: (Select All) Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
Code: (Select All) Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM NTLM_WB SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
Code: (Select All) i-Mac-27:~ Philippe$
Any idea what is wrong?
TIA for your help.
Cheers.
Fifi
Note: I didn't modify nor remove any file of the complete QB64PE 4.5.1 project.
|
|
|
IDE' mouse problem with 3.4.1 on macOS |
Posted by: Fifi - 01-09-2023, 08:00 AM - Forum: General Discussion
- Replies (8)
|
|
Hello,
The third mouse button (scrolling the content back and forth) doesn't work at all on the IDE under macOS.
Is there a fix planned soon since this problem was already reported long time ago and that without this capability, the IDE is almost unusable on a Mac.
TIA for news about that.
Cheers.
Fifi
|
|
|
<Solved> QB64PE 4.3.1 can't compile itself anymore. |
Posted by: Fifi - 01-09-2023, 04:32 AM - Forum: General Discussion
- Replies (2)
|
|
Hello,
when loading qb64pe.bas into QB64PE 3.4.1, there is an error message in the IDE saying :
Name already in use (DECLARE) on line 3911 (click here or Ctrl+Shift+G to jump there)
caused by (or after): A$ = "Expected SUB/FUNCTION definition or END", 39 DECLARE " : GoTo errmess",13
Can anyone help me to fix that?
TIA for your help.
Cheers.
Fifi
|
|
|
|