Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


We're also offering banner ads on our site from just $5! 1. Details HERE. 2. GDNet+ Subscriptions HERE. 3. Ad upload HERE.


3TATUK2

Member Since 20 Jun 2012
Offline Last Active Sep 05 2014 12:16 PM

#5169899 OpenGL learning methodology

Posted by 3TATUK2 on 28 July 2014 - 05:57 PM

http://www.arcsynthesis.org/gltut/
http://ogldev.atspace.co.uk/
http://www.opengl-tutorial.org/
http://lazyfoo.net/tutorials/OpenGL/
http://open.gl/
http://antongerdelan.net/opengl/
http://www.mbsoftworks.sk/index.php?page=tutorials&series=1
http://www.lighthouse3d.com/tutorials/glsl-core-tutorial/
http://www.ozone3d.net/tutorials/




#5169540 Render Flash SWF in OpenGL

Posted by 3TATUK2 on 27 July 2014 - 11:34 AM

take a look at gnash/gameswf, or librsvg




#5162642 OpenGL 2.1 - FBO render to texture 2D projection(?) problem

Posted by 3TATUK2 on 24 June 2014 - 02:41 PM

Keep in mind, FBO is not core to 2.1 - so *if* you're using pure 2.1+shaders for legacy card support, you might consider not using FBOs. Yes, most modern cards that still use 2.1 also have FBO extension, but not all of them. PBO would be what's needed.




#5161880 How to rotate a 3D Object by modifying it's vertex coordinates

Posted by 3TATUK2 on 21 June 2014 - 03:16 AM


void rotatePoint( float* x, float* y, float* z, float xRotation, float yRotation )
{

    float sinPitch = sinf( xRotation );
    float cosPitch = cosf( xRotation );
    float sinYaw = sinf( yRotation );
    float cosYaw = cosf( yRotation );

    float sinPitch_y = sinPitch * *y;
    float cosPitch_z = cosPitch * *z;

    *x = cosYaw * *x + sinYaw * sinPitch_y - sinYaw * cosPitch_z;
    *y = cosPitch * *y + sinPitch * z;
    *z = sinYaw * *x + -sinPitch_y * cosYaw + cosYaw * cosPitch_z;

}

// ...

float x1, y1, z1, x2, y2, z2, u1, u2, v1, v2, textid;

// x1 = ..., y1 = ..., z1 = ...
// x2 = ..., y2 = ..., z2 = ...

rotatePoint( &x1, &y1, &z1, xRotation1, yRotation1 );
rotatePoint( &x2, &y2, &z2, xRotation2, yRotation2 );

DrawHouse( x1, x2, y1, y2, z1, z2, u1,  u2,  v1, v2, textid );

Rendering and collision systems can be related, but are still different.

 

What kind of collision system are you using?

 

It's possible (and I'm guessing probable - partially based on observation of your code) that you could be going about it in a less-than-optimal fashion - meaning, direct vertex manipulation probably shouldn't be necessary.




#5149860 Alpha blending with a color that has no RGB components

Posted by 3TATUK2 on 27 April 2014 - 08:03 AM

I'm pretty sure PNG "supports" having a proper RGB value. Obviously - there is still data there, regardless of whether it's "garbage" or not.

 

What determines whether it IS "garbage", is the editing application you use.

 

For example, I just tested with GIMP and it preserves the RGB just fine when you turn something into alpha.

 

Not sure about photoshop, etc.




#5146641 Intel HD 3000, the assimp library and this example

Posted by 3TATUK2 on 12 April 2014 - 11:53 PM

After creating a window+context, try printf(GL_VERSION);




#5139148 Depth pre-pass: does OpenGL still execute fragment shader if depth not writte...

Posted by 3TATUK2 on 14 March 2014 - 10:47 PM

glStencilFunc(GL_NEVER,0,0);

glEnable(GL_STENCIL_TEST);




#5139091 Depth pre-pass: does OpenGL still execute fragment shader if depth not writte...

Posted by 3TATUK2 on 14 March 2014 - 05:02 PM

First off, you ask "if depth not written" - and then you use glDepthMask(GL_TRUE) - that's oxymoronic.

 

Secondly, for a final absolute determination... you can use a query object for samples passed.




#5137657 reliable UDP(I'm going in circles...)

Posted by 3TATUK2 on 09 March 2014 - 04:58 PM

http://enet.bespin.org/

 

/thread




#5137599 OpenGL performance tips

Posted by 3TATUK2 on 09 March 2014 - 01:40 PM

Use mipmaps.

 

Realtime shadows are slow.

 

You can potentially batch draw calls together by sending in texture ids through a vertex attribute.

 

"Only" frustum culling >for *indoor* scene geometry< is not quite adequate.. Spatial culling is usually needed, PVS like in quake or umbra being the best. I use an octree with hardware occlusion.




#5137318 Cannot connect two computers

Posted by 3TATUK2 on 08 March 2014 - 08:27 AM

Probably a router/firewall setting issue.

 

Before messing with assuring actual code works - try running some simple free server program like smallftpd or whatever.... Then verify you can connect. If not, you need to fix settings before YOUR OWN code will actually work.




#5136738 Matrix Stack & New OpenGL Standards

Posted by 3TATUK2 on 06 March 2014 - 03:22 AM

Basically it boils down to replicating the same functions. Either with something like GLM, some other, or hand-rolled. And then passing to shader via uniform like Hodgman mentioned.




#5134925 Non-Developer Betatester Source?

Posted by 3TATUK2 on 26 February 2014 - 07:52 PM

Does anyone have any decent suggestions on how to get betatesters for an indie game that aren't necessarily developers?

 

Ie, at a stage that's too early to even put on steam greenlight.

 

Something like a "betatester community" would fit the bill, but surprisingly my searches show no results.

 

There are plenty of game and company-specific outlets, but no "general gamers betatester community".

 

Again - this seems surprising?

 

I guess the closest thing would to be a betatester of early access games on a platform like steam, but that doesn't completely cut it.

Wouldn't there be a lot of interest in having a group of folks who are willing to just test entirely unhread of startup game projects? For the sake of curiosity and potential?

 

If you happen to actually know of "the one rare" source which might be congruent with this, please do tell.

 

Open to all other ideas aswell.




#5134606 GLSL

Posted by 3TATUK2 on 25 February 2014 - 07:15 PM

Per vertex normals don't have a single straightforward formula, like a simple face normal does.

 

This shows how to calculate a face normal: https://www.opengl.org/wiki/Calculating_a_Surface_Normal

 

Vertex normals are usually pseudo "art" information. Meaning, as mentioned before, they're done in the modeling application and saved into the model file itself. Because they can be manually manipulated for different effects, ie "harder" - "softer" ...

 

The more "automated" way is to take the weighted average of the triangles around a vertex.

 

In maya for example, you can supply an "angle" to shift they by, and other applications might have similar different options.

 

Even wavefront obj supports vertex normals so I'd say make sure your priorities are correct.

 

If your application doesn't even support loading a model format which contains the vertex normal information itself, I'd say worry about implementing that first before you worry about how good some simple template object looks.

 

First get something working. THEN make it good. :)




#5133025 cubemap depth FBO rendering only to all faces the same view?

Posted by 3TATUK2 on 20 February 2014 - 01:48 PM

You don't even show your render code?

 

Assuming you're using something like

BindForWriting(0);
render();
BindForWriting(1);
render();
BindForWriting(2);
render();
BindForWriting(3);
render();
BindForWriting(4);
render();
BindForWriting(5);
render();

You have to set up the proper view in render() . . . Ie, glLookAt() or etc. like I did in the cubeFrustum() example I pasted you.

 

Also, you're not using glBindTexture() correctly . . . You need to call it INDIVIDUALLY for EACH cubemap side, ie, WITHIN your for() loop - not above it. And you need to save each value (or just the starting value, then increment each time) ... Not just one "m_depth" value. And then you'll also need to bind it before rendering.






PARTNERS