Jump to content

  • Log In with Google      Sign In   
  • Create Account


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

#5169899 OpenGL learning methodology

Posted by on 28 July 2014 - 05:57 PM


#5169540 Render Flash SWF in OpenGL

Posted by 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 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 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.

#5149905 SPEED: glUniform Vs. uniform buffer objects.

Posted by on 27 April 2014 - 11:56 AM

Try it and see?



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

Posted by 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 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 on 14 March 2014 - 10:47 PM



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

Posted by 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 on 09 March 2014 - 04:58 PM




#5137599 OpenGL performance tips

Posted by 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 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 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 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 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. :)