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

Nothing rendering due to inablity to open files #21

Open
douwehw opened this issue Jan 30, 2025 · 3 comments
Open

Nothing rendering due to inablity to open files #21

douwehw opened this issue Jan 30, 2025 · 3 comments

Comments

@douwehw
Copy link

douwehw commented Jan 30, 2025

RT2D does not render anything on my local machine.

What did I do:
I cloned this repo, I built the project and I ran [start]. A window opens and it all seems well. But nothing is rendering.

Terminal output:
#######################
resourcemanager created
monitor: 1920x1080
Can't open shaders/sprite.vert
return new resource: shaders/sprite.vert_shaders/sprite.frag (shader)
Renderer using uberShader as fallback
Renderer::init() done
################ new Scene ################
Loading TGA: assets/square.tga
unable to open file
return new resource: assets/square.tga (texture)
return new resource: 0x0_0.50000x0.50000_1.00000x1.00000_0_-1 (mesh)

I think the issue starts with Can't open shaders/sprite.vert.
The same way shaders/sprite.vert can't be opened assets/square.tga also can't.

Any help would be appreciated!

@douwehw
Copy link
Author

douwehw commented Jan 30, 2025

There is a possibility that this issue is specific to my machine.
I have a project from February 2024, which also has this same problem, while it did not have this issue when I was developing this project back then.

Either way, I'm lost

@rktrlng
Copy link
Owner

rktrlng commented Jan 31, 2025

Hi @douwehw Thanks for raising this issue.
The compiled executable needs access to the assets, shaders and fonts directory. CMake copies those directories to the build directory when you do cmake ..
On MS Windows, the compiler places the executable in build/Release or build/Debug directory. To get it to work, copy those 3 directories in Release and/or Debug directory by hand.
I'll see what I can do to tell Cmake to do the right thing on Windows.
Thanks again!

@douwehw
Copy link
Author

douwehw commented Jan 31, 2025

Thanks! Will try this!

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

No branches or pull requests

2 participants