Immediate mode is from the 90s.
Try these:
OpenGL SuperBible (Explains everything) OpenGl-Tutorial (good 'getting started' guide, no real info) Learning Modern 3D Graphics Programming (Looks good, I haven't read it)
Immediate mode is from the 90s.
Try these:
OpenGL SuperBible (Explains everything) OpenGl-Tutorial (good 'getting started' guide, no real info) Learning Modern 3D Graphics Programming (Looks good, I haven't read it)
Or maybe just open.gl?
Oh man, he's going to be able to open the most non-deprecated blank window ever!
Now my engine supports looped background music!
Everytime I watch it, as soon as the particles spawn, my eyes go all fucking spastic. But nice work nonetheless.
More specifically 1992. Immediate mode is 20 years old. DirectX 1.0 was released in 1995 and DirectX 8 was released in 2000, for the person who said immediate mode = DirectX 8.
The reason immediate mode was used initially was because back then, the overhead of a method call was nothing compared to the time the vertex processor took (plus the number of vertices rendered was tiny compared to today's models). 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.
In addition to the OpenGL SuperBible (which I have a copy of, immensely useful both as a guide and a reference) and the two online guides you posted, both of which I usually recommend, this: http://www.swiftless.com/opengltuts/opengl4tuts.html
With modern OpenGL, most of the "state" is gone. No matrix state, no lighting/material state, etc. The only state you'll ever deal with are things you'll typically enable once and leave on (depth testing, blending, etc), (un)binding buffers/textures, and enabling/disabling vertex attributes.
Oh, and a tip to keep in mind when learning about modern OpenGL: As graphics technology evloved, more triangles could be drawn in less time. At some point that time got so small that the time a method call takes became significant. Because of this, the way to optimize rendering is to do as much as possible during initialization, store it, and call it during the main loop.
So when you see something like VAOs, realize that they're made only to offset as much work as possible to initialization.
I made this scanner thing
Hmm? Why do you say that. The next generation Xbox will likely have a hobbyist API and XNA 5.0 seems the natural progression. Also Visual Studio 11 won't integrate with XNA 4.0, so unless they just do 4.0 refresh 2... Even if there isn't XNA 5.0, nothing to stop MonoGame taking it further, they've pretty much got everything except the content pipeline compile integrated now.
Edited:
Also, I've found an alarming lack of hex to ascii conversion functions on the internet, so I threw together my own really quick:
![]()
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.
For reference: http://www.reddit.com/r/opengl/comme..._installation/
right on!
Edited:
remember folks, everything you see on that screen was done with javascript!
Edited:
Here is the source to all the userland utilities if anyone'd like to take a look: https://github.com/charliesome/jsos/.../kernel/js/bin
If you know JavaScript or CoffeeScript, you should write a program for JSOS!
POTY every year
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 in relation to the window position, you would need to subtract the position of the window to get the absolute 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.
Blurgh
http://jsfiddle.net/xnfHL/1/
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
Got my arrays fixed and working properly, now to implement proper typing and classes...
test.evil:
$ ruby wmd.rb 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: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.
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:
![]()
It lives... (Exponential shadow mapping)
Are there any tutorials for setting up Open GL ES like the Android canvas?
Framebuffer object sharing is going well
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:
It's like in a movie
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
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.
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
I think it looks pretty good (but the lava still has visible seams)
How did you do that 2D?
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.
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:
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); }
Basically I have this seamless "main" texture I made...
And then I draw kinda around it, as a "detail" texture:
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
Just subtract the screen mouse pos with the window coords?
Edited:
No, I'm talking about the actual code implementation
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!
You should release it to google play like now![]()
I don't understand how that's a problem of not having the absolute position. Wouldn't you draw the cursor at the relative position?
I can't think of a reason to need absolute position for cursor rendering that isn't an obscene hack.