[img]http://i50.tinypic.com/2dr5kli.png[/img]
[editline]7th May 2012[/editline]
Also, I've found an alarming lack of hex to ascii conversion functions on the internet, so I threw together my own really quick:
[img]http://i49.tinypic.com/33lnk3a.png[/img]
[QUOTE=robmaister12;35859855]More specifically 1992. Immediate mode is 20 years old.
[...]
OpenGL 1.1, released in the same year, added support for vertex arrays. That means that immediate mode was the exclusive way to render with OpenGL for less than a year.[/QUOTE]
Uh, 1.1 came out in 1997, five years later.[sup][[url=http://en.wikipedia.org/wiki/OpenGL#OpenGL_1.1]1[/url]][[url=http://www.opengl.org/documentation/specs/version1.1/glspec1.1/index.html]2[/url]][/sup]
[editline]7th May 2012[/editline]
It's worth noting that VAs were finalised in [url=http://www.opengl.org/registry/specs/EXT/vertex_array.txt]1995[/url] and were probably available long before that as vendor extensions.
I was browsing /r/opengl this morning and I noticed a topic about someone needing help with "installing OpenGL". I opened the thread and saw that he was actually using open.gl to learn, which made me feel all warm and fuzzy inside.
Problem was that he was trying to link headers and placed random dlls in System32. Oh well, good thing he learned not to overshoot before messing up his computer.
[QUOTE=Overv;35861057]he was actually using open.gl to learn[/QUOTE]
[QUOTE=shill le 2nd;35859219]Oh man, he's going to be able to open the most non-deprecated blank window ever![/QUOTE]
For reference: [url]http://www.reddit.com/r/opengl/comments/t5vub/new_to_opengl_help_with_installation/[/url]
right on!
[img]http://i.imgur.com/oiRZo.png[/img]
[editline]7th May 2012[/editline]
remember folks, everything you see on that screen was done with javascript!
[editline]hi[/editline]
Here is the source to all the userland utilities if anyone'd like to take a look: [url]https://github.com/charliesome/jsos/tree/master/kernel/js/bin[/url]
If you know JavaScript or CoffeeScript, you should write a program for JSOS!
[QUOTE=swift and shift;35861336]right on!
[img]http://i.imgur.com/oiRZo.png[/img]
[editline]7th May 2012[/editline]
remember folks, everything you see on that screen was done with javascript![/QUOTE]
POTY every year
[QUOTE=HeroicPillow;35859017]void glfwGetMousePos( int *xpos, int *ypos )
That works for that exact purpose? It returns mouse position in relation to the upper-left bound of the window. Works flawlessly (just tested it).[/QUOTE]
Let's say you were running in windowed-mode and you're allowing the user move the window. How do you get the point of the mouse as it appears in your operating system? Since that function returns the position [b]in relation to the window position[/b], you would need to subtract the position of the window to get the [b]absolute[/b] position on the screen.
I saw an ad in the train today about some transit company that wants 10k followers on Twitter and you can win a prize if you're the 10000th follower. Of course I set out to write a script that watches the Twitter account and it will auto follow it after it's at 9999 followers. Unfortunately I shortly noticed that it goes up from ~9600 with a rate of about 2 per hour. Sad face.
Made a ribbon renderer in Canvas2D, but its got these awful defects. I'm drawing polygon triangles to support a WebGL renderer too. I guess I need to make it a special case and use the path stuff.
[img]http://puu.sh/tqHo[/img]
Blurgh
[url]http://jsfiddle.net/xnfHL/1/[/url]
[QUOTE=Overv;35861551]I saw an ad in the train today about some transit company that wants 10k followers on Twitter and you can win a prize if you're the 10000th follower. Of course I set out to write a script that watches the Twitter account and it will auto follow it after it's at 9999 followers. Unfortunately I shortly noticed that it goes up from ~9600 with a rate of about 2 per hour. Sad face.[/QUOTE]
That sounds like a horrible marketing plan. Instead of everyone following them now, people are just going to sit and wait so they can be #10000
[t]http://s.hruhf.in/2012-05/Project_TPC-2012-05-07_21.12.16.png[/t]
Got me some equipment, next up is combat.
[editline]words[/editline]
[t]http://s.hruhf.in/2012-05/Project_TPC-2012-05-07_21.18.03.png[/t]
There's also block placement, but that's only for debug really. Water needs some work.
Got my arrays fixed and working properly, now to implement proper typing and classes...
test.evil:
[code]plan NoteEverything(array Inp)
every Item in Inp?
print("Note: ", Item, "\n").
repeatedly.
finished.
Arr = [1,2,3,4,5,["Hello", "World"]].
every I in Arr? puts(I). repeatedly.
NoteEverything(Arr).[/code]
$ ruby wmd.rb test.evil:
[code]Initializing Weapons of Mass Destruction...
Executing file test.evil...
Parsing program...
Program parses to:
plan NoteEverything([array Inp]) every Item in Inp? print(["Note: ", Item, "\n"]). repeatedly. finished.
Arr=[1, 2, 3, 4, 5, ["Hello", "World"]].
every I in Arr? puts([I]). repeatedly.
NoteEverything([Arr]).
Running program.
1
2
3
4
5
["Hello", "World"]
Note: 1
Note: 2
Note: 3
Note: 4
Note: 5
Note: ["Hello", "World"]
Stopping system.
We hope you enjoyed this bout of world domination.[/code]
[QUOTE=r0b0tsquid;35848879]Water being rendered in a separate pass, so I can get the translucency right:
[img]http://i.imgur.com/VFJ5N.png[/img]
Also fog! :D[/QUOTE]
Are you using some quad tree / fractal to generate infinite terrain or have you defined constant dimensions so it's not "infinite"?
I've been trying to work out how to load "chunks" into the world with Jmonkey, but thus far I've only achieved this:
[img]https://p.twimg.com/AsNlqRUCEAASFgX.jpg:large[/img]
[IMG]http://i.imgur.com/ID1sb.png[/IMG]
It lives... (Exponential shadow mapping)
Are there any tutorials for setting up Open GL ES like the Android canvas?
[IMG]http://dl.dropbox.com/u/33076954/New/Framebuffer.PNG[/IMG]
Framebuffer object sharing is going well
[QUOTE=Mordi;35861500]Let's say you were running in windowed-mode and you're allowing the user move the window. How do you get the point of the mouse as it appears in your operating system? Since that function returns the position [b]in relation to the window position[/b], you would need to subtract the position of the window to get the [b]absolute[/b] position on the screen.[/QUOTE]
Excuse me if I'm just ignorant, but why the hell would you need to know the absolute position of the mouse?
Hey guys, I've been trying to do some serial communication to my microcontroller when suddenly:
[img]http://i49.tinypic.com/16iw4mp.png[/img]
It's like in a movie
[IMG]http://dl.dropbox.com/u/33076954/New/Oh%2C%20whoops.PNG[/IMG]
Turns out i'd forgot to clear the renderbuffer every frame, and opengl colours go from 0 to 1, not 0 to 255. Next thing i need to implement is tesselation, and then it should run pretty fast
[IMG]http://i.imgur.com/FDFZp.png[/IMG]
EDIT: Didn't realise it isn't really obvious what this does. It connects two Omegle strangers together. Names are assigned to make it easier to follow the conversation. You can simply spy on the conversation or interject and say things of your invention.
[QUOTE=chimitos;35859163]I find really old computer stuff fascinating.
To see the differences between modern and the modern-not-that-long-ago.
Makes me wonder where computers will be by the time I'm old.[/QUOTE]
I found lots of old computers, PLC's, electronics,... at school. I am now spending most of my time working with them. I love playing around with old electronics and other stuff.
So I've been trying to make my block game less... blocky.
Left = before, right = after
[img]http://i.imgur.com/AykpJ.jpg[/img][img]http://i.imgur.com/vGk2r.jpg[/img]
I think it looks pretty good (but the lava still has visible seams)
[QUOTE=Dlaor-guy;35862796]So I've been trying to make my block game less... blocky.
Left = before, right = after
[img]http://i.imgur.com/AykpJ.jpg[/img][img]http://i.imgur.com/vGk2r.jpg[/img]
I think it looks pretty good (but the lava still has visible seams)[/QUOTE]How did you do that 2D?
[QUOTE=calzoneman;35862665]Excuse me if I'm just ignorant, but why the hell would you need to know the absolute position of the mouse?[/QUOTE]
Well, I'll let this video do most of the explaining. As you can see, my in-game cursor is way off of the actual position of the cursor.
[vid]http://mordi.ziphoid.com/data/stuff/Showing_First_OpenGL_App6.webm[/vid]
Also, check out that textbox with text that breaks. I spent several hours yesterday and today scratching my head over how to make it properly break the lines...
It's probably horribly unoptimized:
[cpp]void Font::DrawFormatted(int x, int y, std::string str, int width, int lineHeight)
{
int pos = 0, posPrev = 0;
while(GetWidth(str.substr(posPrev, str.length() - posPrev)) > width)
{
while(GetWidth(str.substr(posPrev, pos - posPrev)) < width) // find the first line
{
pos ++;
}
if (str.substr(posPrev, pos - posPrev).find_first_of(" ", 0) != string::npos) // if the line contains a space
{
while(str.substr(pos - 1, 1) != " ")
{
pos --;
}
}
else // insert a dash at the end of the line
{
pos--;
str.insert(pos - 1, "-");
}
Draw(x, y, str.substr(posPrev, pos - posPrev), 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f);
y += lineHeight;
posPrev = pos;
}
// Draw the last line
Draw(x, y, str.substr(pos, str.length() - pos), 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f);
}[/cpp]
[QUOTE=dije;35862820]How did you do that 2D?[/QUOTE]
Basically I have this seamless "main" texture I made...
[img]http://i.imgur.com/8npxR.png[/img]
And then I draw kinda around it, as a "detail" texture:
[img]http://i.imgur.com/uz2E6.png[/img]
And then, for all blocks, I draw the detail textures first with random rotation and flipping/mirroring, and then I draw all the main textures over them (also with random rotation and flipping/mirroring). Because the texture is so grainy, you hardly notice the seams at the edges.
Same goes for the lava.
Hmm, so if BSP is so outdated, what would be a modern map format to load? Preferably with tools already available to edit it :P
[QUOTE=Mordi;35862882]Well, I'll let this video do most of the explaining. As you can see, my in-game cursor is way off of the actual position of the cursor.
[vid]http://mordi.ziphoid.com/data/stuff/Showing_First_OpenGL_App6.webm[/vid]
Also, check out that textbox with text that breaks. I spent several hours yesterday and today scratching my head over how to make it properly break the lines...
It's probably horribly unoptimized:
[cpp]void Font::DrawFormatted(int x, int y, std::string str, int width, int lineHeight)
{
int pos = 0, posPrev = 0;
while(GetWidth(str.substr(posPrev, str.length() - posPrev)) > width)
{
while(GetWidth(str.substr(posPrev, pos - posPrev)) < width) // find the first line
{
pos ++;
}
if (str.substr(posPrev, pos - posPrev).find_first_of(" ", 0) != string::npos) // if the line contains a space
{
while(str.substr(pos - 1, 1) != " ")
{
pos --;
}
}
else // insert a dash at the end of the line
{
pos--;
str.insert(pos - 1, "-");
}
Draw(x, y, str.substr(posPrev, pos - posPrev), 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f);
y += lineHeight;
posPrev = pos;
}
// Draw the last line
Draw(x, y, str.substr(pos, str.length() - pos), 0.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f);
}[/cpp][/QUOTE]Just subtract the screen mouse pos with the window coords?
[editline]7th May 2012[/editline]
[QUOTE=Dlaor-guy;35862929]Basically I have this seamless "main" texture I made...
[img]http://i.imgur.com/8npxR.png[/img]
And then I draw kinda around it, as a "detail" texture:
[img]http://i.imgur.com/uz2E6.png[/img]
And then, for all blocks, I draw the detail textures first with random rotation and flipping/mirroring, and then I draw all the main textures over them (also with random rotation and flipping/mirroring). Because the texture is so grainy, you hardly notice the seams at the edges.
Same goes for the lava.[/QUOTE]No, I'm talking about the actual code implementation
[QUOTE=dije;35862935]Just subtract the screen mouse pos with the window coords?[/QUOTE]
Now we're back to where we started. GLFW doesn't have a function to retrieve the window's position!
That's why GLFW is perfect for me, except for the fact that it doesn't have this function. Fin.
RIM accepted Phyzicle for PlayBook!
Just gotta wait for Apple to approve it for iOS and it shall be released!
Sorry, you need to Log In to post a reply to this thread.