Author
Topic: drawWireframe (Read 3443 times)

I am new to jPCT. So far I it's been easy to get something basic running. Before I get too deep in, I was looking into rendering a wireframe so I don't have to deal with textures at the moment. I found the method in the docs, but I'm not sure I am applying it right.

wire color set to white 255,255,255 and nothing draws. Even without the the first draw call, the wireframe doesn't draw.

Like I said, I'm new and just getting to digging around. I haven't even gotten into shaders yet, maybe a basic phong or lambert with a color might be good too instead of wireframe. Just looking for some basic drawing to get things figured out. Also, about wireframe, sense I have seen it, is there a type of hidden line removal available?

I'm looking forward to learning more about this library and being around in the community.

I don't necessarily need them. I'll just need to research the shaders, and just make myself something simple. I was hoping to build a project with lo-fi style graphics. But I don't mean to make you implement wireframe, I'm sure there are other things I might use a favour for in the future

If you don't assign a texture, a default white one will be used. You can set an additional color that will be added to ambient lighting and the light from the light sources. Polygons will be shaded by using gl's standard gouraud shading. You can enable specular lighting as well, but the results usually aren't very impressive.

There are times when I'd have found wireframe usefull - mostly in editing/debugging a scene and wanting to see bits more clearly.

Is it a lot of work to implement in the engine? Or just something you have to copy over or toggle on?

Might be a little retro-thinking of me, but sometimes wireframes can be used nicely in games too. (I've seen it used to add "thin detail" onto objects back when polygon counts were still very restrictive).But that would be need to be on a per-object base's and not sure how possible that is.

It's not a simply copy and paste job. If it were, i would have ported it already. I've to change some things to support it on Android. Nothing really difficult, i just avoided it because there was no real demand. I'll add it, when i find the time.

It's been a while since the last news on drawWireframe() in jPCT AE.I'd like to use wireframed 3D overlays in my augmented reality app. Is there any chance, to find the method implemented in jPCT AE soon?I'd really appreciate any progress in this matter or hints, how to achieve a similar result for my own.Thanks!

It's already implemented. You can choose between points and lines, but there's a drawback: The implementation of lines doesn't create results as you might expect them. That's caused by some design decision on how OpenGL ES does handle line drawing. To fix this, i would have to create a complete new batch of geometry for each object just to render proper lines...and i'm not going to do that. So just give it a try. Depening on the object, it might look good enough. Or maybe point mode is an option.

The online documentation is fine. Make sure that you are looking at the version for jPCT-AE, not the one for desktop jPCT. I'll have a look into the other issue...looks like as if i've forgotten to implement some GL 2.0 related stuff...

OpenGL ES 2.0 obviously doesn't support glPointSize and i haven't added a compatibility layer for this yet. You can try this version: http://jpct.de/download/beta/jpct_ae.jar. It should work (i.e. not crash), but you still can't set a point's in point mode. Points will always be one pixel in size. You can set the width of lines though.