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

Pages: [1]
1
General / Re: Weird glew behaviour.
« on: February 08, 2014, 09:31:42 pm »
Thanks for the suggestions I will try them again to see how it goes.  ;)

2
General / Weird glew behaviour.
« on: February 06, 2014, 08:43:37 pm »
Hi all, I have managed to setup a SFML application with opengl and glew and all working fine. One thing though is very odd.

This makes the application work fine.
GLenum glewStatus = glewInit();

But this however makes the application crash.
glewInit();

Currently I am using QT Creator with mingw on windows, I think I remember by using codeblocks (couple of weeks ago) that there was not such problem.

Any ideas about what it is?

3
Graphics / How to use OpenGL3?
« on: January 25, 2014, 06:28:11 pm »
Hello, I am using SFML to do some OpenGL programming.

Currently I want to access OpenGL 3 API and I get this error.
error: 'glGenBuffers' was not declared in this scope

I have downloaded SFML from github and built it myself, GLEW should be included in SFML right?

4
D / OpenGL Anyone?
« on: June 29, 2013, 10:47:06 pm »
Hi there, anyone attempted yet to use OpenGL4 with DSFML? Is there any wrapper recommended?

I found these, any recommendations?
https://github.com/Diggsey/OpenGL-D-Bindings
https://github.com/Dav1dde/glamour
https://github.com/aldacron/Derelict3

Also if you try something please let me know how you did it.  :)

5
D / Re: Candidate for new official DSFML
« on: June 15, 2013, 12:26:09 am »
Sure, glad to help.  :D




6
D / Re: Candidate for new official DSFML
« on: June 10, 2013, 07:36:46 pm »
Thanks a lot, this made things clear. I have made some tests myself to understand this concept better, I will post my results here.

This is the sample program I used (a cleaner and minified version of previous example):
import dsfml.graphics;

void main()
{
        auto window = new RenderWindow(VideoMode(800,600), "Hello DSFML!");
        auto circle = new CircleShape(10);
        circle.fillColor = Color.Red;
        circle.position = Vector2f(300,100);

        Event event;
       
        while(window.isOpen())
        {
                while(window.pollEvent(event))
                {
                        if(event.type == Event.Closed)
                        {
                                window.close();
                        }
                }
                window.clear(Color.Black);
                window.draw(circle);
                window.display();
        }
}
 

Before you begin to read you must know that:
  • I have extracted my library in the path D:\Development\Libraries\DSFML\
  • I have placed all of the binaries to a special folder that is registered to PATH environment variable.

Now for the compilation commands.

First Option: Is to link directly and straight to the DSFML library path.

Sample: ::)
dmd main.d D:\Development\Libraries\DSFML\dsfml\graphics.d D:\Development\Libraries\DSFML\dsfml\system.d D:\Development\Libraries\DSFML\dsfml\window.d  -ID:\Development\Libraries\DSFML\ -L+D:\Development\Libraries\DSFML\DSFMLLibs\ csfml-graphics.lib csfml-system.lib csfml-window.lib
 

Explanation:
dmd The compiler.

main.d The source code of your application.

D:\Development\Libraries\DSFML\dsfml\graphics.d
D:\Development\Libraries\DSFML\dsfml\system.d
D:\Development\Libraries\DSFML\dsfml\window.d
The source code of the DSFML library, this allows the code to be compiled, same as our application.

-ID:\Development\Libraries\DSFML The include path of the DSFML library, this allows import statements to work.


-L+D:\Development\Libraries\DSFML\DSFMLLibs\
This is the Optlink method, so we can set the linker path once and then link to libraries alone. Alternatively it may not be added, but then .lib files will need to use relative or absolute paths to be found.
I have removed space from this folder just to be sure dmd won't break paths and avoid using double quotes.

csfml-graphics.lib
csfml-system.lib
csfml-window.lib
No need to use paths here.

Second Option: Is to compile a static version of DSFML and link directly to the library path. Same as previous but now there is already a compiled version of DSFML.
Example:
dmd main.d -ID:\Development\Libraries\DSFML -L+D:\Development\Libraries\DSFML\DSFMLLibs\ csfml-system.lib csfml-window.lib csfml-graphics.lib dsfml.lib

Explanation:
dmd Compiler
main.d Source
-ID:\Development\Libraries\DSFML Include path to let import statements work
-L+D:\Development\Libraries\DSFML\DSFMLLibs\ Use Optlink to set linker path. It's very important to use slash/backslash in the end to indicate that this is a folder, do not forget it.

csfml-system.lib csfml-window.lib csfml-graphics.lib dsfml.lib
The libraries, note that I have placed dsfml.lib inside the DSFMLLibs folder.

Use any preffered method of compilation according to your needs.  :)

7
D / Re: Candidate for new official DSFML
« on: June 06, 2013, 05:21:54 pm »
Bad news is that there are not lots of tutorials for D, because this language just started getting popular and people currently jumping in. So any wiki or text will be helpful and always welcomed.



8
D / Re: Candidate for new official DSFML
« on: June 05, 2013, 02:01:27 pm »
This example made by esquinn.

The only thing that bothers me is the syntax of the command line.
dmd ...

Thanks for the help.


9
D / Re: Candidate for new official DSFML
« on: June 05, 2013, 03:55:04 am »
Hello there.

Nice wrapper, I think that this project rocks.

How do you compile this example application?

10
General / Re: How to use SFML with Codelite?
« on: May 21, 2013, 03:08:38 pm »
It seems that everything was OK.

I tested the console compile and linkage and everything was fine, the only problem was that the libstdc++-6.dll was colliding with GTK# (used by Monodevelop) distribution and I had to remove it from PATH.

Nevermind, since I don't like Visual Studio and Mingw giving me headaches all the time I will switch to Linux for real development. Downloading Linux Mint...  8)

11
General / How to use SFML with Codelite?
« on: May 20, 2013, 09:27:23 am »
I have started getting around SFML with Codelite, though Codeblocks is stable and more popular I somehow dislike it. Codelite on the other hand seems better, looks like more robust and slick.

I use Windows7 and Mingw.

However I wonder why I can't compile the tutorial application. In a similar fashion, have studied this tutorial to undestand how to setup a project, because a couple of months before I had used this game engine. http://softpixelengine.sourceforge.net/community/tutorial_codelite/tutorial_codelite.html

So in this case the correct values should be like this, for include path, linker path, libraries.
http://www.sfml-dev.org/tutorials/2.0/start-cb.php

Here is the compile log as it seems in the IDE, is it correct or it should be something else?
mingw32-make.exe[1]: Entering directory `D:/Development/SFMLTest'
g++ -o ./Debug/SFMLTest @"SFMLTest.txt" -L. -LD:/Development/Libraries/SFML-2.0/lib  -lsfml-graphics -lsfml-system -lsfml-window
./Debug/main.o: In function `main':

P.S. I have mingw32-make and g++ in PATH and are accessible from Command Prompt.

12
D / Directly build pong
« on: August 06, 2012, 05:04:07 am »
Hello I would like the command for building pong straight with DMD.

so far I got this
dmd pong.d -I../../../import

But I got some typedef errors...

Pages: [1]