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 - ThomasAn.

Pages: [1] 2
1
General / (SOLVED) Setup issues
« on: February 18, 2016, 04:58:16 am »
SOLVED: I forgot to to replace the old with new graphics, system, and window DLLs in the project's build folder.

-------------------------------------------------------
Original:
SFML was properly setup a couple of years ago (Windows, CodeBlocks 13).
Now, after updating to CodeBlocks 16, I am getting errors.

Downloaded SFML 2.3.2 from source and recompiled (using default Cmake settings) from instructions here:
http://www.sfml-dev.org/tutorials/2.3/compile-with-cmake.php
http://www.sfml-dev.org/tutorials/2.3/start-cb.php

Still getting errors.

Quote
---------------------------
Game01.exe - Entry Point Not Found
---------------------------
The procedure entry point _ZN2sf6Window6createENS_9VideoModeERKNS_6StringEjRKNS_15ContextSettingsE could not be located in the dynamic link library C:\Users\Thomas\AnTh\A0_UNI-Boulder\CSCI2270 DataStructures\HW12-SnakeGameAI\Code\Game01.exe.
---------------------------
OK   
---------------------------

2
Graphics / Re: How to draw a *single* vertex ?
« on: May 28, 2013, 11:20:45 pm »
Thank you.
I will look into that approach and adjust accordingly.

3
Graphics / Re: How to draw a *single* vertex ?
« on: May 28, 2013, 09:10:05 pm »
That means I would have to waste a vertex array per shape; instead of a vertex array for the WHOLE system. Using more vertices per particle would kill performance. No? (both in number of vertices and multiple draw calls)

Or, it would have to be a vertex array of quads (is this even possible; vertex array or vertex arrays) ? And each quad having a circle texture assigned to it ? (even this already quadruples the computational load)

Can all these shapes be drawn in sfml with a single call to window.draw ?

4
Graphics / Re: How to draw a *single* vertex ?
« on: May 28, 2013, 09:04:09 pm »
I am going for something like this:


Being able to assign a changing texture to each particle depending on certain conditions of speed, or pressure... all without sacrificing performance (if possible). I just need to display a 20x20 texture (out of a pool of textures) by its middle assigned to each particle

5
Graphics / Re: How to draw a *single* vertex ?
« on: May 28, 2013, 08:18:48 pm »
Speaking of textures ... I don't see any examples about texturing a single vertex as an independent particle.
So far I know how to set the coordinates of displaying a texture on a vertex, but the method of actually showing a texture at those coordinates is rather mystical to me.

I see for vertex arrays, the texture is displayed from the Window.draw(vertices, &texture); but that would not work for particle vertices each having their own texture.

6
Graphics / Re: How to draw a *single* vertex ?
« on: May 19, 2013, 03:41:32 am »
There's an example of a particle system that draws particles as single points in the tutorial, can't you use a similar approach?

Laurent, I read your example and I feel I understand your approach on that simple particle system.

... the question now becomes is it possible to have a particle system where each particle is a simple shape (square, circle, triangle etc) ? Sounds like a vertexArray of vertexArrays.

As such, is it possible to have a single call to window.draw(....) that puts a cluster of circles on screen ? (assuming we want to do this with actual vertex geometry instead of using textures that represent circles or sprites)

7
Graphics / Re: How to draw a *single* vertex ?
« on: May 18, 2013, 11:15:26 am »
What would be the optimum way to handle a particle system wherein each particle has more properties than merely position, or texture (in my case there is a number of other properties; elasticity, surf friction, magnetic coef, mass, etc etc)

Should it be an array of class objects for the properties and a separate vertexArray ? ... and then try to keep their indices synchronized ? (It seems to me if I add a single vertex as a member within the particle class-object, then I'd have to iterate through the class-object array to create a new vertex array for drawing ... which likely creates memory overhead and too much allocation/deallocation, I think.)

8
Graphics / Re: How to draw a *single* vertex ?
« on: May 18, 2013, 10:41:11 am »
Thank you for this tip! I will modify my design to make use of vertex arrays and reduce calls to "draw".

9
Graphics / Re: How to draw a *single* vertex ?
« on: May 18, 2013, 09:27:18 am »
The worst performance ... is that due to repeated calls to Window.draw(....) ?

10
Graphics / Re: How to draw a *single* vertex ?
« on: May 18, 2013, 09:18:13 am »
Thank you. I will try that.

Reason being, I have a simple particle system that displays either points or circles (or other shapes). So I already have a defined array of single entities and it seems like a waste having to copy an existing array to a vertex array when points are to be shown.

11
Graphics / How to draw a *single* vertex ?
« on: May 18, 2013, 08:41:53 am »
I see a lot of documentation about vertex arrays ... but how can we draw a *single* vertex ?

12
General / Re: sfml 2.0 undefined reference to getDefaultFont
« on: April 26, 2013, 07:04:22 am »
Yup !
Your example works.

I see you used the explicit constructor:  sf::Text text("hello", font, 30);
That was the key (although I thought I tried that explicit call earlier, maybe something else got in the way)

In any case if I use only  sf::Text text("hello");
it complains, but I don't care :-)  ... I got text now !

Thank you for your help on this.

13
General / Re: sfml 2.0 undefined reference to getDefaultFont
« on: April 26, 2013, 01:06:51 am »
aaahm, thanks for the ideas ... but I am confused still :-)

I downloaded SFML 2.0 from this website directly, back in December (5months ago ? I believe) and I remember taking the extra steps to make a clean installation, as a matter of fact I spent a bit of time understanding how to built/compile SFML for my system ... and I remember it went smoothly with no errors at the time. (Of course I have forgotten most of those methods now, but I do remember having to download a few open source tools).

In any case, I have been writing a small game the past two weeks with no errors, that is until I tried to add some text elements yesterday. (It gives the same error regardless of whether I explicitly specify a font, or leave font info completely out)

So you guys think everything is properly linked except the text headers ? (by saying "everything" ... well I haven't checked audio, but so far keyboard, mouse, and graphics are fine)

14
General / sfml 2.0 undefined reference to getDefaultFont
« on: April 25, 2013, 06:39:35 am »
I am writing a simple game and so far all works well, with graphics and keyboard working well, but ...
... today for the first time I am trying to add some text elements and get this error.

Just doing the text sample from the doc page:
(And I have the Arial.ttf in the local folder)

Quote
// Declare and load a font
 sf::Font font;
 font.loadFromFile("arial.ttf");
 
 // Create a text
 sf::Text text("hello");
 text.setFont(font);
 text.setCharacterSize(30);
 text.setStyle(sf::Text::Bold);
 text.setColor(sf::Color::Red);

 // Draw it
 window.draw(text);

15
General / Re: Graphics tut for SFML 2.0
« on: February 15, 2013, 03:52:47 am »
Alright. Thank you !

Pages: [1] 2