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

Pages: 1 [2]
16
General / Re: Weird glew behaviour.
« on: February 06, 2014, 09:12:13 pm »
Happened to me to. And what I did was to download the latest version from the official site and compile it manually using the same compiler I use for SFML. I build it as a static library and made sure to define GLEW_STATIC in both the Glew project and the projects where I link to Glew. I replaced the the default libglew.a from the extlibs directory of SFML and compiled SFML again. When I linked the libraries to my project I made sure I first link to SFML's libraries and then the Glew library. Then I compiled my project again and voila, it worked :) NOTE: I was using Code::Blocks and MinGW GCC 4.8.1 and SFML was built as static. Building it as static decreased my total executable size :) If you build SFML as static, make sure to add the following libraries on your project (-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32) So that you won't get "Undefined reference.." But before you do all that make sure you have GLEW_STATIC in your project if the Glew library that you use is a static library and check to see if that helps or SFML_STATIC if you have static SFML libraries.

17
General / Re: Confused About Performance
« on: February 06, 2014, 06:31:44 pm »
Have you taken into consideration that Game Maker: Studio could be using Multithreading, GPU Computing (on supported hardware) and everything that allows it to compute faster (like SSE SIMD)? While your program it's just an infinite loop with unoptimized C++ code that uses just a single core of your CPU. I'm not an expert on the matter but keep in mind that Game Maker: Studio is a paid software which enables it's experienced dedicated programmers to exploit every bit of performance gain during run-time. And if it's scripting languages uses a JIT compiler (which I think it does) then the scripts become as fast as C++.

You just can't compare your app with a Game Maker: Studio app. It's not SFML's fault on performance since it's you that's writing the app and SFML just provides wrappers of the low level system functionality.

Just open a Game Maker: Studio app and see how many CPU cores it uses. If the application needs allot of processing power the I bet you'll see 100% CPU usage on your system (because it uses all the CPU cores) and then open your application (which must also do some intensive calculations) and check the CPU usage again and you'll see it doesn't go above 50% (because it uses only one CPU core).

18
Thank you Tank  :) Now it's much better with just Glew. (<500 Kb) I gave up on OpenGL Loader Generator and decide it's best to use Glew now.

19
Hi, I was wondering if It's possible to make SFML and SFGUI use OpenGL Loader Generator instead of SFML with Glew and SFGUI with GLee. My final executable size has a limit of 3 max 4 MB (UPX compressed) and those two add up about >1 MB which doesn't leave room for my other libraries. Also it's pointless to have two commonly combined projects that each use a library that does the same thing as the other. While OpenGL Loader Generator (from what I've read) is better and (from what I've seen) is smaller (about ~100 Kb).

I'm asking this because right now I'm not that much of an expert in OpenGL or know too much of SFML and SFGUI internal code design. So before I start changing code I wan't to know if it's possible, that way I won't hit my head to the wall only to find out it's not possible (or recommended).

I used Notedpad++ to run a global search in the source files of SFML and SFGUI and from what I've seen they  both use Glew and GLee only to check if some OpenGL extensions are available. I'm guessing that all I have to do is adapt the code to use OpenGL Loader Generator instead.

SFML uses Glew in:
D:\DevLibs\SFML-master\src\SFML\Graphics\GLCheck.cpp (5 hits)
  Line 111: void ensureGlewInit()
  Line 116:         GLenum status = glewInit();
  Line 117:         if (status == GLEW_OK)
  Line 123:             err() << "Failed to initialize GLEW, " << glewGetErrorString(status) << std::endl;
  Line 123:             err() << "Failed to initialize GLEW, " << glewGetErrorString(status) << std::endl;
D:\DevLibs\SFML-master\src\SFML\Graphics\GLCheck.hpp (3 hits)
  Line 32: #include <GL/glew.h>
  Line 65: /// \brief Make sure that GLEW is initialized
  Line 68: void ensureGlewInit();
D:\DevLibs\SFML-master\src\SFML\Graphics\RenderTarget.cpp (4 hits)
  Line 293:         // Make sure that GLEW is initialized
  Line 294:         priv::ensureGlewInit();
  Line 366:             if (GLEW_EXT_blend_func_separate)
  Line 374:             if (GLEW_EXT_blend_func_separate)
D:\DevLibs\SFML-master\src\SFML\Graphics\RenderTextureImplFBO.cpp (3 hits)
  Line 76:     // Make sure that GLEW is initialized
  Line 77:     priv::ensureGlewInit();
  Line 79:     return GLEW_EXT_framebuffer_object != 0;
D:\DevLibs\SFML-master\src\SFML\Graphics\Shader.cpp (6 hits)
  Line 430:     // Make sure that GLEW is initialized
  Line 431:     priv::ensureGlewInit();
  Line 433:     return GLEW_ARB_shading_language_100 &&
  Line 434:            GLEW_ARB_shader_objects       &&
  Line 435:            GLEW_ARB_vertex_shader        &&
  Line 436:            GLEW_ARB_fragment_shader;
D:\DevLibs\SFML-master\src\SFML\Graphics\Texture.cpp (3 hits)
  Line 533:     // Make sure that GLEW is initialized
  Line 534:     priv::ensureGlewInit();
  Line 536:     if (GLEW_ARB_texture_non_power_of_two)
 

SFGUI uses GLee in:
D:\DevLibs\SFGUI\src\SFGUI\Renderers\VertexBufferRenderer.cpp (8 hits)
  Line 1: // Needs to be included before GLee for NOMINMAX
  Line 5: #include <GLee.h>
  Line 30:    // with GLee or else it will report missing extensions sometimes.
  Line 33:    if( GLEE_ARB_vertex_buffer_object ) {
  Line 47:    if( GLEE_EXT_framebuffer_object || GLEE_ARB_framebuffer_object ) {
  Line 47:    if( GLEE_EXT_framebuffer_object || GLEE_ARB_framebuffer_object ) {
  Line 70:    // with GLee or else it will report missing extensions sometimes.
  Line 73:    if( GLEE_ARB_vertex_buffer_object ) {
 

So yeah, is it possible or not? I'm waiting for your replies :)

More about OpenGL Loader Generator: Performance advantages using OpenGL Loader Generator over GLEW?

20
SFML projects / Re: SFML Light System - Let There Be Light
« on: September 30, 2013, 09:57:19 am »
Erreur  4       error C2039: 'unbind' : n'est pas membre de 'sf::Shader'        C:\Users\Shacker\Documents\Visual Studio 2012\Projects\SFML TEST\SFML TEST\Source\LTBL\Light\LightSystem.cpp    732     1       SFML TEST
Erreur  3       error C2660: '
sf::Shader::bind' : la fonction ne prend pas 0 arguments  C:\Users\Shacker\Documents\Visual Studio 2012\Projects\SFML TEST\SFML TEST\Source\LTBL\Light\LightSystem.cpp    717     1       SFML TEST
Erreur  1       error C2660: '
sf::Texture::bind' : la fonction ne prend pas 0 arguments C:\Users\Shacker\Documents\Visual Studio 2012\Projects\SFML TEST\SFML TEST\Source\LTBL\Light\EmissiveLight.cpp  58      1       SFML TEST
Erreur  2       error C2660: '
sf::Texture::bind' : la fonction ne prend pas 0 arguments C:\Users\Shacker\Documents\Visual Studio 2012\Projects\SFML TEST\SFML TEST\Source\LTBL\Light\LightSystem.cpp    267     1       SFML TEST
Erreur  5       error C2660: '
sf::Texture::bind' : la fonction ne prend pas 0 arguments C:\Users\Shacker\Documents\Visual Studio 2012\Projects\SFML TEST\SFML TEST\Source\LTBL\Light\LightSystem.cpp    777     1       SFML TEST
Erreur  6       error C2660: '
sf::Texture::bind' : la fonction ne prend pas 0 arguments C:\Users\Shacker\Documents\Visual Studio 2012\Projects\SFML TEST\SFML TEST\Source\LTBL\Light\LightSystem.cpp    795     1       SFML TEST
Erreur  7       error C2660: '
sf::Texture::bind' : la fonction ne prend pas 0 arguments C:\Users\Shacker\Documents\Visual Studio 2012\Projects\SFML TEST\SFML TEST\Source\LTBL\Light\LightSystem.cpp    820     1       SFML TEST
Erreur  8       error C2660: '
sf::Texture::bind' : la fonction ne prend pas 0 arguments C:\Users\Shacker\Documents\Visual Studio 2012\Projects\SFML TEST\SFML TEST\Source\LTBL\Light\LightSystem.cpp    845     1       SFML TEST
Erreur  9       error C2660: '
sf::Texture::bind' : la fonction ne prend pas 0 arguments C:\Users\Shacker\Documents\Visual Studio 2012\Projects\SFML TEST\SFML TEST\Source\LTBL\Light\LightSystem.cpp    870     1       SFML TEST
Erreur  10      error C2660: '
sf::Texture::bind' : la fonction ne prend pas 0 arguments C:\Users\Shacker\Documents\Visual Studio 2012\Projects\SFML TEST\SFML TEST\Source\LTBL\Light\LightSystem.cpp    898     1       SFML TEST
Erreur  11      error C2660: '
sf::Texture::bind' : la fonction ne prend pas 0 arguments C:\Users\Shacker\Documents\Visual Studio 2012\Projects\SFML TEST\SFML TEST\Source\LTBL\Light\LightSystem.cpp    965     1       SFML TEST
Erreur  12      error C2660: '
sf::Texture::bind' : la fonction ne prend pas 0 arguments C:\Users\Shacker\Documents\Visual Studio 2012\Projects\SFML TEST\SFML TEST\Source\LTBL\Light\LightSystem.cpp    979     1       SFML TEST

Do you think everyone speaks your language to understand what the error says? Anyways read here

Quote from: 'Grey Wolf'
The function prototype dose not match the function definition

SFML API has changed and LTBL doesn't comply with the API so you must rewrite/update the LTBL code if you want to use it with the latest SFML version :)

Pages: 1 [2]
anything