Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - krisando

Pages: [1]
1
Graphics / RenderImage.Clear(...) issue
« on: July 10, 2011, 10:22:42 am »
I'm using the RenderImage class due to the surface like nature of it. Also am unsure whether this is a bug or misuse.

I create the image like so:
Code: [Select]
sf::RenderImage surface;
surface.Create(512, 512);


And believe the clear function can take:
sf::Color(255, 0, 0, 255)
sf::Color::Red
...

Red looks like a preset copy of the latter. You can see I'm testing this by making the image completely red.

Code: [Select]
surface.Clear(sf::Color(0, 255, 0, 255));
window.Draw(surface);


The result is a 512x512 black block.

Then I thought maybe it will clear the area in the view, not sure if the 2.0 documentation is outdated with this class but I tried this:

Code: [Select]
sf::View view;
view.Reset(sf::FloatRect(100, 100, 400, 200));

sf::RenderImage surface;
surface.SetView(surface);  //No function in class SetView()


Am I going about clearing the RenderImage with a specific colour?

Kris

2
Currently I am unaware of any method to load an image larger than the restrictions of the video card.

It may not be suitable for compatibility with many classes or maybe even performance wise, but it would be enough to extract the resources off, into much smaller images.

Since it is generally unsafe to load an image larger than 512x512, it would be great for compatibility during the loading stage. Many old and some Intel chips crash at any higher.

It would be an extremely beneficial feature. If only to allow you to copy sections of the image.

3
General / Getting SFML 2.0 to work in Linux
« on: April 19, 2011, 06:47:47 am »
I've just spent the last 12 hours getting all the dependencies for compiling the SFML 2.0 source, the libraries are build (hopefully ok).

After including the libraries and getting many undefined function error messages, so I included these libraries into the project:
Code: [Select]
/usr/lib64/libfreetype.so
/usr/lib64/libGLEW.so
/usr/lib64/libGL.so
/usr/lib64/libGLU.so
/usr/lib64/jpeg.so


Terminal gives a process returned -1, just from this line:
Code: [Select]
sf::RenderWindow window(sf::VideoMode(800, 600, 32), "Test");

No indication of what went wrong, I'm very uncertain of which includes are required, various flags and what not for the compiler. Or I wonder if the libraries are iffy.

I also noticed with this line uncommented:
Code: [Select]
while (window.GetEvent(event))
It gives: 283|error: ‘class sf::RenderWindow’ has no member named ‘GetEvent’|

So maybe the window class is iffy?

4
General / wxWidgets and SFML2 Issues
« on: April 15, 2011, 09:54:03 am »
I'm trying to get the wrapper for a SFML control to draw on a window by wxWidgets, but there seems to be some issues with the implementation, I'm not sure if SFML works in a different way (read it should work) but still I am at a loss.

I have followed this guide: http://www.sfml-dev.org/tutorials/1.6/graphics-wxwidgets.php

Code: [Select]
//Errors: invalid conversion from 'void*' to 'HWND__*'|
sf::RenderWindow::Create(GetHandle());
//So I do a pointer cast
sf::RenderWindow::Create((HWND__*)GetHandle());


//Try run it again, I get this: ||warning: c:/mingw/.../libgdi32.a(Window.cpp.obj): local symbol `' has no section|

Libgdi seems to be the problem, but I don't have the faintest clue how to fix this issue.

Btw I'm using Windows currently, any help on this issue would be much appreciated.

Pages: [1]
anything