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 - PaloDeQueso

Pages: [1] 2
1
SFML projects / Sconrstruct
« on: March 10, 2011, 06:41:25 pm »
I just tried simply lettings scons build it, but it autoselected Visual C++ as the compiler, when I want to use MinGW. Is there a way to correct that?

2
SFML projects / hmm
« on: March 10, 2011, 06:37:25 pm »
Here's the steps I took in windows... linux works great!

- Installed Scons
- Modified the SFGUI Sconsscript just setting the codeblocks generator to 1
- Rand scons on SFGUI
- Opened the projects in code bocks
- Clicked compile

Here is my code::bocks output:
Quote

-------------- Build: Debug in SFGUI ---------------

Compiling: ..\..\src\Bin.cpp
CreateProcess(): The system cannot find the file specified.
Process terminated with status 123 (0 minutes, 0 seconds)
0 errors, 0 warnings

3
SFML projects / CMake
« on: March 10, 2011, 04:31:17 pm »
I dig Scons, and I LOVE python. But since your project is all in c++, have you considered switching to CMake? It has awesome support for project generation and I'm having trouble with the Code::Blocks Generator when compiling a windows version of your GUI.

PS: I hate you windows, I wish I could just support linux, but the game community frowns on that :(

PPS: I'm gonna write you some CMake files really quick and post them here once they're working!

4
SFML projects / FANTASTIC!
« on: March 09, 2011, 07:47:43 pm »
Dude...

Your library is a thing of beauty!
It is exactly what I was looking for!

I compiled, installed, linked it to my engine, looked at your sample, made a panel and a button and fed it events.

DONE.

Works like a charm.

PS: I love you (not really)

5
SFML projects / Many Thanks Sir!
« on: March 09, 2011, 06:11:53 pm »
Many Thanks Dude! I might be able to help soon. I'll keep you posted.

6
SFML projects / oh boy... just found this today.
« on: March 09, 2011, 04:10:57 pm »
A long time ago, whilst using SDL, I wrote a 2d gui which could render into an FBO... it was crappy and not really functional...

Recently I realized it's time to get a gui in my engine again as it's time to start making my map editor... FINALLY!

I put in a drop down console... that was fun.
So then I started writing a gui, which I find extremely daunting. So I searched and searched and found lots of opengl based guis, most of them using sdl or something else along with it, which I'd rather not clog up my engine with multiple toolkits...

Then I thought... well maybe someone wrote a gui for SFML...
BAM! here you are!

Just want to say, you have some amazing work... I bow to your code! I plan on using your gui on top of my 3d engine to make a level editor and the in game controls as well.

One question... is the git repo still up... if so, where is it?

Here's my site: http://www.palodequeso.net

7
Graphics / sorry
« on: March 01, 2011, 05:44:57 pm »
Sorry, I should have done more research. It seems a common method to accomplish this is to prerender text into a big texture just like bitmap fonts, and use texture coordinates to access it and build strings of characters. Thanks for your help! And thanks again for the great library!

8
Graphics / *bump*
« on: March 01, 2011, 05:31:20 pm »
Noone???

I'm about to use bitmap fonts again... yikes.

9
Graphics / SFML2 Rendering Text to GLTexture
« on: February 22, 2011, 04:34:06 pm »
What I am trying to accomplish is rendering text to a GLTexture to be used however I wish. What I would like to do, is create a single RenderImage to render any text into. Then somehow generate an OpenGL Texture ID from that.

So I have a "TextManager" in my engine...
I just started rewriting it from the SFML1.6 version so it's still very short and very simple and basically does nothing, hah. So I'll just post my code for it.

Declaration
Code: [Select]

class TextManager{
public:
TextManager(void);
void AddFont(std::string name, std::string font_path);
unsigned int DrawTextToTexture(std::string text, unsigned int font_size = 30, std::string font_name = "default");
private:
std::map<std::string, sf::Font *> fonts;
sf::RenderImage *render_image;
};


Definition
Code: [Select]

TextManager::TextManager(void){
AddFont("default", "Common/Fonts/Vera.ttf");
render_image = new sf::RenderImage();
// Do I Need This Next Line?!?
render_image->GetImage().CreateTexture(120, 38);
}

void TextManager::AddFont(std::string name, std::string font_path){
if (fonts.count(name) < 1){
sf::Font *font = new sf::Font();
font->LoadFromFile(font_path);
fonts[name] = font;
}
}

unsigned int TextManager::DrawTextToTexture(std::string text, unsigned int font_size, std::string font_name){
if (fonts.count(font_name) > 0){
sf::Text sf_text(text.c_str(), *fonts[font_name], text.size());
sf_text.SetCharacterSize(font_size);
sf_text.SetPosition(0.0f, 0.0f);
render_image->Draw(sf_text);
// WHAT DO I DO AFTER I DRAW IT?
      // Would I have to create a GL Texture every frame and release it? That seems crazy.
}
}


I have comments in there showing my dilemmas
Basically:
- When I create the RenderImage do I have to create a texture?
    - If so... can it resize itself to what I'm drawing inside of it?
- I have a texture manager which creates gl textures from sf::Images but that doesn't get done every frame, so I'm confused as to how to handle this code specifically.

One idea I had was to manage sf::Texts as well, and keep them in an associative array by IDs so they can be easily referenced and updated, and they would each have their own RenderImage, however I'd like to avoid this in favor or a simpler approach if I can.

Thoughts?
Thanks in advance!

10
Graphics / [SOLVED]
« on: February 22, 2011, 03:37:06 pm »
I fixed that last issue, sorry for the spam on the forum without proper debugging/coding practices. I love this library and thanks for all of the quick help!

11
Graphics / awesome...
« on: February 22, 2011, 03:16:53 pm »
Thanks for the tip...

On that note I decided to try using SFML2 again... unfortunately I'm stuck in winblows here at work, and am using MinGW.

- I compiled SFML2 from the latest snapshot.
- Copied the includes, libs, and bins to the mingw and system32 directories and removed the old libsfml files

now I'm getting this...

..\..\ElementGames\Engine\libegengine.a(Application.cpp.obj):Application.cpp:(.text+0x238): undefined reference to `_imp___ZN2sf12RenderWindowC1ENS_9VideoModeERKSsmRKNS_14WindowSettingsE'

But as far as I can tell, I'm not using WindowSettings anymore?

I'll grep through my code to double check... but I wanted to throw this one out there. It's something I didn't encounter last time I tried SFML2.

Here is my RenderWindow create line:
Code: [Select]
sfml_application = new sf::RenderWindow(sf::VideoMode(resolution_width, resolution_height), "ElementGamesTest", ((fullscreen) ? sf::Style::Fullscreen : sf::Style::Close));

12
Graphics / SFML 2 and FBOs?
« on: February 21, 2011, 10:41:30 pm »
I recently decided to update to SFML2 because of the RenderImage feature so I can finally render text to images once again. (Something I've missed from my SDL days) But as soon as I did, my FBOs are always rendering blank. NOTE: I didn't try to change anything, I just turned off all text features that I had before and recompiled my Engine with SFML2. Suddenly my deferred renderer is completely broken. Anyone else experience any issues with SFML 2 and FBOs?

13
General / Single Linker Error Left VS 2010
« on: December 20, 2010, 06:36:52 pm »
*face palm*

it compiles now...

Thanks for your patience. It doesn't run yet, but I'll figure it out.

Again... thanks!

14
General / Single Linker Error Left VS 2010
« on: December 20, 2010, 06:33:54 pm »
exactly as the tutorial for 1.6 told me to, by going into the project properties and going to Configuration Properties\C++\Preprocessor and adding SFML_DYNAMIC; to the beginning of the Preprocessor Definitions line. However, I just realized that I am using cmake and there are several projects in this "Solution". I am going to add the preprocessor definition to cmake and try that. One thing to note, I was adding SFML_DYNAMIC to the project in the solution that actually generates the exe. The other projects are just my own libraries that are being compiled.

15
General / Single Linker Error Left VS 2010
« on: December 20, 2010, 06:16:57 pm »
I definitely did that...
I have double checked and triple checked.

Pages: [1] 2
anything