Basic pixel drawing question

i am at the very beginning with jme, so simple question is : can i draw in jme a scene similar to an opengl scene (ortho perspective)?



what i want to do is to draw some points in the space (like stars) but in 2d ( in opengl i used glpoint, what is the equivalent in jme?



Thank you a lot

ortho drawing is  done by drawing in ortho mode of course  :wink:

if you want a scene object to be drawn in ortho mode call:

obj.setRenderQueueMode(Renderer.QUEUE_ORTHO);



you can draw points with the jme class Point.

Thanks!



The perspective worked. Can you give me an example of how to draw a point ? with color and stuff. Do i have to declare each point ?

I tried

Point p= new Point("punct", new Vector3f(5, 5, 0), new Vector3f(0, 0, 0), new ColorRGBA(1f, 0f, 0f, 1f), new Vector2f(0, 0));

p.draw(Renderer);


and i get some errors.

Thank you again

which errors?

"The constructor Point(String, Vector 3f, Vector3f, ColorRGBA, Vector2f) is undefined"

Where did you get the idea that such as constructor exists? Take a look at http://jmonkeyengine.com/doc/com/jme/scene/Point.html .

Point(java.lang.String name, Vector3f[] vertex, Vector3f[] normal, ColorRGBA[] color, Vector2f[] texture)



that's it from your site. Could you give me an example please ? some piece of code with the construction of such a point



Thanks

take a look at ParticlePoints in the jmetest package. apparently one Point class can represent N points.  :wink:

There is a test for almost every feature in the jmetest package.

Its the best source if you want to know how a specific class is used.