Giter Club home page Giter Club logo

vraylib's Introduction

Typing SVG

Hi ๐Ÿ‘‹๐Ÿ‘‹

I am a Self-taught programmer with a strong passion for complex algorithms and exploring new technologies. Adept in C# and Python, with proficient knowledge of Go, Rust, Dart,and JavaScript/TypeScript. Continuously learning and curious about how things work, I'm always eager to try out new frameworks and technologies. Excited to collaborate and contribute to projects that challenge me to expand my skills and knowledge


My Skills

My Skills

Anurag's GitHub stats

vraylib's People

Contributors

mohamedlt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

timi5691

vraylib's Issues

error: field `mohamedlt.vraylib.RenderTexture2D.texture` is not public

///////////////// this is my code
module main

import mohamedlt.vraylib as raylib

fn main() {
raylib.init_window(640, 480, 'project test mohamedlt.vraylib'.str)

texture_pth := '/home/thanh/projects/vprojects/test/unit.png'
test_texture := raylib.load_texture(texture_pth.str)

mut render2 := raylib.load_render_texture(200, 200)

raylib.set_target_f_p_s(60)

for !raylib.window_should_close() {
	
	raylib.begin_texture_mode(render2)
		raylib.clear_background(raylib.black)
		raylib.draw_texture(test_texture, 190, 64, raylib.green)
		raylib.draw_text('ABCDEFGHJKL'.str, 190, 0, 16, raylib.green)
	raylib.end_texture_mode()

	raylib.begin_drawing()
	raylib.clear_background(raylib.white)

	source := raylib.Rectangle{0, 0, 200, -200}
	dest := raylib.Rectangle{200, 200, 200, 200}
	origin := raylib.Vector2{x: 100, y: 100}
	rot := f32(0)
	raylib.draw_texture_pro(render2.texture, source, dest, origin, rot, raylib.white)
	
	raylib.draw_text('hello world'.str, 10, 250, 16, raylib.black)
	raylib.end_drawing()
}
raylib.unload_texture(test_texture)
raylib.unload_render_texture(render2)
raylib.close_window()

}
/////////////////////////////////
after that, i edited the "raylib.c.v" file in folder "/home/thanh/.vmodules/mohamedlt/vraylib":
from this struct:
struct C.RenderTexture {
id u32
texture Texture
depth Texture
}

i changed it to:
struct C.RenderTexture {
pub:
id u32
texture Texture
depth Texture
}
then, i met this: "error: cannot use vraylib.Texture as vraylib.Texture2D in argument 1 to mohamedlt.vraylib.draw_texture_pro"

so, i change the above struct to:
struct C.RenderTexture {
pub:
id u32
texture Texture2D
depth Texture
}
finally, it works! i don't know if this is the right way to fix this or not? please help me!

error when tying to run example in README

project is v/examples/vraylib/main.v

running returns the error. Commenting out math returns errors because math is used. Not sure what to do

/home/USERNAME/.vmodules/mohamedlt/vraylib/raylib.c.v:3:8: warning: module 'math' is imported but never used
    1 | module vraylib
    2 | 
    3 | import math
      |        ~~~~
    4 | 
    5 | #flag linux -L @VMODROOT/lib/linux

redefinition of WINVER and Rectangle errors

compiling the example gives:

C:/Users/ben13/.vmodules/mohamedlt/vraylib/raylib.c.v:3:8: warning: module 'math' is imported but never used
1 | module vraylib
2 |
3 | import math
| ~~~~
4 |
5 | #flag linux -L @VMODROOT/lib/linux
C:/Users/ben13/AppData/Local/Temp/v_0/main.6930240050094114573.tmp.c:504: warning: WINVER redefined
In file included from C:/Users/ben13/AppData/Local/Temp/v_0/main.6930240050094114573.tmp.c:808:
C:/Users/ben13/.vmodules/mohamedlt/vraylib/include/raylib.h:237: error: incompatible redefinition of 'Rectangle'
builder error:

C error. This should never happen.

This is a compiler bug, please report it using v bug file.v.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.