"Radiosity Normal Mapping" from [url=http://www2.ati.com/developer/gdc/D3DTutorial10_Half-Life2_Shading.pdf]this paper[/url]
Not sure if it's 100% correct yet but It looks pretty nice I think.
Ignore my balls.
[img]http://dl.dropbox.com/u/99765/474235.png[/img]
Just finished implementing my Dynamic 2D array class, This is going to make things so much easier now.
Might not seem like much but my documenter is nearly done; I just need to write a tokenizer for @ and $.
[cpp]
/*
This file is part of Dokument.
Dokument is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Dokument is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Dokument. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef DOKUMENT_UTILITIES_DISPOSABLE_H
#define DOKUMENT_UTILITIES_DISPOSABLE_H
#include <set>
namespace Dokument
{
/**
@Name Dokument::Disposable
@Desc A class that frees all allocations.
@Type Class
*/
class Disposable
{
public:
/**
@Name Dokument::Disposable::~Disposable
@Type Destructor, Boiler-Plate
*/
virtual ~Disposable() { };
/**
@Name Dokument::Disposable::Dispose
@Desc Disposes of all allocations made by the class.
@Type Function
*/
virtual void Dispose();
/**
@Name MangEmu::Disposable::new
@Desc Allocates a piece of memory with the size of $Size.
@Returns A new piece of memory.
@Type Operator
*/
void* operator new(size_t Size);
/**
@Name MangEmu::Disposable::new
@Desc Allocates a piece of memory with the size of $Size.
@Returns A new piece of memory.
@Type Operator
*/
void* operator new(size_t Size, Disposable* Instance);
/**
@Name MangEmu::Disposable::delete
@Desc Frees a piece of memory at the address $Memory.
@Type Operator
*/
void operator delete(void* Memory);
/**
@Name MangEmu::Disposable::delete
@Desc Frees a piece of memory at the address $Memory.
@Type Operator
*/
void operator delete(void* Memory, Disposable* Instance);
std::set<void*> Allocations;
};
#define disposable_new new(this)
}
#endif /* DOKUMENT_UTILITIES_DISPOSABLE_H */
[/cpp]
[code]
/**
@Name Dokument::Disposable
@Desc A class that frees all allocations.
@Type Class
*/
/**
@Name Dokument::Disposable::~Disposable
@Type Destructor, Boiler-Plate
*/
/**
@Name Dokument::Disposable::Dispose
@Desc Disposes of all allocations made by the class.
@Type Function
*/
/**
@Name MangEmu::Disposable::new
@Desc Allocates a piece of memory with the size of $Size.
@Returns A new piece of memory.
@Type Operator
*/
/**
@Name MangEmu::Disposable::new
@Desc Allocates a piece of memory with the size of $Size.
@Returns A new piece of memory.
@Type Operator
*/
/**
@Name MangEmu::Disposable::delete
@Desc Frees a piece of memory at the address $Memory.
@Type Operator
*/
/**
@Name MangEmu::Disposable::delete
@Desc Frees a piece of memory at the address $Memory.
@Type Operator
*/
[/code]
lol gpl
[QUOTE=Venice Queen;28181991]lol gpl[/QUOTE]
What? It's not like someone is going to use it in a commercial application.
[QUOTE=DevBug;28182173]What? It's not like someone is going to use it in a commercial application.[/QUOTE]
What if someone wants to use it in a Non-GPL application?
[editline]21st February 2011[/editline]
Actually, never mind. It's not like anyone's going to use it at all [sp]because it's gpl[/sp]
[QUOTE=Venice Queen;28182313]What if someone wants to use it in a Non-GPL application?
[editline]21st February 2011[/editline]
Actually, never mind. It's not like anyone's going to use it at all [sp]because it's gpl[/sp][/QUOTE]
So what? Lesser GPL? You're being ridiculous. It's a standalone application that is used to produce HTML files.
GPL is a viral license, if you use any part of a software licensed with it, you have to use GPL as well for your software.
[QUOTE=Fox-Face;28182498]GPL is a viral license, if you use any part of a software licensed with it, you have to use GPL as well for your software.[/QUOTE]
[QUOTE=DevBug;28182350]So what? Lesser GPL?[b] You're being ridiculous. It's a standalone application that is used to produce HTML files.[/b][/QUOTE]
Licenses should free the programmer and not just the code.
It's my property; I can license it how I like.
My 2D Engine is in LGPL.
I hope no one looks through my GA code comments. These are just a few of the ones I typed out for some reason.
[cpp]
//kill it if it's alive
//choose another random organism (yes, we can be asexual as well)
//no necrophilia!!!
//Are we dead?
[/cpp]
I got view movement and stuff working in JAGMARLG, so I'm starting on dungeon generation.
So confusing and time consuming :saddowns:
Going back to fractals!
Made my Sierpinsky Triangle algorithm better and made the Sierpinski Carpet. It refuses to let itself screencap, unfortunately. And it takes three minutes to draw a 7 levels deep 1000*1000 image with Antialiasing. argh.
Mandelbrot here I come
[editline]e[/editline]
yay, screenshots
[img_thumb]http://gyazo.com/044d24de9cef779b8f40779e424eb574.png[/img_thumb]
[img_thumb]http://gyazo.com/38f5b53bbf90baf65bb3d36da52661f9.png[/img_thumb]
[QUOTE=DevBug;28184121]Result:
[img_thumb]http://f.anyhub.net/1TQq[/img_thumb]
Implementation:
[img_thumb]http://f.anyhub.net/1TQm[/img_thumb][/QUOTE]
Now you just need to get rid of the redundant @Name parameter and parse the C++ namespace/class structure yourself.
Bah. I decided to swap over from opengl to d3d11, and it turns out that the bloodly thing doesnt even compile under mingw
Good times
[QUOTE=layla;28178729]For anyone who might be using my lightmap stuff, there is a few issues with it.
For bump mapped faces there's 4 times as much luxel data, at the time I thought the styles[4] array had something to do with it. It turns out there's just 4 times as many luxels in the lump which is obvious but I was trying to access it if the styles array told me to.
Lightmaps also need to be gamma corrected by 2.2 (I still need to find out if you need to gamma correct the other 3 lightmaps)[/QUOTE]
Could you please reupload the source? :] I lost it :[
[QUOTE=Icedshot;28185146]Bah. I decided to swap over from opengl to d3d11, and it turns out that the bloodly thing doesnt even compile under mingw
Good times[/QUOTE]
Why would you want to do that anyway, if you've got it working in OGL?
[QUOTE=T3hGamerDK;28185700]Why would you want to do that anyway, if you've got it working in OGL?[/QUOTE]
Ive already had enough of the deprecations in OpenGL. And after fruitlessly trying to understand VBOs and trying to apply what ive already learnt to them, i decided that it wasnt worth it, and having spotted a nice dx11 tutorial i went with that
Managed to get everything compiling eventually, seems to work
[QUOTE=Icedshot;28185772]Ive already had enough of the deprecations in OpenGL. And after fruitlessly trying to understand VBOs and trying to apply what ive already learnt to them, i decided that it wasnt worth it, and having spotted a nice dx11 tutorial i went with that
Managed to get everything compiling eventually, seems to work[/QUOTE]
You do realize that Direct3D also uses VBOs? And that they also have fixed pipelines deprecated since D3D10?
Hi guys.I need help with this program.The problem is that i keep getting this Error.
Please help me guys!!!
Here is the code for my class:
[code]
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Drawing;
using System.Windows.Forms;
namespace Level_Editor
{
class Block
{
private Shape valueShape;
private Col valueColor;
private SolidBrush brush;
public PictureBox picture;
public Block(Col color, Shape shape, int x, int y)
{
ValueColor = color;
ValueShape = shape;
this.picture = new PictureBox() { Location = new Point(x * 10, y * 10), Size = new Size(10, 10) };
#region Triangles
TopLeft[0] = new Point(x + 1, y + 1);
TopLeft[1] = new Point(x + 9, y + 1);
TopLeft[2] = new Point(x + 1, y + 9);
TopRight[0] = new Point(x + 1, y + 1);
TopRight[1] = new Point(x + 9, y + 1);
TopRight[2] = new Point(x + 9, y + 9);
BotLeft[0] = new Point(x + 1, y + 1);
BotLeft[1] = new Point(x + 1, y + 9);
BotLeft[2] = new Point(x + 9, y + 9);
BotRight[0] = new Point(x + 9, y + 1);
BotRight[1] = new Point(x + 9, y + 9);
BotRight[2] = new Point(x + 1, y + 9);
#endregion
Fill = new Rectangle(x + 1, y + 1, x + 8, y + 8);
}
public Col ValueColor {
get{
return valueColor;
}
set {
switch (value)
{
case Col.Black:
Color = Color.Black;
break;
case Col.Blue:
Color = Color.Blue;
break;
case Col.Green:
Color = Color.Green;
break;
case Col.Cyan:
Color = Color.Cyan;
break;
case Col.Red:
Color = Color.Red;
break;
case Col.Magenta:
Color = Color.Magenta;
break;
case Col.Brown:
Color = Color.Brown;
break;
case Col.LightGray:
Color = Color.LightGray;
break;
case Col.DarkGray:
Color = Color.DarkGray;
break;
case Col.LightBlue:
Color = Color.LightBlue;
break;
case Col.LightGreen:
Color = Color.LightGreen;
break;
case Col.LightCyan:
Color = Color.LightCyan;
break;
case Col.LightRed:
Color = Color.FromArgb(255, 128, 128);
break;
case Col.LightMagenta:
Color = Color.FromArgb(255, 128, 255);
break;
case Col.Yellow:
Color = Color.Yellow;
break;
case Col.White:
Color = Color.White;
break;
}
valueColor = value;
}
}
public Shape ValueShape {
get
{
return valueShape;
}
set {
switch (value)
{
case Shape.Empty:
this.picture.CreateGraphics().FillRectangle(new SolidBrush(Color.White), this.Fill);
break;
case Shape.Full:
this.brush = new SolidBrush(this.Color);
this.picture.CreateGraphics().FillRectangle(new SolidBrush(Color.White), this.Fill);
this.picture.CreateGraphics().FillRectangle(this.brush, this.Fill);
break;
case Shape.TopLeft:
this.brush = new SolidBrush(this.Color);
this.picture.CreateGraphics().FillRectangle(new SolidBrush(Color.White), this.Fill);
this.picture.CreateGraphics().FillPolygon(this.brush, this.TopLeft);
break;
case Shape.TopRight:
this.brush = new SolidBrush(this.Color);
this.picture.CreateGraphics().FillRectangle(new SolidBrush(Color.White), this.Fill);
this.picture.CreateGraphics().FillPolygon(this.brush, this.TopRight);
break;
case Shape.BotLeft:
this.brush = new SolidBrush(this.Color);
this.picture.CreateGraphics().FillRectangle(new SolidBrush(Color.White), this.Fill);
this.picture.CreateGraphics().FillPolygon(this.brush, this.BotLeft);
break;
case Shape.BotRight:
this.brush = new SolidBrush(this.Color);
this.picture.CreateGraphics().FillRectangle(new SolidBrush(Color.White), this.Fill);
this.picture.CreateGraphics().FillPolygon(this.brush, this.BotRight);
break;
}
valueShape = value;
}
}
private Point[] TopLeft = new Point[3];
private Point[] TopRight = new Point[3];
private Point[] BotLeft = new Point[3];
private Point[] BotRight = new Point[3];
private Rectangle Fill;
private Color Color;
}
}
[/code]
and here is the error:
[img]http://i.imgur.com/bYFq6.png[/img]
If you find the problem please tell me.
That would belong to what do you need help with thread.
Anyways you are creating the picturebox's graphics before you have assigned it to a new picturebox object here: ValueShape = shape;
You should create the instance before that.
[QUOTE=raBBish;28185857]You do realize that Direct3D also uses VBOs? And that they also have fixed pipelines deprecated since D3D10?[/QUOTE]
Im aware of that, but at least with d3d i can follow a nice set of up to date tutorials rather that something written more than a few years ago. Its simply a matter of availability.
[QUOTE=Frugle;28186541]That would belong to what do you need help with thread.
Anyways you are creating the picturebox's graphics before you have assigned it to a new picturebox object here: ValueShape = shape;
You should create the instance before that.[/QUOTE]
Thanks a lot!!!! <3
[QUOTE=Icedshot;28186589]Im aware of that, but at least with d3d i can follow a nice set of up to date tutorials rather that something written more than a few years ago. Its simply a matter of availability.[/QUOTE]
Which tutorials are you using?
[QUOTE=Richy19;28186640]Which tutorials are you using?[/QUOTE]
[url]http://www.directxtutorial.com/Tutorial11/tutorials.aspx[/url]
It was in the what do you need help with thread. I spotted it and just thought that it looked much, much more up to date than anything i could find on opengl bar buying the superbible
[QUOTE=Icedshot;28186744][url]http://www.directxtutorial.com/Tutorial11/tutorials.aspx[/url]
It was in the what do you need help with thread. I spotted it and just thought that it looked much, much more up to date than anything i could find on opengl bar buying the superbible[/QUOTE]
Ahh cool, just remember that the later tutorials are pay-to-view
[QUOTE=Richy19;28186763]Ahh cool, just remember that the later tutorials are pay-to-view[/QUOTE]
Son of a bitch. Are there ANY good 3d resources around anywhere?
Sorry, you need to Log In to post a reply to this thread.