Page 5 of 6

Re: Flame Painter Dev Thread

Posted: Thu Feb 10, 2011 7:40 am
by GroundUpEngine
eatcomics wrote:OOOOOH PRETTY!!!!! *reaches out to touch*
+1 :lol:

Re: Flame Painter Dev Thread

Posted: Fri Feb 11, 2011 10:01 pm
by xiphirx
After 10 straight hours of work, pounding my head against a wall, and everything else imaginable
Image

The algorithm is FINALLY done

*HEAVE*

Now its just rendering D:

Re: Flame Painter Dev Thread

Posted: Sat Feb 12, 2011 3:27 am
by Firzen
xiphirx wrote:After 10 straight hours of work, pounding my head against a wall, and everything else imaginable
SWEEET

Re: Flame Painter Dev Thread

Posted: Sat Feb 12, 2011 7:41 am
by pritam
Very very nice :D

Did you sort out your dev environment btw, to release a demo?

Re: Flame Painter Dev Thread

Posted: Sat Feb 12, 2011 8:19 am
by epicasian
Dude, I have to say.

This looks amazing:D

Re: Flame Painter Dev Thread

Posted: Sat Feb 12, 2011 4:10 pm
by xiphirx
Firzen wrote:
xiphirx wrote:After 10 straight hours of work, pounding my head against a wall, and everything else imaginable
SWEEET
:D
pritam wrote:Very very nice :D

Did you sort out your dev environment btw, to release a demo?
Unsure atm, hopefully I have D: If I haven't, I'll just remove SDL, etc and install vs2010. Hopefully that works.
epicasian wrote:Dude, I have to say.

This looks amazing:D
Sanku.

Re: Flame Painter Dev Thread

Posted: Sat Feb 12, 2011 4:56 pm
by EdBoon
epicasian wrote:Dude, I have to say.

This looks amazing:D
agreed, that is sick son,
+1.1

Re: Flame Painter Dev Thread

Posted: Sun Feb 13, 2011 12:46 pm
by Ginto8
*gasp* purdy colors just got purdier!

Re: Flame Painter Dev Thread

Posted: Sun Feb 13, 2011 10:50 pm
by xiphirx

Re: Flame Painter Dev Thread

Posted: Mon Feb 14, 2011 6:59 pm
by dandymcgee
xiphirx wrote:Aye, the OpenGL Port is here.

http://arse.voidteam.net/Personal/charr ... licker.zip

:D
Why does this still seem so fucking cool? :P

Re: Flame Painter Dev Thread

Posted: Mon Feb 14, 2011 7:24 pm
by xiphirx
Alright, I have implemented code to draw the flames to a separate buffer (FBO), but nothing is displaying...

Initialization

Code: Select all

	// -- Create FBO
	//Create Rendering buffer
	glGenRenderbuffersEXT(1, &flamesFBODepth); // Create render buffer
	glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, flamesFBODepth); // Bind the render buffer
	glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT, sw, sh);
	glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, flamesFBODepth);

	//Create Texture
	glGenTextures(1, &flamesFBOTexture);
	glBindTexture(GL_TEXTURE_2D, flamesFBOTexture);
	glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, sw, sh, 0, GL_RGBA, GL_UNSIGNED_BYTE, NULL);

	glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
	glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
	glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);

	//FBO
	glGenFramebuffersEXT(1, &flamesFBO);
	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, flamesFBO);
	
	glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, flamesFBOTexture, 0);
	glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_RENDERBUFFER_EXT, flamesFBODepth);

	//Check if it was successfully created
	GLenum status = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT);
	if (status != GL_FRAMEBUFFER_COMPLETE_EXT)
		return false;

	//Unbind...
	glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
	glBindTexture(GL_TEXTURE_2D, 0);
	glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, 0);
Before I draw stuff that I'd like to go to my FBO

Code: Select all

		glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, flamesFBO);
		glPushAttrib(GL_VIEWPORT_BIT | GL_ENABLE_BIT);
		glClearColor (1.0f, 0.0f, 0.0f, 1.0f);
		glLoadIdentity();
Then its my rendering code, then

Code: Select all

		glPopAttrib();	
		glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
Afterwards, when I want to render the FBO to the screen...

Code: Select all

	glBindTexture(GL_TEXTURE_2D, flamesFBOTexture);
	glBegin(GL_QUADS);
		glTexCoord2f(0.0f, 0.0f);
		glVertex3f(-1.0f, -1.0f, 0.0f); // Bottom Left

		glTexCoord2f(0.0f, 1.0f);
		glVertex3f(-1.0f, 1.0f, 0.0f); // Top Left

		glTexCoord2f(1.0f, 1.0f);
		glVertex3f(1.0f, 1.0f, 0.0f); // Top Right

		glTexCoord2f(1.0f, 0.0f);
		glVertex3f(1.0f, -1.0f, 0.0f); // Bottom Right
	glEnd();
	glBindTexture(GL_TEXTURE_2D, 0);
And nothing appears (hooray :|)... Any ideas as to what I'm doing wrong? :(

Re: Flame Painter Dev Thread

Posted: Fri Feb 25, 2011 6:11 pm
by xiphirx

Re: Flame Painter Dev Thread

Posted: Tue Mar 22, 2011 12:07 am
by xiphirx

Re: Flame Painter Dev Thread

Posted: Tue Mar 22, 2011 5:45 pm
by eatcomics
I jizzed when I saw the last one

Re: Flame Painter Dev Thread

Posted: Tue Mar 22, 2011 5:51 pm
by dr-snipe
damn, thats Photoshop quality :)