Jump to content

  • Log In with Google      Sign In   
  • Create Account


nfries88

Member Since 11 Nov 2006
Offline Last Active Mar 16 2014 01:05 AM
*----

Topics I've Started

Probably a stupid question

22 August 2012 - 09:04 PM

I'm currently trying to write a library in C, but I've found myself in a situation where using something like polymorphism would save me from a ton of code duplication.

However, I'd also like the library to function perfectly in C++ without requiring the library user to do a ton of casting.

This brings me to one of two solutions:
1) Overload every function that expects the base struct if using a C++ compiler.
2) use inheritance in C++, just make the base struct the first data member in C

#2 seems like the most attractive choice, just due to the number of functions involved. But it also seems as though it could break if the library was initially built in C (or if used in C, would break if the library was initially built in C++), I honestly have no clue.

Any advice?

[edit]Answered the question for myself. Sorry, mods can delete or whatever.

[mod edit]We generally don't delete threads, but prefer to leave them around for others to also learn from. If someone answers their own question, it's appreciated when they share their thoughts for the above reason.

Questions on volume rendering

22 August 2012 - 01:13 PM

I've become extremely interested in the notion of volume rendering, using each voxel as if it were a pixel (IE, creating and rendering 3D pixel art) to create an isometric game.

However, it seems that nearly everything I can find online in regards to volume rendering are focused on creating 3-dimensional games (and most of them, minecraft clones) or working with medical technology, and very rarely do these articles provide much information in simple terms. Though, admittedly, I will probably find the articles on volumetric terrains quite useful.

Does anyone have any pointers on rastering larger volumes directly to a pixmap, in real-time, without converting to a mesh? It seems as though the simplest method would be similar to rotating a 2D image in software, but does anyone know a better way?

[C++ - Win32 API] PeekMessage never returning false?

03 December 2011 - 11:48 PM

I have a curious bug where your typical PeekMessage call (PeekMessage(&msg, mywindow, 0, 0, PM_REMOVE)) never returns false.

Compiler is MinGW 3.4.5, Windows 7, it's a WOW64 process. Anyone know anything about any such bug

EDIT: Solved. Apparently ValidateRect(hwnd, NULL) is not an appropriate response to a WM_PAINT message. DefWindowProc fixed it.

Death of Dennis Ritchie

12 October 2011 - 11:41 PM

Found out a couple hours ago that Dennis Ritchie died. He co-created the C programming language and the Unix operating system. Modern computing is built upon his great accomplishments. The sad thing is, his death was kept in the shadows as we all mourned Steve Jobs; who could not have done the great things that he did without Ritchie's contributions to computer science.
<br><br>Update: He died on the night of the 8th.<br>

Updated: SDL 1.3 will be more community-oriented

10 April 2011 - 06:18 PM

SDL1.3 is no zlib licensed! What does this mean for developers using SDL?
1) No need to buy a developer license for iOS.
2) Statically link on any platform you want.

Well, that's pretty much it. It's an awesome change for everybody!

Update 26 Apr
Sam accepted a job offer to develop some company's upcoming MMO. He'll be working full time, so his prior plans to support SDL full-time are out. He's said he'll try to make it more community-managed, and also that it's basically ready for beta. Get to testing!
Forum Link: http://forums.libsdl.org/viewtopic.php?t=7189

PARTNERS