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

Pages: [1] 2
1
General / glDrawArrays crash
« on: October 13, 2015, 04:38:18 pm »
My application keeps crashing with unhandled exception when I add glDrawArrays.

I have tried to glDisableClientState but it doesn't help

http://pastebin.com/GN5nxCwF

Is it something to do with SFML? I'm nearly sure OpenGL code is correct.

2
SFML projects / Re: SFGUI (0.2.3 released)
« on: April 23, 2015, 08:15:50 pm »
do you really expect being able to find binaries for all of them built with your compiler of choice?
Yes, I expect every quality library to provide binaries, this should be automated to a one click process on the creators side.

No offence but you sounded douchey.

3
SFML projects / Re: SFGUI (0.2.3 released)
« on: April 23, 2015, 06:49:09 pm »
Could someone provide binaries for visual studio 2013? Pretty please?

I have spent last two hours getting cmake to work and now it doesn't compile :(

Error   1   error LNK1107: invalid or corrupt file: cannot read at 0x2E8   C:\ProgrammingLibraries\SFML-2.2\bin\sfml-graphics-d-2.dll   1   1   sfgui

4
DotNet / [C#][SFML 2.1] Passing RenderStates makes object dissappear.
« on: January 13, 2014, 01:31:38 am »
When I call draw with just 2 params it works fine, but when I want to set texture through RenderStates triangle is not displayed.

Texture loads well, can draw it without issue as Sprite.

I have also tried creating and filling RenderStates object every loop with no effects.

What am I doing wrong here?

public class Terrain
        {
                List<Vertex> triangles = new List<Vertex>();

                Texture imgGrass;
                Sprite sprite;
                RenderStates states = new RenderStates();

                public Terrain ()
                {
                        imgGrass = new Texture("Data/Gfx/grass.png");
                        imgGrass.Repeated = true;
                        states.Texture = imgGrass;
                        sprite = new Sprite(imgGrass);

                        Vertex vertex = new Vertex();

                        vertex.Position = new Vector2f( 32, 32 );
                        vertex.Color = Color.White;
                        vertex.TexCoords = new Vector2f( 0, 0);

                        triangles.Add(vertex);

                        vertex.Position = new Vector2f( 256, 32 );
                        vertex.Color = Color.White;
                        vertex.TexCoords = new Vector2f( 100, 0);

                        triangles.Add(vertex);

                        vertex.Position = new Vector2f( 128, 128 );
                        vertex.Color = Color.White;
                        vertex.TexCoords = new Vector2f( 0, 100);

                        triangles.Add(vertex);
                }

                public void Draw(RenderWindow window)
                {
                        //window.Draw(sprite);

                        window.Draw(triangles.ToArray(), PrimitiveType.Triangles, states);
                }
        }

5
Graphics / SOIL unhandled expression
« on: January 07, 2012, 02:11:50 pm »
I am trying to load texture into OpenGL using soil with something like this:

Code: [Select]
int LoadGLTextures()
{
    /* load an image file directly as a new OpenGL texture */
    texture[0] = SOIL_load_OGL_texture
        (
        "bg.png",
        SOIL_LOAD_AUTO,
        SOIL_CREATE_NEW_ID,
        SOIL_FLAG_INVERT_Y
        );

    if(texture[0] == 0)
        return false;


    // Typical Texture Generation Using Data From The Bitmap
    glBindTexture(GL_TEXTURE_2D, texture[0]);
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR);
    glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR);

    return true;                                        // Return Success
}


And call

Code: [Select]
glEnable( GL_TEXTURE_2D );
glShadeModel( GL_SMOOTH );


before it.

App launches and returns unhandled exception here:

Code: [Select]
// SOIL.c
int query_NPOT_capability( void )
{
    /*  check for the capability    */
    if( has_NPOT_capability == SOIL_CAPABILITY_UNKNOWN )
    {
        /*  we haven't yet checked for the capability, do so    */
        if(
            (NULL == strstr( (char const*)glGetString( GL_EXTENSIONS ),
                "GL_ARB_texture_non_power_of_two" ) )
            ) //############ it points here ############//
        {
            /*  not there, flag the failure */
            has_NPOT_capability = SOIL_CAPABILITY_NONE;
        } else
        {
            /*  it's there! */
            has_NPOT_capability = SOIL_CAPABILITY_PRESENT;
        }
    }
    /*  let the user know if we can do non-power-of-two textures or not */
    return has_NPOT_capability;
}


Am I missing other initialisations?

SOIL_CAPABILITY returns -1
has_NPOT_capability returns -1

6
General discussions / SFML 2.0 changes / progress
« on: January 04, 2012, 04:43:54 pm »
Quote from: "Laurent"

Yes, there's a topic on the first page of the General forum.

Ah, right, had to be blind :)

Will it support OpenGL 4.x ?

7
General discussions / SFML 2.0 changes / progress
« on: January 03, 2012, 11:22:35 pm »
Is there SFML 1.6 -> 2.0 changes list?
Haven't found it anywhere.

And how is it progressing? Can we expect full version soon? :)

8
SFML projects / Conway's game of life
« on: January 02, 2012, 09:02:28 pm »
Haven't yet, waiting for it to be released, I'll play some more time with 1.6 and eventually move then :)

Also yes, tried with shapes, but it was 2x slower.

Does it create new object with every call?

Code: [Select]
AppWindow.Draw( sf::Shape::Rectangle( i * GridSpacing, j * GridSpacing, i * GridSpacing + GridSpacing, j * GridSpacing+ GridSpacing, sf::Color( 0, 0, 255 ), 0, sf::Color::Black ) );


To be honest didn't though about it before.

9
SFML projects / Conway's game of life
« on: January 02, 2012, 04:44:53 pm »
No, I simply apply single image for single sprite at initialisation point:
Code: [Select]
imgBlueLifeForm.Create( 16, 16, sf::Color::Blue );
BlueLifeForm.SetImage( imgBlueLifeForm );

and draw it this way:
Code: [Select]

for( int i = 0 ; i < 64 ; i ++ )
{
for( int j = 0 ; j < 48 ; j ++ )
{
if( isAlive[i][j] == true )
{
BlueLifeForm.SetPosition( i * GridSpacing, j * GridSpacing );
AppWindow.Draw( BlueLifeForm );
}
}
}

10
SFML projects / Conway's game of life
« on: January 02, 2012, 03:27:45 pm »
Here's my result of few days of learning sfml :)



My 'framework' took me 3 days to look like a framework :D
and game itself one day.

I've started with rendering grid and cells using primitives, but it was definitely bad idea, now grid and cells are just sprites, whereas I noticed, that filling image with color in-code, gives ~20fps performance for me.

Without any cells shown it runs with 900fps, with 100 cels about 260 fps.

I'm quite sad with sfml (1.6) rendering speed, maybe just my code is wrong, but for now showing for example many tiles is just impossible.

I'll probably extend this 'game' as a part of learning openGL :)

LMB - set cell talive
RMB - set cell dead
G - toggle grid
P - pause/unpause simulation
+/- change speed of simulation

11
Graphics / Insert images after App.Display();
« on: January 02, 2012, 12:29:39 pm »
It's hard to understand you, but as Tex killer said, you have to put App.Clear on the beggining of the loop, or right after App.Display. That's why you can't see 'miss' object when you press key.

App.Clear fill the whole screen with some color, so you won't see anything displayed before you called it.

12
SFML projects / Mappy tilemap engine playback library port for SFML
« on: January 01, 2012, 10:32:37 pm »
And how does it handle drawing many sprites? Is it actually able to run over 60fps with 1024x768 screen fullof 16bit tiles? Does it use OpenGL to render it or SFML graphics?

13
General / Distributing SFML games on other websites.
« on: January 01, 2012, 01:21:00 pm »
Quote from: "Nexus"

I think you really overstate the problematics, it's highly unprobable that a hacker community spends hours to reverse-engineer your game ;)


+ if something like this happen, it means you made succes and you should be very happy  :D

14
Window / How to disable user input e.g. keyboard, mouse
« on: January 01, 2012, 12:17:03 pm »
Code: [Select]

if( Enabled )
{
//do input here
}

15
General / SFML Complete Game Tutorial
« on: January 01, 2012, 12:01:56 pm »
Really nice job! I like it alot! :)

Pages: [1] 2