• Content count

  • Joined

  • Last visited

Community Reputation

100 Neutral

About Malchivus

  • Rank
  1. OPCODE examples?

    ... yeah RAPID works too .. over opcode's gobbely goop
  2. Quote:Original post by Enrico You don't need to retrieve the pointers ... I know that it is unusual, but SDL needs it if you want to load a diffrent OpenGL library. I should have said that though ... sorry. Quote:Original post by Brother Bob ... glVertexPointer is without count parameter .... glVertexPointerEXT is with count parameter... Ok, so passing "glVertexPointer" will get me one without a count, and "glVertexPointerEXT" will get me one with a count. It sounds counter intuitive - that the extension prototype is more developed - but it seems just as possible. Thank you both.
  3. Here goes ... The Microsoft Visual c++ 6.0 Docs say that the OpenGL vertex array functions have a 'count' parameter, i.e: void glVertexPointer( GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer ); The OpenGL programming guide lists it as: void glVertexPointer( GLint size, GLenum type, GLsizei stride, <sans count> const GLvoid *pointer ); But the extension registry says the vertex array extension function is: void glVertexPointerEXT( GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer ); So what I seem to see is two diffrent prototypes for "glVertexPointer." I want to use the SDL_GL_GetFunc() function to retrieve my function pointers, but if it is working on Windows ... how do I know which prototype I should use? I know someone will probaly point out that the ARB should be considered the definitive source for this information, but the Windows implementation is provided by Microsoft not the ARB ... or is this just a typo in the otherwise useful documentation?
  4. SDL 1.2.9 began redirected stdout, and stdin. People must have been complaining about the presence of a console in their applications. You can either re-set the redirecting (ie cancel it out) which is what the "freopen" does. Alternatively you can rebuild SDL so that redirection is disabled . I prefer the later myself, i believe there is a line in "sdl_win.c[pp]" about WindowsCE (for whic redirection was unsuitable) but I'm not sure, although I remember it being realy obvious what was going on. [Edited by - Malchivus on March 17, 2006 10:50:59 AM]
  5. physics engine

    tackle this like any software engineering project ... 1) requirements capture 2) specification 3) desighn 4) implementation 5) valdiation invest in some physics and math resources (books etc.) once you know what you need :)
  6. ok, I want to make a static library. I want this static library to use lua functionality. I have compiled the static libraries for lua and i have compiled my library as well. When I build my program, I get errors from my new static library saying that the LUA symbols are undefined, but I have linked with the lua library ... how do i fix this? Or do i have to pass my static library all of the lua function pointers i want it to use?
  7. how to list files in a folder?

    i didn't understand that there was no prtable way to do it. i thought that somewhere burried in gcc(mingw) there would be something. oops
  8. hmm, if your trying to implement operations on a stream in the way that scanf does on stdin; you could use your own function and choose between data types (float, int etc) and then read byte by byte the data into the arguments. if your using streams that behave like FILE* than fscanf WILL do all your work for you, the folowing macro explains how scanf and fscanf are related #define scanf(...) fscanf( stdin, ... ) i hope its helpful, if you want a completely new stdargs function (...) then your goign to have to dig throught some source to find out how to use them ... i'd suggest "the c programing lanuguage" by kerigan and ritchie, but if you don't have a copy the internet should be able to give up the answer you want. again, i hope i'm being helpful and not confusing ...
  9. i'm sorry if this is rude, but .. what? are you talking about a home made scanf function? or do you want to perform scanf on an arbitrary stream? if you do want the later, try using fscanf or setting stdin to your stream, scanf calls fscanf on the stream stdin.
  10. hey all, quick question: does anyone know if there is a way to add more directories / folders to whatever eclipse CDT uses as the default when a project is created? I'm using mysys and i want anything i build to just show up. i'v tried to change the windows enviroment variables, but that doesn't seem to do anything. i'd also like to change it so the default make command is "mingw32-make" not "make" but i really can live with it if thats not possible ... its the other one thats killing me thanks a lot [Edited by - Malchivus on September 16, 2005 6:23:20 AM]
  11. OpenGL render in black and white

    Robot Guy: exactly! just force all the fragments through the pixel transfer system, whether by hook or by crook! [Edited by - Malchivus on September 15, 2005 6:14:52 AM]
  12. don't forget visual c express ...
  13. OpenGL render in black and white

    I still think the color matrix is the key to the answer this guy wants... It sounds like a real p-i-t-a to implement fancy schmancy shaders for just the pause screen. also, you may use shaders for your general redering later on, then the black and white image would be wrong! try something like this: 0) enable all extensions and states that you need to do the folowing ... 1) setup color matrix for black and white rendering 2) render entire sceen as usual (in color) 3) now copy all of the screen's pixels to a buffer / texture / lilypad, whatever 4) set the color matrix to an identity 5) whenever you need it ( ie right after clearing the screen ) copy / draw the pixels back onto the display surface this may be a *hack* in some people's eyes because it doesn't realy draw a 3D scene. what it does do is creates a black and white screen shot (1-4) and then use that to simulate drawing a B&W scene. i know this isn't a general purpose black and white trick, nothing will move, but then again YOU ONLY WANT IT FOR WHEN THE GAME IS PAUSED! If you want to update things while the game is paused, you'll have to repeat steps 1 - 4 to redraw the scene, but ... who cares? your still saving a boatload of speed because your only rendering it once every few frames. If you decide you want an animated scene, not a "changing once in a awhile" but a honest to god 20+ fps animated scene, you will need something a bit more complicated ... you could try creating a seperate set of textures in black and white, the internal format would be much smaller, so in theory it wouldn't be too bad. alternatively, when you switch between color modes you could also disable some extra stuff to gain a few frames, then use the above method to convert the scene to black and white ... you should probaly use an auxilary buffer to store the color values in that case. finaly fragment shaders would also provide a solution, but as everyone has said ... they aren't always available i hope this helps ... please tell me if it does
  14. how to list files in a folder?

    Quote:Original post by SiCrane I would use boost::filesystem. hmm, looks a bit heavy for what i want to do, also seems that the library will need to be rebuilt for every platform ... thats what i was trying to avoid ... Quote:Original post by guyaton There is a windows specific way if you want. it looks like this: *** Source Snippet Removed *** havn't compiled it so i can't promise anything but give it a shot (it will recurse through sub directories t0o. ~guyaton thanks, that will work for windows ... i guess that this just isn't something that can be done without relying on a specific system API, or including more libraries in my application ... thanks anyway.
  15. how to list files in a folder?

    Heya, I know this is something that you see on the internet, but I can't seem to get anything to do it... I am using mingw32, is there a (GCC) way (i.e. a set of functions in one of the libs) that will let me find out all of the files in a directory? I know there are things for windows, and for *nix, but I want to do it in a way that works everywhere ... or is this one of those places where you need to write a separate path for each platform ...