Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


shwasasin

Member Since 08 Sep 2006
Offline Last Active Jun 11 2014 10:54 AM

Posts I've Made

In Topic: Is GL_NORMALIZE still slow?

03 February 2013 - 08:41 PM

One thing to note is if you're targeting OpenGL (desktop) that the GL_NORMALIZE target (for glEnable/glDisable) was deprecated in OpenGL 3.2 Core (July 2009). It won't be available any longer in Core profiles in 3.2 or later versions. Just an FYI. :)


In Topic: Wrong faces displaying gDebugger(FBO/CubeMap)

12 January 2013 - 07:10 PM

Well after spending all day looking at this issue and drinking wwaayy too much coffee, I solved the issue and wanted to share. As I added FBO CubeMap support to my game, I reduced the number of glBindFramebufferEXT calls by removing the call to 0 after completing each FBO render. So in the case of CubeMaps, I instead attached the CubeMap side, then rendered again. While I admit I haven't read the OGL Spec thoroughly enough with regards to FBO's, this makes a difference and the call to 0 somehow is the sauce making each side render correctly.

 

I wrote a quick example of my problem and solution in the hopes this helps others. Have a good one!

 

Bad:

 

glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboID );
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_CUBE_MAP_POSITIVE_X, texDesc.nameID, 0);
// Render Scene Here
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, texDesc.nameID, 0);
// Render Scene Here
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
 
Good:
// Face 0
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboID );
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_CUBE_MAP_POSITIVE_X, texDesc.nameID, 0);
// Render Scene Here
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
 
// Face 1
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fboID );
glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_CUBE_MAP_NEGATIVE_X, texDesc.nameID, 0);
// Render Scene Here
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
 

In Topic: C++ - Strange behavior with static

16 December 2010 - 03:33 AM

Quote:
Original post by BitMaster
Declaring a global variable static gives each compilation unit its own copy of the variable. You probably want to declare the variable extern in a header and define it in exactly one compilation unit.


Rather than externing the variable itself, why not make a function that returns a reference to the data in question. This allows you to hit a breakpoint every time the data is touched and makes debugging far easier.

Just my 2c though. Good luck.

In Topic: 18, out of school, and lost...

30 November 2010 - 03:20 AM

I would recommend getting a Computer Science degree over a focussed education in game development. Typically CS degrees teach you the skills to learn and solve problems, rather some game development degrees that focus their efforts on learning specific API's (i.e. current industry trends) that by the time your finished your education are obsolete. This ofcourse is an over-generalization between the two, but that's the difference I've seen between graduates of both.

Another benefit to getting a CS degree is that if you cannot get a job in the industry (it is very competitive afterall), you still have skills that are relevant to work at other companies like Microsoft, Google, Apple, etc. If you're degree is focussed solely on game-dev, then you may not have transferrable skills to other industries.

Good luck with your journey.

In Topic: Encoding a gameplay video?

06 November 2010 - 01:31 PM

You should look at using Fraps. Great little program, fairly inexpensive and produces great video.

PARTNERS