Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed some errors #35

Merged
merged 2 commits into from
Dec 1, 2024
Merged

Fixed some errors #35

merged 2 commits into from
Dec 1, 2024

Conversation

sudokit
Copy link
Contributor

@sudokit sudokit commented Dec 1, 2024

Fixed the following errors:

 777: // NOTE: Shader functionality is not available on OpenGL 1.1
 778: fn Shader loadShader(ZString vsFileName, ZString fsFileName) @extern("LoadShader");          // Load shader from |
 779: fn Shader loadShaderFromMemory(ZString vs, ZString fs) @extern("LoadShaderFromMemory");      // Load shader from |
 780: fn bool isShaderValid(Shader shader) @extern("IsShaderReady") @extern("IsShaderValid");       // Check if a shade|
                                                                    ^^^^^^^
(C:/Users/sudokit/Documents/Projects/test/lib/raylib55.c3l/raylib.c3i:780:63) Error: Repeat of attribute '@extern' here.

1565: // Get integer value from text (negative values not supported)
1566: fn int textToInteger(ZString text) @extern("TextToInteger");
1567: // Get float value from text (negative values not supported)
1568: fn float TextToFloat(ZString text);
               ^^^^^^^^^^^
(C:/Users/sudokit/Documents/Projects/test/lib/raylib55.c3l/raylib.c3i:1568:10) Error: A function name must start with lower case, as names starting with upper case are reserved for types.

@@ -1565,7 +1565,7 @@ fn ZString textToCamel(ZString text) @extern("TextToCamel");
// Get integer value from text (negative values not supported)
fn int textToInteger(ZString text) @extern("TextToInteger");
// Get float value from text (negative values not supported)
fn float TextToFloat(ZString text);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks wrong, must @extern("TextToFloat") with that one.

@@ -777,7 +777,7 @@ fn void unloadVrStereoConfig(VrStereoConfig config) @extern("UnloadVrStereoConfi
// NOTE: Shader functionality is not available on OpenGL 1.1
fn Shader loadShader(ZString vsFileName, ZString fsFileName) @extern("LoadShader"); // Load shader from files and bind default locations
fn Shader loadShaderFromMemory(ZString vs, ZString fs) @extern("LoadShaderFromMemory"); // Load shader from code strings and bind default locations
fn bool isShaderValid(Shader shader) @extern("IsShaderReady") @extern("IsShaderValid"); // Check if a shader is ready
fn bool isShaderValid(Shader shader) @extern("IsShaderReady"); // Check if a shader is ready
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be

fn bool isShaderValid(Shader shader) @extern("IsShaderValid");  // Check if a shader is valid (loaded on GPU)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes hehe... sorry just fixed quickly didnt think much ab it :p

Fixed some my blatant mistakes and more c3c build --test errors
@lerno
Copy link
Contributor

lerno commented Dec 1, 2024

Thank you!

@lerno lerno merged commit e8447a1 into c3lang:main Dec 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants