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.


Messages - bullno1

Pages: 1 [2] 3 4 5
16
SFML projects / sfFlash - Flash UI for SFML
« on: April 09, 2010, 01:55:31 pm »
I'm glad that you can use it.

However, I still want to know what kind of error did you get since I don't think SFML version really makes a different. The public API of 1.x are quite similar.

Yes, since I embed the official flash engine through COM. It will only works under Windows.

I don't know how flash is implemented on Mac or Linux. But I believe a similar approach can be used.

Updated: The project is now located at: https://code.google.com/p/swfui/
License for SwfUI( flash embedding library) is LGPL since it is a fork of Hikari.
sfFlash(SFML renderer) will be licensed under zlib.

17
General / (HELP!) I am having problems setting up SFML with Codeblock
« on: April 09, 2010, 11:27:22 am »
Shouldn't you change your compiler setting to include SFML's headers instead of copying them?

I don't use Code::Block so I'm not sure but here should be a place where you can add compiler switches. Just add -I<path to SFML headers>

Quote
Ahh, you need to add the OpenGL libraries to your linker. In the same place in your IDE where you added the sfml-window.lib sfml-system.lib ect., try adding:

opengl32.lib
glu32.lib


Do this by adding -lopengl32.lib -lglu32.lib to your linker setting page.

18
SFML projects / sfFlash - Flash UI for SFML
« on: April 09, 2010, 11:05:45 am »
Strange, it compiles fine on my machine.

What compiler errors did you get?

I'm using SFML 1.7 (svn) but i don't think there's much difference in the interface. Anyway, I'm just inheriting from sf::Sprite for convenience and do the rendering in GDI + OpenGL.

You also need to have flash player installed to compile since I import the flash interface from registry. And I only tested it on MSVC 2008 Express.

19
SFML projects / sfFlash - Flash UI for SFML
« on: April 08, 2010, 02:23:46 pm »
This library enables you to embed any swf file as your GUI.

It is a free alternative to the pricey ScaleForm.

Here's a screenshot of the library in action:


You can play with the slider and the color picker.

The library consists of 2 part

SwfUI:
This is a fork of Hikari http://www.ogre3d.org/forums/viewtopic.php?t=41999 , a flash UI Library for Ogre .
I stripped away all the Ogre related part and replace them with abstractions.
I also follow SFML design goal and keep everything as simple as possible.

Feature:
-API independent. You can provide your own render API-specific implementation
-C++ can call action script functions. Action script can call C++ functions through a simple interface. Data types are transparently converted.
-Unicode support
-Automatic capture of keyboard input
-Dynamically load IShockwaveFlashObject from a .ocx file so client machine does not need to have flash installed.

sfFlash:
This is the SFML render implementation of SwfUI.

Feature:
-Deadly simple interface. This is how you load a control:
Code: [Select]

sf::FlashControl test(512,512);
test.load(L"controls.swf");
test.SetPosition(100.0f,200.0f);
test.SetRotation(45.0f);//Yes, your control still works even when it's rotated
test.setRenderQuality(SwfUI::RQ_AUTOHIGH);

And render it:
Code: [Select]
window.Draw(test);//window is of type sf::RenderWindow
-Efficient rendering through a dirty rectangle system.
-Automatic conversion between flash data types and SFML data types. Currently, only ActionScript colors (passed as floats) are converted to sf::Color.

Limitation:
-Windows only
-Performance is not good enough. Currently, i'm using glTexSubImage2D to update the texture. My crappy graphic card does not support PBO so I cannot provide a better implementation.

How SwfUI is implemented:
It is the similar to how Hikari did it:
Create a windowless OLE container. Put an IShockwaveFlashObject inside.
Everytime the control need to be redrawn, call OleDraw to draw the dirty part in my own DC.
Copy the dirty part to a separate buffer (make it contiguous) and call glTexSubImage2D to update the texture.
Events are sent using window messages.

TODO:
-A proper tutorial
-Better data sharing between C++ and flash (loading flash files from memory, send image from C++ to ActionScript...)
-Get rid of the annoying exceptions in flash.ocx

Help needed:
-Someone who can implement a better rending technique (through PBO?)
-Someone who is experienced in COM in general and flash COM interface.

Project page(with download links):
https://code.google.com/p/swfui/

20
General / Error When Closing Window
« on: March 11, 2009, 12:51:03 pm »
I got this error too. It traces back to SFML, the part where the default font is deleted.

When I use the static libraries, I got no more problem.

21
General / sfml download
« on: March 01, 2009, 12:51:13 pm »
Try clearing your cache. I think chrome cached a corrupted download

22
Audio / How to use an Object Manager with sf::Music? (NonCopyable)
« on: February 06, 2009, 02:01:17 pm »
Quote
const sf::Music MenuMusic=Resources.getMusic("FlatOut.ogg");

Change it to const sf::Music& MenuMusic=Resources.getMusic("FlatOut.ogg");

PS: Since you are returning a reference, you need to throw exception or return a dummy sound if the loading fails.

Quote
I still can't get into the habit of using the -> operator...i know i'm weird

SFML does that too.

23
General / Visual C++ Questions
« on: January 26, 2009, 04:24:13 pm »
Try to add this to your code:
system("echo %cd%");
It'll print out the working directory. You need to put your resources there.

Quote
The console says failed to load image and it's says something about fopen.

Can you post that "something" here?
I still think this is a path problem.

24
Window / Create your own events
« on: January 22, 2009, 01:42:32 pm »
No. GetEvent only returns built-in events.
However, you can create your own event system.

25
SFML projects / SPARK opensource particle engine with an SFML module
« on: December 21, 2008, 04:48:08 am »
This is cool.
I just realized that the particles are actually 3D. This can help to add a fake "depth" feeling to my 2D game.

How to change the rendering mode in you demos? Immediate mode is performing poorly for a large number of particle

Edit: You have a particle pool, nice. Some SFML particle examples I found just new and delete everywhere. They fragment memory like crazy

26
General discussions / Future and desired potential
« on: December 21, 2008, 02:50:36 am »
I think SDL and SFML has different goals.
SDL is "simple" in design. It is a thin wrapper layer over OS-specific functions.
SFML is "simple" in use. It uses C++ with clean OOP design and it's not just a wrapper, there are even methods to load different image formats, load HLSL shaders or music playback.

27
General / Problems building "Using CEGUI In SFML" tutorial c
« on: December 19, 2008, 03:19:17 am »
Quote from: "prchakal"
Now need only the tutorial to compile with mingw
ahaha

Mingw and MSVC are just compilers. CEGUI is cross-compiler and cross-platform. You can follow his instruction, just apply it to your compiler.
If you use an IDE like Code::Block or Eclipse, it's even easier, there are settings that are equivalent to Visual Studio.
If you use make, I remembered that -I is to add include directory, -L to add library directory, -l to link library.

Quote
For some reason, I couldn't get the executable running in VMware, so if someone could take a look and see if I am missing something, that would be great. Could be a VM thing, though, since it ran fine outside the VM.

Did you install the redist package of VC8 in your VM?

28
General / Problems building "Using CEGUI In SFML" tutorial c
« on: December 16, 2008, 05:39:58 am »
Quote
Well, actually I have learned quite a lot of basics. These are just some of the topics I have studied: Functions, control structures, file I/O, classes, inheritance, polymorphism, templates (both using and creating), operator overloading, search and sort algorithms, multiple inheritance, the STL, function pointers, functors, and the list goes on.

That's a lot. I think you just somehow overlooked some topics.

This looks like a CRT problem.
I think you're linking with the wrong version of CEGUI. If your program is in debug mode, link against debug version of CEGUI(those with _d) . In release mode, link against those without _d. Same thing goes for SFML.

29
General / Problems building "Using CEGUI In SFML" tutorial c
« on: December 15, 2008, 10:09:04 am »
Quote

Yeah, OK, I guess the right way is to #define CEGUI_STATIC every time I need to #include <cegui.h>, then. Seems a little cumbersome, though, but I guess I can live with that. I see now why I can't just #define CEGUI_STATIC at the top of main.cpp, because it might not get compiled before the file that has the #include <cegui.h> statement. Silly me...

Quote
Now, this HAS to be an error in the tutorial, because there is no #define SFML_DYNAMIC anywhere in the source files.


No, you don't do it in the source file, you do it in the compiler setting since it's a global definition. From what you're posting, I guess you're using Visual C++. The setting is in : C/C++->Preprocessor->Preprocesor definitions

Quote

The application failed to initialize properly (0xc0150002). Click on OK to terminate the application.

No idea, maybe it's a CRT problem. Make sure you link against the correct lib for your compiler. MSVC 2005 and MSVC 2008 libraries are sometimes incompatible. What are the messages in the debug console?

No offense but your C++ knowledge seems lacking. I suggest that you should learn the basic first, SFML examples look easy but creating a complete application is not that simple.

30
General / Problems building "Using CEGUI In SFML" tutorial c
« on: December 14, 2008, 03:12:48 pm »
Quote
I never used a library that needed any definitions or special setting up before, and I do not really feel too comfortable editing their source files, but maybe I should just get used to that? Is that normal practice?

No, the headers are not meant to be edited. It's normal for libraries to have "special definitions". SFML does that too (SFML_DYNAMIC). All those are stated in the docs or tutorial of the libraries.

Quote
I tried google'ing a couple of these, but I couldn't really understand what the problem is, or what to do about it. Maybe you know something? Smile

You need to link against freetype library to solve the rest of the errors. I think it's distributed along with CEGUI, in the dependency folder.

Quote
Turns out that, apart from defining CEGUI_STATIC, I had to add winmm.lib and OpenGL32.lib to the already long list of additional dependencies.

You are linking statically, that's why

Pages: 1 [2] 3 4 5
anything