Skip to content

Rendering issue on win 7 #10

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

Closed
kylepink opened this issue Oct 25, 2013 · 19 comments
Closed

Rendering issue on win 7 #10

kylepink opened this issue Oct 25, 2013 · 19 comments

Comments

@kylepink
Copy link

Having issues with rendering on the windows 7 platform. The example provided which is supposed to draw a red cricle on a greenish-blue background just draws a black screen. Changing the colours used result in the same black screen. Although drawing the shape when a colour has not been assigned results in a white circle with a black background.

I have tried rsfml on two windows 7 machines, same result. I have also tried rsfml in Ubuntu (same machine), no problems and works as intended. I have tried the c++-sfml build on windows 7 (same machine), no problems and works as intended.

Not sure where this issues is coming from, thanks.

@jeremyletang
Copy link
Owner

Hi,

Sorry to answer so late,

Do you use a windows 7 32 bits or 64 bits? I don't use windows, but i tried rsfml on windows 7 64 bits few month ago, and it works.

I have no acces to a window os for the moment, but probably in the next week so i can try to find where is the problem.

@kylepink
Copy link
Author

kylepink commented Nov 1, 2013

Thanks for the reply.

I am using windows 7 64bit.

@jeremyletang
Copy link
Owner

And do you have any warning when you build the lib?

Your c++ sfml is in the last version?

@kylepink
Copy link
Author

kylepink commented Nov 2, 2013

I have tried using the pre-compiled builds and built from source. These were using version 2.1.

I did not see any build errors or warnings.

@JarrettBillingsley
Copy link

I'm having issues too.. I'm on Win7 x64. I built rsfml with the latest rust 0.9-pre, and compiled against the 32-bit sfml libraries. I then compiled the pong example producing a 32-bit EXE. When I run it, the sound works fine, the event handling works fine, and there are no errors logged to the console, but the graphics don't draw. The window.clear() seems to work as the window is filled with a dark red, but none of the game elements are visible. Screenshot: http://i.imgur.com/J8jQ04G.png

The sound example works fine.

@jeremyletang
Copy link
Owner

Hi,
i always have no windows (only mac 64bit and linux 64bit, and all work on these platforms) so i can't reproduce the bug. Have you try to produce an 64 bit exe? Why do you use the 32 bit library on an 64 bit Windows (maybe it's normal but i don't know very well windows.).

Have you a way to watch memory during execution (like valgrind) to see if there is any leak during execution due to a possible problem with 32bit / 64bit types?

@JarrettBillingsley
Copy link

It's still fairly common to use 32-bit toolchains on 64-bit Windows (especially with MinGW where the 64-bit stuff isn't completely mature). My rustc is 32-bit as well and I don't believe it can produce 64-bit executables..

Sadly valgrind also doesn't really work on MinGW so I guess I'm up a creek :\

@jeremyletang
Copy link
Owner

Okay. not really cool.

I suspect a memory problem with 32 / 64 bit but i have no 32 bit os for the moment.

I try to test on a 32 bit linux after my final terms next week, so i can use valgind and find any leak. Maybe it can solve the problem.

@ghost
Copy link

ghost commented Dec 29, 2013

That may be problem with rust:
rust-lang/rust#11198

@listless
Copy link

I can confirm I have the exact same issues as JarrettBillingsley, I'm also using win7 x64, 2.1 sfml and 2.1 csfml 32-bit libraries. The pong example showed a dark red screen, although sound works fine.
I compiled and ran the circle example on the readme and the program produced a black window with no errors in console http://i.imgur.com/gzIQecE.png
The sound example worked fine, but the shapes example produced a black screen and the sound recorder produced a compiler error:

The managed box syntax is being replaced by the std::gc::Gc and std::rc::Rc types. Equivalent functionality to managed trait objects will be implemented but is currently missing.
main.rs:48 Some(buf) => @buf,
main.rs:48:28: 48:32 note: add #[feature(managed_boxes)] to the crate attributes to enable
main.rs:48 Some(buf) => @buf,

@jeremyletang
Copy link
Owner

Hi,

According to the investigation made by @krzat, there is a problem with the byte code generate by llvm for the windows platform. You can see it's issue in the rust repository. he made a little patch which seems to work on windows.

For the sound recorder example, i've just not update it to remove the @pointers, i do it as soon as i can.

Tell me if you solve your problem with @krzat patch for llvm.

@listless
Copy link

Thanks Jeremy, couldn't run krzat's patch as windows LLVM binaries don't seem to include llc (also had trouble compiling LLVM from source with mingw32) so I ran krzat's program using clang instead and compiled the examples. Sadly the problem with pong displaying a dark-red screen persists, the shapes example also still produces a black screen.
Hopefully the problem will be fixed over at the rust repository, I'll try setting up rust and rsfml on a linux machine in the meanwhile

@ghost
Copy link

ghost commented Jan 22, 2014

so I ran krzat's program using clang instead and compiled the examples

I forgot to mention that in the post, but you should compile rsfml with this tool, not examples.

@kevinmorio
Copy link

Hi,
I'm trying to get rsfml working under Windows 8.1. I used rust master with the patch made by @krzat. Like @listless pointed out, you have to use clang on windows. I successfully builded the rsfml library with the patch, but the result is the same reported by @kylepink.

@jeremyletang
Copy link
Owner

Hi tryzor !

I think i can't help you... I'm really sorry but i don't use windows (only mac os x and fedora).
If the patch of @krzat don't work the only thing i can tell is try to use linux if you can.
Or wait for the llvm used by Rust was updated, maybe it can solve the bugs on windows...
I'm really sorry for this.

@kevinmorio
Copy link

I resolved the issue by compiling llvm with Visual Studio so I have the llc.exe used by @krzat's patch.
Everything works fine now.

@jeremyletang
Copy link
Owner

As rust-lang/rust#11198 is closed, it seems that this issue is solved, and there is probably no more problem to use rust-sfml on windows. So i close this issue.

@listless
Copy link

listless commented Apr 8, 2014

Happy to confirm that there no longer appears to be any problem running Rust-sfml on Windows using the newest version of Rust!
All examples are compiling and running perfectly!

@jeremyletang
Copy link
Owner

Ok @listless ! Thanks for the feedback !

crumblingstatue added a commit that referenced this issue Apr 7, 2015
Both rust-sfml/#10 and rust/#11198 were closed.
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

5 participants