Welcome, Guest |
You have to register before you can post on our site.
|
Latest Threads |
The QB64 IDE shell
Forum: Utilities
Last Post: JasonPag
09-16-2024, 05:37 PM
» Replies: 9
» Views: 762
|
Importance regarding Ches...
Forum: Utilities
Last Post: JasonPag
09-01-2024, 06:34 PM
» Replies: 0
» Views: 31
|
Chess and Analysis and En...
Forum: Utilities
Last Post: JasonPag
08-28-2024, 02:37 PM
» Replies: 0
» Views: 32
|
DAY 009:_PutImage
Forum: Keyword of the Day!
Last Post: grymmjack
09-02-2023, 02:57 PM
» Replies: 54
» Views: 2,034
|
Fall Banner Contest?
Forum: Site Suggestions
Last Post: grymmjack
08-31-2023, 11:50 PM
» Replies: 36
» Views: 1,261
|
ColorPicker - Function th...
Forum: Dav
Last Post: Dav
08-31-2023, 11:04 PM
» Replies: 3
» Views: 315
|
Goals(1) = New Tile()
Forum: Works in Progress
Last Post: RhoSigma
08-31-2023, 09:45 PM
» Replies: 3
» Views: 127
|
micro(A)v11
Forum: QBJS, BAM, and Other BASICs
Last Post: bplus
08-31-2023, 09:14 PM
» Replies: 90
» Views: 3,589
|
Updating The Single Most ...
Forum: QBJS, BAM, and Other BASICs
Last Post: bplus
08-31-2023, 09:13 PM
» Replies: 7
» Views: 254
|
QBJS Image Question
Forum: QBJS, BAM, and Other BASICs
Last Post: bplus
08-31-2023, 05:49 PM
» Replies: 5
» Views: 155
|
|
|
_OPENHOST to port 443 fails |
Posted by: jleger2023 - 01-14-2023, 03:08 AM - Forum: Help Me!
- Replies (9)
|
|
Hey all,
This is my first post here. I'm tinkering with QB64 to create a simple server. Listening on port 80 or port 8080 works just fine, but when I try to listen on port 443 it always returns 0 (fail). I've added port access to the Windows firewall and even tried disabling the firewall completely in case I'd done something wrong, but it still fails.
Here's my code. Any ideas? Thanks in advance.
Code: (Select All) Dim socketHost As Integer
Dim socketClients(1000) As Integer
Dim clientIndex As Integer
Dim socketClient As Integer
Dim socketData As String
socketHost = _OpenHost("TCP/IP:443")
If socketHost Then
Print "LISTENING @ " + _ConnectionAddress(socketHost)
Do
socketClient = _OpenConnection(socketHost)
If socketClient Then
socketClients(clientIndex) = socketClient
clientIndex = clientIndex + 1
End If
For i = 0 To clientIndex - 1
Get #socketClients(clientIndex), , socketData
Print socketData
Next
Loop
Close #socketHost
Else
Print "Failed to open socket to port 443."
End If
|
|
|
_WIDTH(_LOADIMAGE()) Ok? |
Posted by: TerryRitchie - 01-13-2023, 01:45 PM - Forum: Help Me!
- Replies (9)
|
|
I recently saw some code that did this:
ImageWidth = _WIDTH(_LOADIMAGE("Image.png", 32))
Will this leave the image's contents in RAM with no way of freeing it?
-or-
Will the image be discarded since the handle was not assigned to a variable?
It's a neat trick and one that I could happen to use on a current project but not if the image is orphaned in RAM.
|
|
|
What folder IDE defaults to, for opening files |
Posted by: bert22306 - 01-13-2023, 04:14 AM - Forum: General Discussion
- Replies (2)
|
|
Okay, I see that maybe this belonged in the general discussion area:
Is there any way to configure the IDE of v3.5.0 to open .bas files by default in the last folder you used? That, and using File Explorer, were my favorite improvements in 3.4.1.
Was there a deliberate decision to always open inside the qb64pe folder instead? I never store my programs there. Does anyone use that folder for their .bas files? Seems messy.
If there's an easy way to fix this, without having to wait for another complete version update, that would be great.
|
|
|
Upgrading from version to version |
Posted by: bobalooie - 01-13-2023, 02:34 AM - Forum: General Discussion
- Replies (3)
|
|
General question: When upgrading from one version to another (say 3.4 to 3.5), which files in the upgrade package are really essential to perform the upgrade? For instance, I see in the 3.5 package that all of the c folder has the same rev date as the rest of the package, but I would be surprised if the entire toolchain is upgraded.
|
|
|
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: 41)
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.
|
|
|
|